update modules, add ftp:// support

This commit is contained in:
zefie
2025-07-21 17:43:41 -04:00
parent 90522cc796
commit 79b89a00c3
9 changed files with 423 additions and 66 deletions

View File

@@ -26,6 +26,7 @@ const WTVClientSessionData = require(classPath + "/WTVClientSessionData.js");
const WTVMime = require(classPath + "/WTVMime.js"); const WTVMime = require(classPath + "/WTVMime.js");
const WTVFlashrom = require(classPath + "/WTVFlashrom.js"); const WTVFlashrom = require(classPath + "/WTVFlashrom.js");
const WTVIRC = require(classPath + "/WTVIRC.js"); const WTVIRC = require(classPath + "/WTVIRC.js");
const WTVFTP = require(classPath + "/WTVFTP.js");
const vm = require('vm'); const vm = require('vm');
const debug = require('debug')('minisrv_main'); const debug = require('debug')('minisrv_main');
const express = require('express'); const express = require('express');
@@ -1094,6 +1095,9 @@ minisrv-no-mail-count: true`;
processPath(socket, urlToPath, request_headers, service_name, shared_romcache, pc_services); processPath(socket, urlToPath, request_headers, service_name, shared_romcache, pc_services);
} else if (shortURL.indexOf('http://') >= 0 || shortURL.indexOf('https://') >= 0 || (use_external_proxy == true && shortURL.indexOf(service_name + "://") >= 0) && !pc_services) { } else if (shortURL.indexOf('http://') >= 0 || shortURL.indexOf('https://') >= 0 || (use_external_proxy == true && shortURL.indexOf(service_name + "://") >= 0) && !pc_services) {
doHTTPProxy(socket, request_headers); doHTTPProxy(socket, request_headers);
} else if (shortURL.startsWith('ftp://')) {
var wtvftp = new WTVFTP(minisrv_config, sendToClient);
wtvftp.handleFTPRequest(socket, request_headers);
} else if (shortURL.indexOf('file://') >= 0) { } else if (shortURL.indexOf('file://') >= 0) {
shortURL = shortURL.replace("file://",'').replace("romcache", "ROMCache"); shortURL = shortURL.replace("file://",'').replace("romcache", "ROMCache");
service_name = "wtv-star"; service_name = "wtv-star";

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

View File

@@ -0,0 +1,187 @@
class WTVFTP {
wtvshared = null;
wtvmime = null;
minisrv_config = null;
sendToClient = null;
request_headers = null;
ftp = null;
url = null;
constructor(minisrv_config, sendToClient) {
this.minisrv_config = minisrv_config;
this.sendToClient = sendToClient;
const WTVShared = require("./WTVShared.js")['WTVShared'];
const WTVMime = require("./WTVMime.js");
this.url = require('url');
this.ftp = require('ftp');
this.wtvshared = new WTVShared();
this.wtvmime = new WTVMime();
}
handleFTPRequest(socket, request_headers) {
// Handle the FTP request here
// Assume request_headers.url contains the FTP URL
this.request_headers = request_headers;
const ftpUrl = request_headers.request_url;
const parsed = this.url.parse(ftpUrl);
// Extract user, pass, and host
let user = null;
let pass = null;
let host = parsed.hostname;
if (parsed.auth) {
const [username, password] = parsed.auth.split(':');
user = username;
pass = password || null;
}
// Example usage: log the parsed values
// You can now use user, pass, and host as needed
if (!user && !pass) {
user = "anonymous";
pass = "anonymous@eff.org";
}
console.log(`User: ${user}, Pass: ${pass}, Host: ${host}`);
const ftpClient = new this.ftp();
const port = parsed.port ? parseInt(parsed.port, 10) : 21;
const path = decodeURIComponent(parsed.pathname || '/');
let dir = path;
let filename = null;
// Determine if path is a file or directory
if (path && path !== '/') {
const parts = path.split('/');
if (parts[parts.length - 1] && !path.endsWith('/')) {
filename = parts.pop();
dir = parts.join('/') || '/';
}
}
ftpClient.on('ready', () => {
if (filename) {
var totalsize = 0;
// Change to directory and get file
ftpClient.cwd(dir, (err) => {
if (err) {
this.sendToClient(socket, { 'Status': '500 Failed to change directory', 'Content-Type': 'text/plain' }, 'Failed to change directory');
ftpClient.end();
return;
}
ftpClient.get(filename, (err, stream) => {
if (err) {
this.sendToClient(socket, { 'Status': '404 File not found', 'Content-Type': 'text/plain' }, 'File not found');
ftpClient.end();
return;
}
const chunks = [];
stream.on('data', (chunk) => {
chunks.push(chunk);
totalsize += chunk.length;
if (totalsize > 1024 * 1024 * 4) {
this.sendToClient(socket, { 'Status': '413 The file chosen contains too much information to be used.', 'Content-Type': 'text/plain' }, 'File too large');
ftpClient.end();
return;
}
});
stream.on('end', () => {
const buffer = Buffer.concat(chunks);
const mime = this.wtvmime.detectMimeTypeFromBuffer(buffer);
this.sendToClient(
socket,
{
'Status': 200,
'Content-Type': mime || 'application/octet-stream',
'Content-Disposition': `attachment; filename="${filename}"`
},
buffer
);
ftpClient.end();
});
stream.on('error', () => {
this.sendToClient(socket, { 'Status': '500 Error reading file', 'Content-Type': 'text/plain' }, 'Error reading file');
ftpClient.end();
});
});
});
} else {
// List directory
ftpClient.list(dir, (err, list) => {
if (err) {
this.sendToClient(socket, { 'Status': '500 Failed to list directory', 'Content-Type': 'text/plain' }, 'Failed to list directory');
ftpClient.end();
return;
}
const html = this.formatDirectoryListing(list);
this.sendToClient(socket, { 'Status': '200 OK', 'Content-Type': 'text/html' }, html);
ftpClient.end();
});
}
});
ftpClient.on('error', (err) => {
this.sendToClient(socket, { 'Status': '500 FTP connection error', 'Content-Type': 'text/plain' }, 'FTP connection error');
});
ftpClient.connect({
host: host,
port: port,
user: user,
password: pass
});
}
formatDirectoryListing(list) {
// Format the directory listing as needed
let html = `<html>
<head>
<title>FTP Directory Listing</title>
<style>
table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid #ccc; padding: 8px; text-align: left; }
th { background: #f4f4f4; }
</style>
</head>
<body>
<h2>FTP Directory Listing</h2>
<table>
<thead>
<tr>
<th> </th>
<th>Type</th>
<th>Size</th>
<th>Date</th>
</tr>
</thead>
<tbody>
${list.map(item => {
const dateStr = item.date
? item.date.toLocaleString(undefined, {
year: 'numeric',
month: 'short',
day: 'numeric',
hour: '2-digit',
minute: '2-digit'
})
: '';
return `
<tr>
<td>${item.type === 'd' ? '<img src="wtv-star:/ROMCache/DirectoryIcon.png" width=16 height=16>' : '<img src="wtv-star:/ROMCache/FileIcon.png" width=16 height=16>'}</td>
<td><a href="${this.request_headers.request_url}${item.name}${item.type === 'd' ? '/' : ''}">${item.name}</a></td>
<td>${item.size !== undefined ? this.wtvshared.formatBytes(item.size) : ''}</td>
<td>${dateStr}</td>
</tr>
`;
}).join('')}
</tbody>
</table>
</body>
</html>`;
return html;
}
}
module.exports = WTVFTP;

View File

@@ -200,6 +200,98 @@ class WTVMime {
return new Array(wtv_mime_type, modern_mime_type); return new Array(wtv_mime_type, modern_mime_type);
} }
/**
* Attempts to detect the MIME type from a data buffer using magic numbers.
* Falls back to 'application/octet-stream' if unknown.
* @param {Buffer} buffer
* @returns {string} Detected MIME type
*/
detectMimeTypeFromBuffer(buffer) {
if (!Buffer.isBuffer(buffer) || buffer.length < 4) {
return 'application/octet-stream';
}
// JPEG
if (buffer[0] === 0xFF && buffer[1] === 0xD8 && buffer[2] === 0xFF) {
return 'image/jpeg';
}
// PNG
if (buffer.slice(0, 8).equals(Buffer.from([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A]))) {
return 'image/png';
}
// GIF
if (buffer.slice(0, 6).toString() === 'GIF87a' || buffer.slice(0, 6).toString() === 'GIF89a') {
return 'image/gif';
}
// PDF
if (buffer.slice(0, 4).toString() === '%PDF') {
return 'application/pdf';
}
// ZIP
if (buffer[0] === 0x50 && buffer[1] === 0x4B && (buffer[2] === 0x03 || buffer[2] === 0x05 || buffer[2] === 0x07) && (buffer[3] === 0x04 || buffer[3] === 0x06 || buffer[3] === 0x08)) {
return 'application/zip';
}
// GZIP
if (buffer[0] === 0x1F && buffer[1] === 0x8B) {
return 'application/gzip';
}
// MP3
if ((buffer[0] === 0x49 && buffer[1] === 0x44 && buffer[2] === 0x33) || (buffer[0] === 0xFF && (buffer[1] & 0xE0) === 0xE0)) {
return 'audio/mpeg';
}
// WAV
if (buffer.slice(0, 4).toString() === 'RIFF' && buffer.slice(8, 12).toString() === 'WAVE') {
return 'audio/wav';
}
// WebP
if (buffer.slice(0, 4).toString() === 'RIFF' && buffer.slice(8, 12).toString() === 'WEBP') {
return 'image/webp';
}
// BMP
if (buffer[0] === 0x42 && buffer[1] === 0x4D) {
return 'image/bmp';
}
// OGG
if (buffer.slice(0, 4).toString() === 'OggS') {
return 'application/ogg';
}
// MIDI
if (buffer.slice(0, 4).toString() === 'MThd') {
return 'audio/midi';
}
// TAR
if (buffer.length > 257 && buffer.slice(257, 262).toString() === 'ustar') {
return 'application/x-tar';
}
// TEXT (plain)
if (
buffer.length >= 4 &&
(
buffer.slice(0, 5).toString().toLowerCase() === '<?xml' ||
buffer.slice(0, 6).toString().toLowerCase() === '<html>' ||
buffer.slice(0, 6).toString().toLowerCase() === '<!doc' ||
buffer.slice(0, 6).toString().toLowerCase() === '<head>' ||
buffer.slice(0, 6).toString().toLowerCase() === '<body>' ||
buffer.slice(0, 6).toString().toLowerCase() === '<meta>' ||
buffer.slice(0, 6).toString().toLowerCase() === '<titl>' ||
buffer.slice(0, 6).toString().toLowerCase() === '<scri>' ||
buffer.slice(0, 6).toString().toLowerCase() === '<styl>'
)
) {
return 'text/html';
}
// Try to detect plain text (no null bytes, mostly printable)
if (
buffer.length > 0 &&
buffer.slice(0, 512).every(b => (b === 0x09 || b === 0x0A || b === 0x0D || (b >= 0x20 && b <= 0x7E)))
) {
return 'text/plain';
}
// Default fallback
return 'application/octet-stream';
}
// modified from https://github.com/sergi/mime-multipart/blob/master/index.js // modified from https://github.com/sergi/mime-multipart/blob/master/index.js
generateMultipartMIME(tuples, options) { generateMultipartMIME(tuples, options) {

View File

@@ -979,6 +979,23 @@ class WTVShared {
return encoded.toUpperCase(); return encoded.toUpperCase();
} }
/**
* Converts a bytes value into a human-readable string (KB, MB, GB)
* @param {number} bytes The number of bytes
* @param {number} decimals The number of decimal places to include in the output (default is 2)
* @returns {string} Human-readable string with 2 decimal places
*/
formatBytes(bytes, decimals = 2) {
if (typeof bytes !== 'number' || isNaN(bytes)) return '0 Bytes';
const units = ['B', 'KB', 'MB'];
let i = 0;
while (bytes >= 1024 && i < units.length - 1) {
bytes /= 1024;
i++;
}
return `${bytes.toFixed(decimals)} ${units[i]}`;
}
/** /**
* Decodes a urlencoded string into a binary buffer * Decodes a urlencoded string into a binary buffer
* @param {string} encoded urlencoded string * @param {string} encoded urlencoded string

View File

@@ -346,6 +346,10 @@
"WTVAuthor" "WTVAuthor"
] ]
}, },
"ftp": {
"port": 1650,
"connections": 3
},
"http": { "http": {
// http upstream // http upstream
"port": 1650, "port": 1650,

View File

@@ -16,6 +16,7 @@
"endianness": "^8.0.2", "endianness": "^8.0.2",
"express": "^4.21.2", "express": "^4.21.2",
"follow-redirects": "^1.15.6", "follow-redirects": "^1.15.6",
"ftp": "^0.3.10",
"html-entities": "^2.5.2", "html-entities": "^2.5.2",
"http-string-parser": "^0.0.6", "http-string-parser": "^0.0.6",
"iconv-lite": "^0.6.3", "iconv-lite": "^0.6.3",
@@ -41,9 +42,9 @@
} }
}, },
"node_modules/@emnapi/runtime": { "node_modules/@emnapi/runtime": {
"version": "1.4.4", "version": "1.4.5",
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.4.tgz", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.4.5.tgz",
"integrity": "sha512-hHyapA4A3gPaDCNfiqyZUStTMqIkKRshqPIuDOXv1hcBnD4U3l8cP0T1HMCfGRxQ6V64TGCcoswChANyOAwbQg==", "integrity": "sha512-++LApOtY0pEEz1zrd9vy1/zXVaVJJ/EbAF3u0fXIzPJEDtnITsBGbbK0EkM72amhl/R5b+5xx0Y/QhcVOpuulg==",
"license": "MIT", "license": "MIT",
"optional": true, "optional": true,
"dependencies": { "dependencies": {
@@ -51,9 +52,9 @@
} }
}, },
"node_modules/@eslint-community/eslint-utils": { "node_modules/@eslint-community/eslint-utils": {
"version": "4.4.1", "version": "4.7.0",
"resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz",
"integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -634,9 +635,9 @@
} }
}, },
"node_modules/acorn": { "node_modules/acorn": {
"version": "8.14.0", "version": "8.15.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
"integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@@ -666,9 +667,9 @@
} }
}, },
"node_modules/agent-base": { "node_modules/agent-base": {
"version": "7.1.3", "version": "7.1.4",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz",
"integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==", "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">= 14" "node": ">= 14"
@@ -810,9 +811,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/brace-expansion": { "node_modules/brace-expansion": {
"version": "1.1.11", "version": "1.1.12",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -830,9 +831,9 @@
} }
}, },
"node_modules/call-bind-apply-helpers": { "node_modules/call-bind-apply-helpers": {
"version": "1.0.1", "version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
"integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"es-errors": "^1.3.0", "es-errors": "^1.3.0",
@@ -843,13 +844,13 @@
} }
}, },
"node_modules/call-bound": { "node_modules/call-bound": {
"version": "1.0.3", "version": "1.0.4",
"resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
"integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"call-bind-apply-helpers": "^1.0.1", "call-bind-apply-helpers": "^1.0.2",
"get-intrinsic": "^1.2.6" "get-intrinsic": "^1.3.0"
}, },
"engines": { "engines": {
"node": ">= 0.4" "node": ">= 0.4"
@@ -969,6 +970,12 @@
"integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/core-util-is": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"license": "MIT"
},
"node_modules/cross-env": { "node_modules/cross-env": {
"version": "7.0.3", "version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz",
@@ -1017,9 +1024,9 @@
} }
}, },
"node_modules/debug": { "node_modules/debug": {
"version": "4.4.0", "version": "4.4.1",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz",
"integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"ms": "^2.1.3" "ms": "^2.1.3"
@@ -1547,9 +1554,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/fastq": { "node_modules/fastq": {
"version": "1.19.0", "version": "1.19.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.0.tgz", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",
"integrity": "sha512-7SFSRCNjBQIZH/xZR3iy5iQYR8aGBE0h3VG6/cwlbrpdciNYBMotQav8c1XI3HjHH+NikUpP53nPdlZSdWmFzA==", "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==",
"dev": true, "dev": true,
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
@@ -1635,9 +1642,9 @@
} }
}, },
"node_modules/flatted": { "node_modules/flatted": {
"version": "3.3.2", "version": "3.3.3",
"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz",
"integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
@@ -1686,6 +1693,18 @@
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/ftp": {
"version": "0.3.10",
"resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz",
"integrity": "sha512-faFVML1aBx2UoDStmLwv2Wptt4vw5x03xxX172nhA5Y5HBshW5JweqQ2W4xL4dezQTG8inJsuYcpPHHU3X5OTQ==",
"dependencies": {
"readable-stream": "1.1.x",
"xregexp": "2.0.0"
},
"engines": {
"node": ">=0.8.0"
}
},
"node_modules/function-bind": { "node_modules/function-bind": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
@@ -1696,17 +1715,17 @@
} }
}, },
"node_modules/get-intrinsic": { "node_modules/get-intrinsic": {
"version": "1.2.7", "version": "1.3.0",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.7.tgz", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
"integrity": "sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==", "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"call-bind-apply-helpers": "^1.0.1", "call-bind-apply-helpers": "^1.0.2",
"es-define-property": "^1.0.1", "es-define-property": "^1.0.1",
"es-errors": "^1.3.0", "es-errors": "^1.3.0",
"es-object-atoms": "^1.0.0", "es-object-atoms": "^1.1.1",
"function-bind": "^1.1.2", "function-bind": "^1.1.2",
"get-proto": "^1.0.0", "get-proto": "^1.0.1",
"gopd": "^1.2.0", "gopd": "^1.2.0",
"has-symbols": "^1.1.0", "has-symbols": "^1.1.0",
"hasown": "^2.0.2", "hasown": "^2.0.2",
@@ -1733,9 +1752,9 @@
} }
}, },
"node_modules/get-uri": { "node_modules/get-uri": {
"version": "6.0.4", "version": "6.0.5",
"resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.4.tgz", "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.5.tgz",
"integrity": "sha512-E1b1lFFLvLgak2whF2xDBcOy6NLVGZBqqjJjsIhvopKfWWEi64pLVTWWehV8KlLerZkfNTA95sTe2OdJKm1OzQ==", "integrity": "sha512-b1O07XYq8eRuVzBNgJLstU6FYc1tS6wnMtF1I1D9lE8LxZSOGZ7LhxN54yPP6mGw5f2CkXY2BQUL9Fx41qvcIg==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"basic-ftp": "^5.0.2", "basic-ftp": "^5.0.2",
@@ -1851,9 +1870,9 @@
} }
}, },
"node_modules/html-entities": { "node_modules/html-entities": {
"version": "2.5.2", "version": "2.6.0",
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.5.2.tgz", "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.6.0.tgz",
"integrity": "sha512-K//PSRMQk4FZ78Kyau+mZurHn3FH0Vwr+H36eE0rPbeYkRRi9YxceYPhuN60UwWorxyKHhqoAJl2OFKa4BVtaA==", "integrity": "sha512-kig+rMn/QOVRvr7c86gQ8lWXq+Hkv6CbAH1hLu+RG338StTpE8Z0b44SDVaqVu7HGKf27frdmUYEs9hTUX/cLQ==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@@ -2070,6 +2089,12 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/isarray": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
"integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==",
"license": "MIT"
},
"node_modules/isexe": { "node_modules/isexe": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
@@ -2261,9 +2286,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/nanoid": { "node_modules/nanoid": {
"version": "3.3.8", "version": "3.3.11",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
"integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
"funding": [ "funding": [
{ {
"type": "github", "type": "github",
@@ -2409,9 +2434,9 @@
} }
}, },
"node_modules/pac-proxy-agent": { "node_modules/pac-proxy-agent": {
"version": "7.1.0", "version": "7.2.0",
"resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.1.0.tgz", "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.2.0.tgz",
"integrity": "sha512-Z5FnLVVZSnX7WjBg0mhDtydeRZ1xMcATZThjySQUHqr+0ksP8kqaw23fNKkaaN/Z8gwLUs/W7xdl0I75eP2Xyw==", "integrity": "sha512-TEB8ESquiLMc0lV8vcd5Ql/JAKAoyzHFXaStwjkzpOpC5Yv+pIzLfHvjTSdf3vpa2bMiUQrg9i6276yn8666aA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@tootallnate/quickjs-emscripten": "^0.23.0", "@tootallnate/quickjs-emscripten": "^0.23.0",
@@ -2513,9 +2538,9 @@
} }
}, },
"node_modules/php-serialize": { "node_modules/php-serialize": {
"version": "5.1.0", "version": "5.1.3",
"resolved": "https://registry.npmjs.org/php-serialize/-/php-serialize-5.1.0.tgz", "resolved": "https://registry.npmjs.org/php-serialize/-/php-serialize-5.1.3.tgz",
"integrity": "sha512-ktoyGkzmw9l5t3H5oMwWR4bDwFF72Cr3rmQ7lv1BGowAbn90hLj00qWudn3i1ocwpoSJPY4ZG9yzso2UbedMzw==", "integrity": "sha512-p7zXX8xjGgddgP6byN+KmGKM0x6uoMZBRZteBa9LonqgrDV3LyMxUeGVX7RTFYwWaUAnTEsUWJfHI3N7eKvJgw==",
"license": "MIT", "license": "MIT",
"engines": { "engines": {
"node": ">= 8" "node": ">= 8"
@@ -2528,9 +2553,9 @@
"license": "ISC" "license": "ISC"
}, },
"node_modules/postcss": { "node_modules/postcss": {
"version": "8.5.2", "version": "8.5.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.2.tgz", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
"integrity": "sha512-MjOadfU3Ys9KYoX0AdkBlFEF1Vx37uCCeN4ZHnmwm9FfpbsGWMZeBLMmmpY+6Ocqod7mkdZ0DT31OlbsFrLlkA==", "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@@ -2547,7 +2572,7 @@
], ],
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"nanoid": "^3.3.8", "nanoid": "^3.3.11",
"picocolors": "^1.1.1", "picocolors": "^1.1.1",
"source-map-js": "^1.2.1" "source-map-js": "^1.2.1"
}, },
@@ -2691,6 +2716,18 @@
"integrity": "sha512-0auP5EfZ21/RP437NgmH+eCTgwDGA611KYCU/2ywk1aIUhR1rHToI4z3ZtQ9BRZYw44M9htklIZK5khkBJerAw==", "integrity": "sha512-0auP5EfZ21/RP437NgmH+eCTgwDGA611KYCU/2ywk1aIUhR1rHToI4z3ZtQ9BRZYw44M9htklIZK5khkBJerAw==",
"license": "MIT" "license": "MIT"
}, },
"node_modules/readable-stream": {
"version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==",
"license": "MIT",
"dependencies": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.1",
"isarray": "0.0.1",
"string_decoder": "~0.10.x"
}
},
"node_modules/resolve-from": { "node_modules/resolve-from": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
@@ -2702,9 +2739,9 @@
} }
}, },
"node_modules/reusify": { "node_modules/reusify": {
"version": "1.0.4", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz",
"integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"engines": { "engines": {
@@ -2780,9 +2817,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/sanitize-html": { "node_modules/sanitize-html": {
"version": "2.14.0", "version": "2.17.0",
"resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.14.0.tgz", "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-2.17.0.tgz",
"integrity": "sha512-CafX+IUPxZshXqqRaG9ZClSlfPVjSxI0td7n07hk8QO2oO+9JDnlcL8iM8TWeOXOIBFgIOx6zioTzM53AOMn3g==", "integrity": "sha512-dLAADUSS8rBwhaevT12yCezvioCA+bmUTPH/u57xKPT8d++voeYE6HeluA/bPbQ15TwDBG2ii+QZIEmYx8VdxA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"deepmerge": "^4.2.2", "deepmerge": "^4.2.2",
@@ -3044,9 +3081,9 @@
} }
}, },
"node_modules/socks": { "node_modules/socks": {
"version": "2.8.4", "version": "2.8.6",
"resolved": "https://registry.npmjs.org/socks/-/socks-2.8.4.tgz", "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.6.tgz",
"integrity": "sha512-D3YaD0aRxR3mEcqnidIs7ReYJFVzWdd6fXJYUM8ixcQcJRGTka/b3saV0KflYhyVJXKhb947GndU35SxYNResQ==", "integrity": "sha512-pe4Y2yzru68lXCb38aAqRf5gvN8YdjP1lok5o0J7BOHljkyCGKVz7H3vpVIXKD27rj2giOJ7DwVyk/GWrPHDWA==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"ip-address": "^9.0.5", "ip-address": "^9.0.5",
@@ -3128,6 +3165,12 @@
"node": ">=0.2.0" "node": ">=0.2.0"
} }
}, },
"node_modules/string_decoder": {
"version": "0.10.31",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==",
"license": "MIT"
},
"node_modules/strip-ansi": { "node_modules/strip-ansi": {
"version": "6.0.1", "version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
@@ -3305,6 +3348,15 @@
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
"node_modules/xregexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz",
"integrity": "sha512-xl/50/Cf32VsGq/1R8jJE5ajH1yMCQkpmoS10QbFZWl2Oor4H0Me64Pu2yxvsRWK3m6soJbmGfzSR7BYmDcWAA==",
"license": "MIT",
"engines": {
"node": "*"
}
},
"node_modules/yocto-queue": { "node_modules/yocto-queue": {
"version": "0.1.0", "version": "0.1.0",
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",

View File

@@ -34,6 +34,7 @@
"endianness": "^8.0.2", "endianness": "^8.0.2",
"express": "^4.21.2", "express": "^4.21.2",
"follow-redirects": "^1.15.6", "follow-redirects": "^1.15.6",
"ftp": "^0.3.10",
"html-entities": "^2.5.2", "html-entities": "^2.5.2",
"http-string-parser": "^0.0.6", "http-string-parser": "^0.0.6",
"iconv-lite": "^0.6.3", "iconv-lite": "^0.6.3",