Update babel

This commit is contained in:
Evert Prants 2019-12-16 21:24:44 +02:00
parent 55eb1c76c5
commit 5b5414a189
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
4 changed files with 12 additions and 21 deletions

View File

@ -1,14 +1,3 @@
{ {
"presets": [ "presets": ["@babel/preset-env"]
"env",
"stage-0"
],
"plugins": [
"transform-class-properties",
"transform-decorators",
["transform-runtime", {
"polyfill": false,
"regenerator": true
}]
]
} }

View File

@ -1,18 +1,18 @@
{ {
"name": "btrtracks", "name": "btrtracks",
"version": "1.0.0", "version": "1.0.1",
"main": "server.js", "main": "server.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"build": "babel src -d dist", "build": "babel --plugins @babel/plugin-transform-runtime src -d dist",
"start": "node dist/server.js", "start": "node dist/server.js",
"download": "node dist/download.js", "download": "node dist/download.js",
"populate": "node dist/dbpopulate.js" "populate": "node dist/dbpopulate.js"
}, },
"private": true, "private": true,
"dependencies": { "dependencies": {
"babel-plugin-transform-runtime": "^6.23.0", "@babel/runtime": "^7.7.6",
"bcrypt": "^3.0.6", "bcrypt": "^3.0.7",
"bluebird": "^3.5.2", "bluebird": "^3.5.2",
"connect-redis": "^3.4.1", "connect-redis": "^3.4.1",
"express": "^4.16.3", "express": "^4.16.3",
@ -23,11 +23,13 @@
"oauth-libre": "^0.9.17", "oauth-libre": "^0.9.17",
"socket.io": "^2.1.1", "socket.io": "^2.1.1",
"sqlite": "^3.0.2", "sqlite": "^3.0.2",
"sqlite3": "^4.0.6" "sqlite3": "^4.1.1"
}, },
"devDependencies": { "devDependencies": {
"babel-core": "^6.26.3", "@babel/cli": "^7.7.5",
"babel-env": "^2.4.1", "@babel/core": "^7.7.5",
"@babel/plugin-transform-runtime": "^7.7.6",
"@babel/preset-env": "^7.7.6",
"morgan": "^1.9.1" "morgan": "^1.9.1"
} }
} }

View File

@ -367,8 +367,7 @@
clear.style.display = 'none' clear.style.display = 'none'
} }
if (page > pages) return if (page > pages) page = pages
if (page < 1) return
updatePaging() updatePaging()
if (playlist === 0) { if (playlist === 0) {

View File

@ -215,6 +215,7 @@ router.get('/serve/by-id/:id', userMiddleware, async (req, res, next) => {
lastfm.invokeDownload(id) lastfm.invokeDownload(id)
return res.end('<p>OK</p><script>window.close();</script>') return res.end('<p>OK</p><script>window.close();</script>')
} }
dev && console.log("Remote", track.file)
return ffmpeg(track.file) return ffmpeg(track.file)
.audioCodec('libmp3lame') .audioCodec('libmp3lame')
.format('mp3') .format('mp3')