mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat(api,web): add batch processing with ZIP download and SSE progress
Backend: POST /api/v1/tools/:toolId/batch accepts multiple files + settings, processes via p-queue with CONCURRENT_JOBS concurrency limit, streams ZIP response using archiver. Tool registry in tool-factory enables batch to reuse any registered tool's process function. SSE endpoint at GET /api/v1/jobs/:jobId/progress provides real-time updates. Handles partial failures gracefully, preserves filenames, deduplicates collisions. Frontend: use-batch-processor hook handles upload, SSE progress tracking, and automatic ZIP download.
This commit is contained in:
+14
-11
@@ -11,26 +11,29 @@
|
||||
"clean": "rm -rf dist"
|
||||
},
|
||||
"dependencies": {
|
||||
"@stirling-image/image-engine": "workspace:*",
|
||||
"@stirling-image/shared": "workspace:*",
|
||||
"sharp": "^0.33.0",
|
||||
"fastify": "^5.2.0",
|
||||
"@fastify/static": "^8.1.0",
|
||||
"@fastify/multipart": "^9.0.0",
|
||||
"@fastify/cors": "^11.0.0",
|
||||
"@fastify/multipart": "^9.0.0",
|
||||
"@fastify/rate-limit": "^10.2.0",
|
||||
"@fastify/static": "^8.1.0",
|
||||
"@fastify/swagger": "^9.4.0",
|
||||
"@fastify/swagger-ui": "^5.2.0",
|
||||
"@stirling-image/image-engine": "workspace:*",
|
||||
"@stirling-image/shared": "workspace:*",
|
||||
"archiver": "^7.0.1",
|
||||
"better-sqlite3": "^11.7.0",
|
||||
"dotenv": "^16.4.0",
|
||||
"zod": "^3.24.0",
|
||||
"drizzle-orm": "^0.38.0",
|
||||
"better-sqlite3": "^11.7.0"
|
||||
"fastify": "^5.2.0",
|
||||
"p-queue": "^9.1.0",
|
||||
"sharp": "^0.33.0",
|
||||
"zod": "^3.24.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.7.0",
|
||||
"tsx": "^4.19.0",
|
||||
"@types/archiver": "^7.0.0",
|
||||
"@types/better-sqlite3": "^7.6.0",
|
||||
"@types/node": "^22.0.0",
|
||||
"drizzle-kit": "^0.30.0",
|
||||
"@types/better-sqlite3": "^7.6.0"
|
||||
"tsx": "^4.19.0",
|
||||
"typescript": "^5.7.0"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user