From 7f4f5283eceb38eae42b3111f81688ccd5358934 Mon Sep 17 00:00:00 2001 From: IrosTheBeggar Date: Mon, 31 Jan 2022 01:21:03 -0500 Subject: [PATCH] update dependacies --- package.json | 26 +++++++++++++------------- src/api/file-explorer.js | 11 ++++++----- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index e65deae0..e50dfa70 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,7 @@ "build": { "appId": "io.mstream.server", "productName": "mStream Server", - "electronVersion": "15.0.0", + "electronVersion": "16.0.7", "asar": false, "files": [ "**/*", @@ -90,29 +90,29 @@ }, "dependencies": { "archiver": "^5.3.0", - "axios": "^0.21.4", - "busboy": "^0.3.1", + "axios": "^0.25.0", + "busboy": "^1.4.0", "commander": "^6.2.1", - "cookie-parser": "^1.4.5", - "electron-updater": "^4.3.9", + "cookie-parser": "^1.4.6", + "electron-updater": "^4.6.1", "escape-string-regexp": "^4.0.0", - "express": "^4.17.1", + "express": "^4.17.2", "fast-xml-parser": "^3.20.0", "ffbinaries": "^1.1.4", "fluent-ffmpeg": "^2.1.2", "http-proxy": "^1.18.1", - "joi": "^17.4.2", + "joi": "^17.6.0", "jsonwebtoken": "^8.5.1", "lokijs": "^1.5.12", "m3u8-parser": "^4.7.0", "make-dir": "^3.1.0", - "mime-types": "^2.1.32", - "music-metadata": "^7.11.4", - "nanoid": "^3.1.25", + "mime-types": "^2.1.34", + "music-metadata": "^7.11.7", + "nanoid": "^3.2.0", "tree-kill": "^1.2.2", - "winston": "^3.3.3", - "winston-daily-rotate-file": "^4.5.5", - "ws": "^7.4.6" + "winston": "^3.5.0", + "winston-daily-rotate-file": "^4.6.0", + "ws": "^8.4.2" }, "devDependencies": { "electron-builder": "22.11.7" diff --git a/src/api/file-explorer.js b/src/api/file-explorer.js index bc3c4a79..2374a6aa 100644 --- a/src/api/file-explorer.js +++ b/src/api/file-explorer.js @@ -1,7 +1,7 @@ const path = require('path'); const fs = require('fs').promises; const fsOld = require('fs'); -const Busboy = require("busboy"); +const busboy = require("busboy"); const Joi = require('joi'); const mkdirp = require('make-dir'); const winston = require('winston'); @@ -106,15 +106,16 @@ exports.setup = (mstream) => { const pathInfo = vpath.getVPathInfo(decodeURI(req.headers['data-location']), req.user); mkdirp.sync(pathInfo.fullPath); - const busboy = new Busboy({ headers: req.headers }); - busboy.on('file', (fieldname, file, filename, encoding, mimetype) => { + const bb = busboy({ headers: req.headers }); + bb.on('file', (fieldname, file, info) => { + const { filename } = info; const saveTo = path.join(pathInfo.fullPath, filename); winston.info(`Uploading from ${req.user.username} to: ${saveTo}`); file.pipe(fsOld.createWriteStream(saveTo)); }); - busboy.on('finish', () => { res.json({}); }); - req.pipe(busboy); + bb.on('close', () => { res.json({}); }); + req.pipe(bb); }); mstream.post("/api/v1/file-explorer/m3u", async (req, res) => {