mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-05 07:01:16 +00:00
Replace disk-based zip handling with in-memory streaming to avoid temp files: remove unzipper/@types(unzipper) deps from package.json; update BackupConfig to stream-export configs with compressing.zip.Stream and to import by extracting uploaded zip buffer via compressing.zip.UncompressStream into in-memory Buffers. Backup of existing config is kept in-memory instead of copying to tmp, and imported files are written with path normalization checks. Router changed to use multer.memoryStorage() for uploads (remove dynamic tmp/disk upload logic and uploadSizeLimit usage). Also remove uploadSizeLimit from config schema.
42 lines
920 B
JSON
42 lines
920 B
JSON
{
|
|
"name": "napcat-webui-backend",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "index.ts",
|
|
"scripts": {
|
|
"typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.json"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"import": "./index.ts"
|
|
},
|
|
"./*": {
|
|
"import": "./*"
|
|
}
|
|
},
|
|
"dependencies": {
|
|
"@simplewebauthn/server": "^13.2.2",
|
|
"@sinclair/typebox": "^0.34.38",
|
|
"ajv": "^8.13.0",
|
|
"compressing": "^1.10.3",
|
|
"compression": "^1.8.1",
|
|
"express": "^5.0.0",
|
|
"express-rate-limit": "^7.5.0",
|
|
"json5": "^2.2.3",
|
|
"multer": "^2.0.1",
|
|
"napcat-common": "workspace:*",
|
|
"napcat-pty": "workspace:*",
|
|
"ws": "^8.18.3"
|
|
},
|
|
"devDependencies": {
|
|
"@types/compression": "^1.8.1",
|
|
"@types/express": "^5.0.0",
|
|
"@types/multer": "^1.4.12",
|
|
"@types/node": "^22.0.1",
|
|
"@types/ws": "^8.5.12"
|
|
},
|
|
"engines": {
|
|
"node": ">=18.0.0"
|
|
}
|
|
} |