Spaces:
Paused
Paused
plsgivemeachane
commited on
Commit
·
78d9cf0
1
Parent(s):
e05bace
Upload API Successfully
Browse files- index.js +117 -65
- package-lock.json +265 -65
- package.json +1 -0
- prisma/schema.prisma +11 -0
- test.txt +1 -0
- uploads/Waterxtest.zip +3 -0
index.js
CHANGED
|
@@ -13,6 +13,14 @@ const statusMonitor = require('express-status-monitor')({
|
|
| 13 |
const cors = require("cors")
|
| 14 |
const prisma = new PrismaClient()
|
| 15 |
const app = express()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
const SALT = process.env.PRIVATE_KEY
|
| 17 |
|
| 18 |
const queueFileUpload = {}
|
|
@@ -27,7 +35,7 @@ const warn = (message) => {
|
|
| 27 |
//* Sussy bigint thing
|
| 28 |
BigInt.prototype["toJSON"] = function () {
|
| 29 |
return this.toString();
|
| 30 |
-
};
|
| 31 |
|
| 32 |
//* Safe Base64 Encode
|
| 33 |
const safeb64 = (str) => {
|
|
@@ -36,7 +44,7 @@ const safeb64 = (str) => {
|
|
| 36 |
|
| 37 |
const generateJWT = async (id) => {
|
| 38 |
const header = {
|
| 39 |
-
"alg": "
|
| 40 |
"typ": "JWT"
|
| 41 |
}
|
| 42 |
|
|
@@ -64,12 +72,23 @@ const generateJWT = async (id) => {
|
|
| 64 |
return token + "." + safeb64(sig)
|
| 65 |
}
|
| 66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
// Configure Multer storage
|
| 68 |
const storage = multer.diskStorage({
|
| 69 |
destination: (req, file, cb) => {
|
| 70 |
cb(null, 'uploads/');
|
| 71 |
},
|
| 72 |
filename: (req, file, cb) => {
|
|
|
|
| 73 |
cb(null, file.originalname);
|
| 74 |
}
|
| 75 |
});
|
|
@@ -94,6 +113,74 @@ const getRepo = (username) => {
|
|
| 94 |
}
|
| 95 |
};
|
| 96 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
app.use(cors({
|
| 98 |
origin: "*"
|
| 99 |
}))
|
|
@@ -102,8 +189,9 @@ app.use(bodyParser.json());
|
|
| 102 |
|
| 103 |
app.use(statusMonitor);
|
| 104 |
|
| 105 |
-
app.
|
| 106 |
|
|
|
|
| 107 |
|
| 108 |
app.post("/auth/email/register", async (req, res) => {
|
| 109 |
let { username, email, password } = req.body;
|
|
@@ -323,70 +411,34 @@ app.post("/auth/delete", async (req, res) => {
|
|
| 323 |
}
|
| 324 |
})
|
| 325 |
|
| 326 |
-
|
| 327 |
-
|
| 328 |
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
// const fileInfo = await fileExists({
|
| 332 |
-
// repo: getRepo(req.user.username),
|
| 333 |
-
// credentials: credentials,
|
| 334 |
-
// path: full_file_path,
|
| 335 |
-
// });
|
| 336 |
-
|
| 337 |
-
// if(fileInfo) {
|
| 338 |
-
// warn("Override file because file already exists: " + full_file_path)
|
| 339 |
-
// }
|
| 340 |
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
// for await (const progressEvent of await uploadFilesWithProgress({
|
| 353 |
-
// repo: getRepo(req.user.username),
|
| 354 |
-
// credentials: credentials,
|
| 355 |
-
// files: [
|
| 356 |
-
// {
|
| 357 |
-
// path: full_file_path,
|
| 358 |
-
// content: await streamToBlob(fs.createReadStream(filePath)),
|
| 359 |
-
// },
|
| 360 |
-
// ],
|
| 361 |
-
// })) {
|
| 362 |
-
// queueFileUpload[req.user.username].push({
|
| 363 |
-
// file_path: full_file_path,
|
| 364 |
-
// state: progressEvent.state
|
| 365 |
-
// })
|
| 366 |
-
// // if(progressEvent.event == "fileProgress") {
|
| 367 |
-
// // info(`Upload progress for ${progressEvent.path}: ${progressEvent.progress}`)
|
| 368 |
-
// // }
|
| 369 |
-
// };
|
| 370 |
-
|
| 371 |
-
// // Remove the file after upload
|
| 372 |
-
// fs.unlinkSync(filePath);
|
| 373 |
-
|
| 374 |
-
// for(let i = 0; i < queueFileUpload[req.user.username].length; i++) {
|
| 375 |
-
// if(queueFileUpload[req.user.username][i].file_path == full_file_path) {
|
| 376 |
-
// queueFileUpload[req.user.username].splice(i, 1)
|
| 377 |
-
// break
|
| 378 |
-
// }
|
| 379 |
-
// }
|
| 380 |
|
| 381 |
-
//
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
//
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
|
|
|
| 390 |
|
| 391 |
// app.get("/file/status", async (req, res) => {
|
| 392 |
// res.send(queueFileUpload[req.user.username])
|
|
@@ -462,4 +514,4 @@ app.post("/auth/delete", async (req, res) => {
|
|
| 462 |
// }
|
| 463 |
// })
|
| 464 |
|
| 465 |
-
|
|
|
|
| 13 |
const cors = require("cors")
|
| 14 |
const prisma = new PrismaClient()
|
| 15 |
const app = express()
|
| 16 |
+
const http = require('http');
|
| 17 |
+
const server = http.createServer(app);
|
| 18 |
+
const { Server } = require("socket.io");
|
| 19 |
+
const { type } = require('os');
|
| 20 |
+
const io = new Server(server, {
|
| 21 |
+
maxHttpBufferSize: 1e8
|
| 22 |
+
});
|
| 23 |
+
|
| 24 |
const SALT = process.env.PRIVATE_KEY
|
| 25 |
|
| 26 |
const queueFileUpload = {}
|
|
|
|
| 35 |
//* Sussy bigint thing
|
| 36 |
BigInt.prototype["toJSON"] = function () {
|
| 37 |
return this.toString();
|
| 38 |
+
};
|
| 39 |
|
| 40 |
//* Safe Base64 Encode
|
| 41 |
const safeb64 = (str) => {
|
|
|
|
| 44 |
|
| 45 |
const generateJWT = async (id) => {
|
| 46 |
const header = {
|
| 47 |
+
"alg": "SHA256QUANVN",
|
| 48 |
"typ": "JWT"
|
| 49 |
}
|
| 50 |
|
|
|
|
| 72 |
return token + "." + safeb64(sig)
|
| 73 |
}
|
| 74 |
|
| 75 |
+
const generateFileID = () => {
|
| 76 |
+
const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
| 77 |
+
let fileID = '';
|
| 78 |
+
for (let i = 0; i < 6; i++) {
|
| 79 |
+
fileID += characters.charAt(Math.floor(Math.random() * characters.length));
|
| 80 |
+
}
|
| 81 |
+
return fileID;
|
| 82 |
+
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
// Configure Multer storage
|
| 86 |
const storage = multer.diskStorage({
|
| 87 |
destination: (req, file, cb) => {
|
| 88 |
cb(null, 'uploads/');
|
| 89 |
},
|
| 90 |
filename: (req, file, cb) => {
|
| 91 |
+
// cb(null, generateFileID() + '-' + Date.now());
|
| 92 |
cb(null, file.originalname);
|
| 93 |
}
|
| 94 |
});
|
|
|
|
| 113 |
}
|
| 114 |
};
|
| 115 |
|
| 116 |
+
// console.log(file)
|
| 117 |
+
|
| 118 |
+
const current_connections = []
|
| 119 |
+
|
| 120 |
+
io.on('connection', (socket) => {
|
| 121 |
+
info('A IPFS Services connected id=' + socket.id);
|
| 122 |
+
|
| 123 |
+
socket.on("availible", () => {
|
| 124 |
+
info("Services id=" + socket.id + " availible")
|
| 125 |
+
current_connections.push(socket.id)
|
| 126 |
+
})
|
| 127 |
+
|
| 128 |
+
const interval = setInterval(() => {
|
| 129 |
+
//* Health check
|
| 130 |
+
info("Send health_check")
|
| 131 |
+
socket.emit("health_check");
|
| 132 |
+
}, 60000)
|
| 133 |
+
|
| 134 |
+
socket.on("health", (data) => {
|
| 135 |
+
info("Services id=" + socket.id + " " + data.healthy + " availible=" + data.availible + " ping=" + Math.abs(Date.now() - (data.now)) + "ms") //* Check if services is healthy
|
| 136 |
+
})
|
| 137 |
+
|
| 138 |
+
socket.on("unavailible", () => {
|
| 139 |
+
info("Services id=" + socket.id + " unavailible")
|
| 140 |
+
for(let i = 0; i < current_connections.length; i++) {
|
| 141 |
+
if(current_connections[i] === socket.id) {
|
| 142 |
+
current_connections.splice(i, 1);
|
| 143 |
+
break;
|
| 144 |
+
}
|
| 145 |
+
}
|
| 146 |
+
})
|
| 147 |
+
|
| 148 |
+
socket.on("delete", async (data) => {
|
| 149 |
+
info("File Successfully uploaded, writing record")
|
| 150 |
+
console.log(data) //* The data is comsumed by the IPFS services
|
| 151 |
+
|
| 152 |
+
try {
|
| 153 |
+
await prisma.storage.create({
|
| 154 |
+
data: {
|
| 155 |
+
handle: data.handle,
|
| 156 |
+
username: data.username,
|
| 157 |
+
CID: data.ipfs[0].Hash,
|
| 158 |
+
dir: data.directory
|
| 159 |
+
}
|
| 160 |
+
})
|
| 161 |
+
} catch (e) {
|
| 162 |
+
warn("Creating record fail")
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
//* Remove the initial file
|
| 166 |
+
fs.unlinkSync("uploads/" + data.relative_path)
|
| 167 |
+
info(`File ${data.relative_path} deleted`)
|
| 168 |
+
})
|
| 169 |
+
|
| 170 |
+
socket.on('disconnect', () => {
|
| 171 |
+
info('A IPFS Services disconnected');
|
| 172 |
+
clearInterval(interval)
|
| 173 |
+
//* Removing services when disconnected (died)
|
| 174 |
+
for(let i = 0; i < current_connections.length; i++) {
|
| 175 |
+
if(current_connections[i] === socket.id) {
|
| 176 |
+
current_connections.splice(i, 1);
|
| 177 |
+
break;
|
| 178 |
+
}
|
| 179 |
+
}
|
| 180 |
+
});
|
| 181 |
+
});
|
| 182 |
+
|
| 183 |
+
|
| 184 |
app.use(cors({
|
| 185 |
origin: "*"
|
| 186 |
}))
|
|
|
|
| 189 |
|
| 190 |
app.use(statusMonitor);
|
| 191 |
|
| 192 |
+
app.use('/upload_queue' ,express.static("uploads"))
|
| 193 |
|
| 194 |
+
app.get('/bee3hivestatuspagethatnoonewillrememberthisurl', statusMonitor.pageRoute)
|
| 195 |
|
| 196 |
app.post("/auth/email/register", async (req, res) => {
|
| 197 |
let { username, email, password } = req.body;
|
|
|
|
| 411 |
}
|
| 412 |
})
|
| 413 |
|
| 414 |
+
app.post('/file/upload', upload.single('file'), async (req, res) => {
|
| 415 |
+
const upload_path = req.file.path;
|
| 416 |
|
| 417 |
+
const file_path = req.body.filePath;
|
| 418 |
+
const full_file_path = req.user.username + (file_path ? ("/" + file_path) : "");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 419 |
|
| 420 |
+
try {
|
| 421 |
+
// Upload the file to another backend
|
| 422 |
+
const random_client = Math.floor(Math.random() * current_connections.length);
|
| 423 |
+
const client = current_connections[random_client];
|
| 424 |
+
|
| 425 |
+
io.to(client).emit("fetch", {
|
| 426 |
+
filename: req.file.filename,
|
| 427 |
+
directory: full_file_path,
|
| 428 |
+
username: req.user.username,
|
| 429 |
+
fileURI: req.file.filename //* Prod: with timeframe
|
| 430 |
+
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 431 |
|
| 432 |
+
// Remove the file after upload
|
| 433 |
+
info("File uploaded queued successfully: " + full_file_path)
|
| 434 |
+
res.send('File uploaded queued.');
|
| 435 |
+
} catch (error) {
|
| 436 |
+
// Fail to upload
|
| 437 |
+
warn("File upload failed")
|
| 438 |
+
console.log(error)
|
| 439 |
+
res.status(500).send('File upload failed.');
|
| 440 |
+
}
|
| 441 |
+
})
|
| 442 |
|
| 443 |
// app.get("/file/status", async (req, res) => {
|
| 444 |
// res.send(queueFileUpload[req.user.username])
|
|
|
|
| 514 |
// }
|
| 515 |
// })
|
| 516 |
|
| 517 |
+
server.listen(7860, () => info('Server started on port 7860'))
|
package-lock.json
CHANGED
|
@@ -16,6 +16,7 @@
|
|
| 16 |
"express-status-monitor": "^1.3.4",
|
| 17 |
"multer": "^1.4.5-lts.1",
|
| 18 |
"sha256quanvn": "^1.0.2",
|
|
|
|
| 19 |
"stream-to-blob": "^2.0.1"
|
| 20 |
},
|
| 21 |
"devDependencies": {
|
|
@@ -101,6 +102,32 @@
|
|
| 101 |
"@prisma/debug": "5.18.0"
|
| 102 |
}
|
| 103 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
"node_modules/accepts": {
|
| 105 |
"version": "1.3.8",
|
| 106 |
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
|
@@ -368,19 +395,23 @@
|
|
| 368 |
}
|
| 369 |
},
|
| 370 |
"node_modules/engine.io": {
|
| 371 |
-
"version": "
|
| 372 |
-
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-
|
| 373 |
-
"integrity": "sha512-
|
| 374 |
"dependencies": {
|
|
|
|
|
|
|
|
|
|
| 375 |
"accepts": "~1.3.4",
|
| 376 |
"base64id": "2.0.0",
|
| 377 |
"cookie": "~0.4.1",
|
| 378 |
-
"
|
| 379 |
-
"
|
| 380 |
-
"
|
|
|
|
| 381 |
},
|
| 382 |
"engines": {
|
| 383 |
-
"node": ">=
|
| 384 |
}
|
| 385 |
},
|
| 386 |
"node_modules/engine.io-client": {
|
|
@@ -409,7 +440,7 @@
|
|
| 409 |
"ms": "2.0.0"
|
| 410 |
}
|
| 411 |
},
|
| 412 |
-
"node_modules/engine.io-parser": {
|
| 413 |
"version": "2.2.1",
|
| 414 |
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz",
|
| 415 |
"integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==",
|
|
@@ -421,6 +452,34 @@
|
|
| 421 |
"has-binary2": "~1.0.2"
|
| 422 |
}
|
| 423 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 424 |
"node_modules/engine.io/node_modules/cookie": {
|
| 425 |
"version": "0.4.2",
|
| 426 |
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
|
|
@@ -430,18 +489,25 @@
|
|
| 430 |
}
|
| 431 |
},
|
| 432 |
"node_modules/engine.io/node_modules/debug": {
|
| 433 |
-
"version": "4.
|
| 434 |
-
"resolved": "https://registry.npmjs.org/debug/-/debug-4.
|
| 435 |
-
"integrity": "sha512-
|
| 436 |
-
"deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
|
| 437 |
"dependencies": {
|
| 438 |
-
"ms": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 439 |
}
|
| 440 |
},
|
| 441 |
"node_modules/engine.io/node_modules/ms": {
|
| 442 |
-
"version": "2.1.
|
| 443 |
-
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.
|
| 444 |
-
"integrity": "sha512-
|
| 445 |
},
|
| 446 |
"node_modules/es-define-property": {
|
| 447 |
"version": "1.0.0",
|
|
@@ -552,6 +618,19 @@
|
|
| 552 |
"event-loop-stats": "1.2.0"
|
| 553 |
}
|
| 554 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 555 |
"node_modules/express-status-monitor/node_modules/debug": {
|
| 556 |
"version": "4.1.1",
|
| 557 |
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
|
@@ -561,11 +640,95 @@
|
|
| 561 |
"ms": "^2.1.1"
|
| 562 |
}
|
| 563 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 564 |
"node_modules/express-status-monitor/node_modules/ms": {
|
| 565 |
"version": "2.1.3",
|
| 566 |
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 567 |
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
| 568 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 569 |
"node_modules/finalhandler": {
|
| 570 |
"version": "1.2.0",
|
| 571 |
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
|
@@ -1175,22 +1338,51 @@
|
|
| 1175 |
}
|
| 1176 |
},
|
| 1177 |
"node_modules/socket.io": {
|
| 1178 |
-
"version": "
|
| 1179 |
-
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-
|
| 1180 |
-
"integrity": "sha512-
|
| 1181 |
"dependencies": {
|
| 1182 |
-
"
|
| 1183 |
-
"
|
| 1184 |
-
"
|
| 1185 |
-
"
|
| 1186 |
-
"
|
| 1187 |
-
"socket.io-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1188 |
}
|
| 1189 |
},
|
| 1190 |
"node_modules/socket.io-adapter": {
|
| 1191 |
-
"version": "
|
| 1192 |
-
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-
|
| 1193 |
-
"integrity": "sha512-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1194 |
},
|
| 1195 |
"node_modules/socket.io-client": {
|
| 1196 |
"version": "2.5.0",
|
|
@@ -1234,55 +1426,58 @@
|
|
| 1234 |
}
|
| 1235 |
},
|
| 1236 |
"node_modules/socket.io-parser": {
|
| 1237 |
-
"version": "
|
| 1238 |
-
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-
|
| 1239 |
-
"integrity": "sha512
|
| 1240 |
"dependencies": {
|
| 1241 |
-
"component-emitter": "1.
|
| 1242 |
-
"debug": "~4.1
|
| 1243 |
-
"isarray": "2.0.1"
|
| 1244 |
},
|
| 1245 |
"engines": {
|
| 1246 |
"node": ">=10.0.0"
|
| 1247 |
}
|
| 1248 |
},
|
| 1249 |
-
"node_modules/socket.io-parser/node_modules/component-emitter": {
|
| 1250 |
-
"version": "1.2.1",
|
| 1251 |
-
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
|
| 1252 |
-
"integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA=="
|
| 1253 |
-
},
|
| 1254 |
"node_modules/socket.io-parser/node_modules/debug": {
|
| 1255 |
-
"version": "4.
|
| 1256 |
-
"resolved": "https://registry.npmjs.org/debug/-/debug-4.
|
| 1257 |
-
"integrity": "sha512-
|
| 1258 |
-
"deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
|
| 1259 |
"dependencies": {
|
| 1260 |
-
"ms": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1261 |
}
|
| 1262 |
},
|
| 1263 |
-
"node_modules/socket.io-parser/node_modules/isarray": {
|
| 1264 |
-
"version": "2.0.1",
|
| 1265 |
-
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
|
| 1266 |
-
"integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ=="
|
| 1267 |
-
},
|
| 1268 |
"node_modules/socket.io-parser/node_modules/ms": {
|
| 1269 |
-
"version": "2.1.
|
| 1270 |
-
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.
|
| 1271 |
-
"integrity": "sha512-
|
| 1272 |
},
|
| 1273 |
"node_modules/socket.io/node_modules/debug": {
|
| 1274 |
-
"version": "4.
|
| 1275 |
-
"resolved": "https://registry.npmjs.org/debug/-/debug-4.
|
| 1276 |
-
"integrity": "sha512-
|
| 1277 |
-
"deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)",
|
| 1278 |
"dependencies": {
|
| 1279 |
-
"ms": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1280 |
}
|
| 1281 |
},
|
| 1282 |
"node_modules/socket.io/node_modules/ms": {
|
| 1283 |
-
"version": "2.1.
|
| 1284 |
-
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.
|
| 1285 |
-
"integrity": "sha512-
|
| 1286 |
},
|
| 1287 |
"node_modules/source-map": {
|
| 1288 |
"version": "0.6.1",
|
|
@@ -1385,6 +1580,11 @@
|
|
| 1385 |
"node": ">=0.8.0"
|
| 1386 |
}
|
| 1387 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1388 |
"node_modules/unpipe": {
|
| 1389 |
"version": "1.0.0",
|
| 1390 |
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
|
@@ -1420,15 +1620,15 @@
|
|
| 1420 |
"integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q=="
|
| 1421 |
},
|
| 1422 |
"node_modules/ws": {
|
| 1423 |
-
"version": "
|
| 1424 |
-
"resolved": "https://registry.npmjs.org/ws/-/ws-
|
| 1425 |
-
"integrity": "sha512
|
| 1426 |
"engines": {
|
| 1427 |
-
"node": ">=
|
| 1428 |
},
|
| 1429 |
"peerDependencies": {
|
| 1430 |
"bufferutil": "^4.0.1",
|
| 1431 |
-
"utf-8-validate": "
|
| 1432 |
},
|
| 1433 |
"peerDependenciesMeta": {
|
| 1434 |
"bufferutil": {
|
|
|
|
| 16 |
"express-status-monitor": "^1.3.4",
|
| 17 |
"multer": "^1.4.5-lts.1",
|
| 18 |
"sha256quanvn": "^1.0.2",
|
| 19 |
+
"socket.io": "^4.7.5",
|
| 20 |
"stream-to-blob": "^2.0.1"
|
| 21 |
},
|
| 22 |
"devDependencies": {
|
|
|
|
| 102 |
"@prisma/debug": "5.18.0"
|
| 103 |
}
|
| 104 |
},
|
| 105 |
+
"node_modules/@socket.io/component-emitter": {
|
| 106 |
+
"version": "3.1.2",
|
| 107 |
+
"resolved": "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz",
|
| 108 |
+
"integrity": "sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA=="
|
| 109 |
+
},
|
| 110 |
+
"node_modules/@types/cookie": {
|
| 111 |
+
"version": "0.4.1",
|
| 112 |
+
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz",
|
| 113 |
+
"integrity": "sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q=="
|
| 114 |
+
},
|
| 115 |
+
"node_modules/@types/cors": {
|
| 116 |
+
"version": "2.8.17",
|
| 117 |
+
"resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz",
|
| 118 |
+
"integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==",
|
| 119 |
+
"dependencies": {
|
| 120 |
+
"@types/node": "*"
|
| 121 |
+
}
|
| 122 |
+
},
|
| 123 |
+
"node_modules/@types/node": {
|
| 124 |
+
"version": "22.5.0",
|
| 125 |
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.0.tgz",
|
| 126 |
+
"integrity": "sha512-DkFrJOe+rfdHTqqMg0bSNlGlQ85hSoh2TPzZyhHsXnMtligRWpxUySiyw8FY14ITt24HVCiQPWxS3KO/QlGmWg==",
|
| 127 |
+
"dependencies": {
|
| 128 |
+
"undici-types": "~6.19.2"
|
| 129 |
+
}
|
| 130 |
+
},
|
| 131 |
"node_modules/accepts": {
|
| 132 |
"version": "1.3.8",
|
| 133 |
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
|
|
|
| 395 |
}
|
| 396 |
},
|
| 397 |
"node_modules/engine.io": {
|
| 398 |
+
"version": "6.5.5",
|
| 399 |
+
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-6.5.5.tgz",
|
| 400 |
+
"integrity": "sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA==",
|
| 401 |
"dependencies": {
|
| 402 |
+
"@types/cookie": "^0.4.1",
|
| 403 |
+
"@types/cors": "^2.8.12",
|
| 404 |
+
"@types/node": ">=10.0.0",
|
| 405 |
"accepts": "~1.3.4",
|
| 406 |
"base64id": "2.0.0",
|
| 407 |
"cookie": "~0.4.1",
|
| 408 |
+
"cors": "~2.8.5",
|
| 409 |
+
"debug": "~4.3.1",
|
| 410 |
+
"engine.io-parser": "~5.2.1",
|
| 411 |
+
"ws": "~8.17.1"
|
| 412 |
},
|
| 413 |
"engines": {
|
| 414 |
+
"node": ">=10.2.0"
|
| 415 |
}
|
| 416 |
},
|
| 417 |
"node_modules/engine.io-client": {
|
|
|
|
| 440 |
"ms": "2.0.0"
|
| 441 |
}
|
| 442 |
},
|
| 443 |
+
"node_modules/engine.io-client/node_modules/engine.io-parser": {
|
| 444 |
"version": "2.2.1",
|
| 445 |
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz",
|
| 446 |
"integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==",
|
|
|
|
| 452 |
"has-binary2": "~1.0.2"
|
| 453 |
}
|
| 454 |
},
|
| 455 |
+
"node_modules/engine.io-client/node_modules/ws": {
|
| 456 |
+
"version": "7.5.10",
|
| 457 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
|
| 458 |
+
"integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
|
| 459 |
+
"engines": {
|
| 460 |
+
"node": ">=8.3.0"
|
| 461 |
+
},
|
| 462 |
+
"peerDependencies": {
|
| 463 |
+
"bufferutil": "^4.0.1",
|
| 464 |
+
"utf-8-validate": "^5.0.2"
|
| 465 |
+
},
|
| 466 |
+
"peerDependenciesMeta": {
|
| 467 |
+
"bufferutil": {
|
| 468 |
+
"optional": true
|
| 469 |
+
},
|
| 470 |
+
"utf-8-validate": {
|
| 471 |
+
"optional": true
|
| 472 |
+
}
|
| 473 |
+
}
|
| 474 |
+
},
|
| 475 |
+
"node_modules/engine.io-parser": {
|
| 476 |
+
"version": "5.2.3",
|
| 477 |
+
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.2.3.tgz",
|
| 478 |
+
"integrity": "sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==",
|
| 479 |
+
"engines": {
|
| 480 |
+
"node": ">=10.0.0"
|
| 481 |
+
}
|
| 482 |
+
},
|
| 483 |
"node_modules/engine.io/node_modules/cookie": {
|
| 484 |
"version": "0.4.2",
|
| 485 |
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
|
|
|
|
| 489 |
}
|
| 490 |
},
|
| 491 |
"node_modules/engine.io/node_modules/debug": {
|
| 492 |
+
"version": "4.3.6",
|
| 493 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
|
| 494 |
+
"integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
|
|
|
|
| 495 |
"dependencies": {
|
| 496 |
+
"ms": "2.1.2"
|
| 497 |
+
},
|
| 498 |
+
"engines": {
|
| 499 |
+
"node": ">=6.0"
|
| 500 |
+
},
|
| 501 |
+
"peerDependenciesMeta": {
|
| 502 |
+
"supports-color": {
|
| 503 |
+
"optional": true
|
| 504 |
+
}
|
| 505 |
}
|
| 506 |
},
|
| 507 |
"node_modules/engine.io/node_modules/ms": {
|
| 508 |
+
"version": "2.1.2",
|
| 509 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
| 510 |
+
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
| 511 |
},
|
| 512 |
"node_modules/es-define-property": {
|
| 513 |
"version": "1.0.0",
|
|
|
|
| 618 |
"event-loop-stats": "1.2.0"
|
| 619 |
}
|
| 620 |
},
|
| 621 |
+
"node_modules/express-status-monitor/node_modules/component-emitter": {
|
| 622 |
+
"version": "1.2.1",
|
| 623 |
+
"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz",
|
| 624 |
+
"integrity": "sha512-jPatnhd33viNplKjqXKRkGU345p263OIWzDL2wH3LGIGp5Kojo+uXizHmOADRvhGFFTnJqX3jBAKP6vvmSDKcA=="
|
| 625 |
+
},
|
| 626 |
+
"node_modules/express-status-monitor/node_modules/cookie": {
|
| 627 |
+
"version": "0.4.2",
|
| 628 |
+
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
|
| 629 |
+
"integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==",
|
| 630 |
+
"engines": {
|
| 631 |
+
"node": ">= 0.6"
|
| 632 |
+
}
|
| 633 |
+
},
|
| 634 |
"node_modules/express-status-monitor/node_modules/debug": {
|
| 635 |
"version": "4.1.1",
|
| 636 |
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
|
|
|
| 640 |
"ms": "^2.1.1"
|
| 641 |
}
|
| 642 |
},
|
| 643 |
+
"node_modules/express-status-monitor/node_modules/engine.io": {
|
| 644 |
+
"version": "3.6.2",
|
| 645 |
+
"resolved": "https://registry.npmjs.org/engine.io/-/engine.io-3.6.2.tgz",
|
| 646 |
+
"integrity": "sha512-C4JjGQZLY3kWlIDx0BQNKizbrfpb7NahxDztGdN5jrPK2ghmXiNDN+E/t0JzDeNRZxPVaszxEng42Pmj27X/0w==",
|
| 647 |
+
"dependencies": {
|
| 648 |
+
"accepts": "~1.3.4",
|
| 649 |
+
"base64id": "2.0.0",
|
| 650 |
+
"cookie": "~0.4.1",
|
| 651 |
+
"debug": "~4.1.0",
|
| 652 |
+
"engine.io-parser": "~2.2.0",
|
| 653 |
+
"ws": "~7.5.10"
|
| 654 |
+
},
|
| 655 |
+
"engines": {
|
| 656 |
+
"node": ">=8.0.0"
|
| 657 |
+
}
|
| 658 |
+
},
|
| 659 |
+
"node_modules/express-status-monitor/node_modules/engine.io-parser": {
|
| 660 |
+
"version": "2.2.1",
|
| 661 |
+
"resolved": "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-2.2.1.tgz",
|
| 662 |
+
"integrity": "sha512-x+dN/fBH8Ro8TFwJ+rkB2AmuVw9Yu2mockR/p3W8f8YtExwFgDvBDi0GWyb4ZLkpahtDGZgtr3zLovanJghPqg==",
|
| 663 |
+
"dependencies": {
|
| 664 |
+
"after": "0.8.2",
|
| 665 |
+
"arraybuffer.slice": "~0.0.7",
|
| 666 |
+
"base64-arraybuffer": "0.1.4",
|
| 667 |
+
"blob": "0.0.5",
|
| 668 |
+
"has-binary2": "~1.0.2"
|
| 669 |
+
}
|
| 670 |
+
},
|
| 671 |
+
"node_modules/express-status-monitor/node_modules/isarray": {
|
| 672 |
+
"version": "2.0.1",
|
| 673 |
+
"resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.1.tgz",
|
| 674 |
+
"integrity": "sha512-c2cu3UxbI+b6kR3fy0nRnAhodsvR9dx7U5+znCOzdj6IfP3upFURTr0Xl5BlQZNKZjEtxrmVyfSdeE3O57smoQ=="
|
| 675 |
+
},
|
| 676 |
"node_modules/express-status-monitor/node_modules/ms": {
|
| 677 |
"version": "2.1.3",
|
| 678 |
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
| 679 |
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
| 680 |
},
|
| 681 |
+
"node_modules/express-status-monitor/node_modules/socket.io": {
|
| 682 |
+
"version": "2.5.1",
|
| 683 |
+
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-2.5.1.tgz",
|
| 684 |
+
"integrity": "sha512-eaTE4tBKRD6RFoetquMbxgvcpvoDtRyIlkIMI/SMK2bsKvbENTsDeeu4GJ/z9c90yOWxB7b/eC+yKLPbHnH6bA==",
|
| 685 |
+
"dependencies": {
|
| 686 |
+
"debug": "~4.1.0",
|
| 687 |
+
"engine.io": "~3.6.0",
|
| 688 |
+
"has-binary2": "~1.0.2",
|
| 689 |
+
"socket.io-adapter": "~1.1.0",
|
| 690 |
+
"socket.io-client": "2.5.0",
|
| 691 |
+
"socket.io-parser": "~3.4.0"
|
| 692 |
+
}
|
| 693 |
+
},
|
| 694 |
+
"node_modules/express-status-monitor/node_modules/socket.io-adapter": {
|
| 695 |
+
"version": "1.1.2",
|
| 696 |
+
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-1.1.2.tgz",
|
| 697 |
+
"integrity": "sha512-WzZRUj1kUjrTIrUKpZLEzFZ1OLj5FwLlAFQs9kuZJzJi5DKdU7FsWc36SNmA8iDOtwBQyT8FkrriRM8vXLYz8g=="
|
| 698 |
+
},
|
| 699 |
+
"node_modules/express-status-monitor/node_modules/socket.io-parser": {
|
| 700 |
+
"version": "3.4.3",
|
| 701 |
+
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.4.3.tgz",
|
| 702 |
+
"integrity": "sha512-1rE4dZN3kCI/E5wixd393hmbqa78vVpkKmnEJhLeWoS/C5hbFYAbcSfnWoaVH43u9ToUVtzKjguxEZq+1XZfCQ==",
|
| 703 |
+
"dependencies": {
|
| 704 |
+
"component-emitter": "1.2.1",
|
| 705 |
+
"debug": "~4.1.0",
|
| 706 |
+
"isarray": "2.0.1"
|
| 707 |
+
},
|
| 708 |
+
"engines": {
|
| 709 |
+
"node": ">=10.0.0"
|
| 710 |
+
}
|
| 711 |
+
},
|
| 712 |
+
"node_modules/express-status-monitor/node_modules/ws": {
|
| 713 |
+
"version": "7.5.10",
|
| 714 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz",
|
| 715 |
+
"integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==",
|
| 716 |
+
"engines": {
|
| 717 |
+
"node": ">=8.3.0"
|
| 718 |
+
},
|
| 719 |
+
"peerDependencies": {
|
| 720 |
+
"bufferutil": "^4.0.1",
|
| 721 |
+
"utf-8-validate": "^5.0.2"
|
| 722 |
+
},
|
| 723 |
+
"peerDependenciesMeta": {
|
| 724 |
+
"bufferutil": {
|
| 725 |
+
"optional": true
|
| 726 |
+
},
|
| 727 |
+
"utf-8-validate": {
|
| 728 |
+
"optional": true
|
| 729 |
+
}
|
| 730 |
+
}
|
| 731 |
+
},
|
| 732 |
"node_modules/finalhandler": {
|
| 733 |
"version": "1.2.0",
|
| 734 |
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz",
|
|
|
|
| 1338 |
}
|
| 1339 |
},
|
| 1340 |
"node_modules/socket.io": {
|
| 1341 |
+
"version": "4.7.5",
|
| 1342 |
+
"resolved": "https://registry.npmjs.org/socket.io/-/socket.io-4.7.5.tgz",
|
| 1343 |
+
"integrity": "sha512-DmeAkF6cwM9jSfmp6Dr/5/mfMwb5Z5qRrSXLpo3Fq5SqyU8CMF15jIN4ZhfSwu35ksM1qmHZDQ/DK5XTccSTvA==",
|
| 1344 |
"dependencies": {
|
| 1345 |
+
"accepts": "~1.3.4",
|
| 1346 |
+
"base64id": "~2.0.0",
|
| 1347 |
+
"cors": "~2.8.5",
|
| 1348 |
+
"debug": "~4.3.2",
|
| 1349 |
+
"engine.io": "~6.5.2",
|
| 1350 |
+
"socket.io-adapter": "~2.5.2",
|
| 1351 |
+
"socket.io-parser": "~4.2.4"
|
| 1352 |
+
},
|
| 1353 |
+
"engines": {
|
| 1354 |
+
"node": ">=10.2.0"
|
| 1355 |
}
|
| 1356 |
},
|
| 1357 |
"node_modules/socket.io-adapter": {
|
| 1358 |
+
"version": "2.5.5",
|
| 1359 |
+
"resolved": "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.5.5.tgz",
|
| 1360 |
+
"integrity": "sha512-eLDQas5dzPgOWCk9GuuJC2lBqItuhKI4uxGgo9aIV7MYbk2h9Q6uULEh8WBzThoI7l+qU9Ast9fVUmkqPP9wYg==",
|
| 1361 |
+
"dependencies": {
|
| 1362 |
+
"debug": "~4.3.4",
|
| 1363 |
+
"ws": "~8.17.1"
|
| 1364 |
+
}
|
| 1365 |
+
},
|
| 1366 |
+
"node_modules/socket.io-adapter/node_modules/debug": {
|
| 1367 |
+
"version": "4.3.6",
|
| 1368 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
|
| 1369 |
+
"integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
|
| 1370 |
+
"dependencies": {
|
| 1371 |
+
"ms": "2.1.2"
|
| 1372 |
+
},
|
| 1373 |
+
"engines": {
|
| 1374 |
+
"node": ">=6.0"
|
| 1375 |
+
},
|
| 1376 |
+
"peerDependenciesMeta": {
|
| 1377 |
+
"supports-color": {
|
| 1378 |
+
"optional": true
|
| 1379 |
+
}
|
| 1380 |
+
}
|
| 1381 |
+
},
|
| 1382 |
+
"node_modules/socket.io-adapter/node_modules/ms": {
|
| 1383 |
+
"version": "2.1.2",
|
| 1384 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
| 1385 |
+
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
| 1386 |
},
|
| 1387 |
"node_modules/socket.io-client": {
|
| 1388 |
"version": "2.5.0",
|
|
|
|
| 1426 |
}
|
| 1427 |
},
|
| 1428 |
"node_modules/socket.io-parser": {
|
| 1429 |
+
"version": "4.2.4",
|
| 1430 |
+
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.4.tgz",
|
| 1431 |
+
"integrity": "sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==",
|
| 1432 |
"dependencies": {
|
| 1433 |
+
"@socket.io/component-emitter": "~3.1.0",
|
| 1434 |
+
"debug": "~4.3.1"
|
|
|
|
| 1435 |
},
|
| 1436 |
"engines": {
|
| 1437 |
"node": ">=10.0.0"
|
| 1438 |
}
|
| 1439 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1440 |
"node_modules/socket.io-parser/node_modules/debug": {
|
| 1441 |
+
"version": "4.3.6",
|
| 1442 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
|
| 1443 |
+
"integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
|
|
|
|
| 1444 |
"dependencies": {
|
| 1445 |
+
"ms": "2.1.2"
|
| 1446 |
+
},
|
| 1447 |
+
"engines": {
|
| 1448 |
+
"node": ">=6.0"
|
| 1449 |
+
},
|
| 1450 |
+
"peerDependenciesMeta": {
|
| 1451 |
+
"supports-color": {
|
| 1452 |
+
"optional": true
|
| 1453 |
+
}
|
| 1454 |
}
|
| 1455 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1456 |
"node_modules/socket.io-parser/node_modules/ms": {
|
| 1457 |
+
"version": "2.1.2",
|
| 1458 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
| 1459 |
+
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
| 1460 |
},
|
| 1461 |
"node_modules/socket.io/node_modules/debug": {
|
| 1462 |
+
"version": "4.3.6",
|
| 1463 |
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.6.tgz",
|
| 1464 |
+
"integrity": "sha512-O/09Bd4Z1fBrU4VzkhFqVgpPzaGbw6Sm9FEkBT1A/YBXQFGuuSxa1dN2nxgxS34JmKXqYx8CZAwEVoJFImUXIg==",
|
|
|
|
| 1465 |
"dependencies": {
|
| 1466 |
+
"ms": "2.1.2"
|
| 1467 |
+
},
|
| 1468 |
+
"engines": {
|
| 1469 |
+
"node": ">=6.0"
|
| 1470 |
+
},
|
| 1471 |
+
"peerDependenciesMeta": {
|
| 1472 |
+
"supports-color": {
|
| 1473 |
+
"optional": true
|
| 1474 |
+
}
|
| 1475 |
}
|
| 1476 |
},
|
| 1477 |
"node_modules/socket.io/node_modules/ms": {
|
| 1478 |
+
"version": "2.1.2",
|
| 1479 |
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
| 1480 |
+
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
| 1481 |
},
|
| 1482 |
"node_modules/source-map": {
|
| 1483 |
"version": "0.6.1",
|
|
|
|
| 1580 |
"node": ">=0.8.0"
|
| 1581 |
}
|
| 1582 |
},
|
| 1583 |
+
"node_modules/undici-types": {
|
| 1584 |
+
"version": "6.19.8",
|
| 1585 |
+
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
|
| 1586 |
+
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="
|
| 1587 |
+
},
|
| 1588 |
"node_modules/unpipe": {
|
| 1589 |
"version": "1.0.0",
|
| 1590 |
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
|
|
|
| 1620 |
"integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q=="
|
| 1621 |
},
|
| 1622 |
"node_modules/ws": {
|
| 1623 |
+
"version": "8.17.1",
|
| 1624 |
+
"resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",
|
| 1625 |
+
"integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",
|
| 1626 |
"engines": {
|
| 1627 |
+
"node": ">=10.0.0"
|
| 1628 |
},
|
| 1629 |
"peerDependencies": {
|
| 1630 |
"bufferutil": "^4.0.1",
|
| 1631 |
+
"utf-8-validate": ">=5.0.2"
|
| 1632 |
},
|
| 1633 |
"peerDependenciesMeta": {
|
| 1634 |
"bufferutil": {
|
package.json
CHANGED
|
@@ -17,6 +17,7 @@
|
|
| 17 |
"express-status-monitor": "^1.3.4",
|
| 18 |
"multer": "^1.4.5-lts.1",
|
| 19 |
"sha256quanvn": "^1.0.2",
|
|
|
|
| 20 |
"stream-to-blob": "^2.0.1"
|
| 21 |
},
|
| 22 |
"devDependencies": {
|
|
|
|
| 17 |
"express-status-monitor": "^1.3.4",
|
| 18 |
"multer": "^1.4.5-lts.1",
|
| 19 |
"sha256quanvn": "^1.0.2",
|
| 20 |
+
"socket.io": "^4.7.5",
|
| 21 |
"stream-to-blob": "^2.0.1"
|
| 22 |
},
|
| 23 |
"devDependencies": {
|
prisma/schema.prisma
CHANGED
|
@@ -18,3 +18,14 @@ model Users {
|
|
| 18 |
phone String?
|
| 19 |
last_login DateTime? @db.Time(6)
|
| 20 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
phone String?
|
| 19 |
last_login DateTime? @db.Time(6)
|
| 20 |
}
|
| 21 |
+
|
| 22 |
+
/// This model or at least one of its fields has comments in the database, and requires an additional setup for migrations: Read more: https://pris.ly/d/database-comments
|
| 23 |
+
/// This model contains row level security and requires additional setup for migrations. Visit https://pris.ly/d/row-level-security for more info.
|
| 24 |
+
model Storage {
|
| 25 |
+
id BigInt @id @default(autoincrement())
|
| 26 |
+
created_at DateTime @default(now()) @db.Timestamptz(6)
|
| 27 |
+
CID String @unique @default("CID")
|
| 28 |
+
username String
|
| 29 |
+
handle String
|
| 30 |
+
dir String? @default("/")
|
| 31 |
+
}
|
test.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
lol
|
uploads/Waterxtest.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9db1781ab02687e4da0e3918b77d311a17869ab4a882a42e761ed7b6d67eed9c
|
| 3 |
+
size 84280
|