Upgrade dependencies

pull/734/head
Chocobozzz 2018-06-26 17:52:14 +02:00
parent 9b67da3d9b
commit 85b4d9c52e
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
4 changed files with 337 additions and 825 deletions

View File

@ -116,13 +116,13 @@
"rimraf": "^2.5.4", "rimraf": "^2.5.4",
"safe-buffer": "^5.0.1", "safe-buffer": "^5.0.1",
"scripty": "^1.5.0", "scripty": "^1.5.0",
"sequelize": "4.37.10", "sequelize": "4.38.0",
"sequelize-typescript": "0.6.5", "sequelize-typescript": "0.6.6-beta.1",
"sharp": "^0.20.0", "sharp": "^0.20.0",
"uuid": "^3.1.0", "uuid": "^3.1.0",
"validator": "^10.2.0", "validator": "^10.2.0",
"webfinger.js": "^2.6.6", "webfinger.js": "^2.6.6",
"winston": "3.0.0-rc1", "winston": "3.0.0",
"ws": "^5.0.0" "ws": "^5.0.0"
}, },
"devDependencies": { "devDependencies": {
@ -137,7 +137,7 @@
"@types/express": "^4.0.35", "@types/express": "^4.0.35",
"@types/express-rate-limit": "^2.9.3", "@types/express-rate-limit": "^2.9.3",
"@types/kue": "^0.11.8", "@types/kue": "^0.11.8",
"@types/libxmljs": "^0.14.31", "@types/libxmljs": "^0.18.0",
"@types/lodash": "^4.14.64", "@types/lodash": "^4.14.64",
"@types/magnet-uri": "^5.1.1", "@types/magnet-uri": "^5.1.1",
"@types/maildev": "^0.0.1", "@types/maildev": "^0.0.1",
@ -165,13 +165,13 @@
"maildev": "^1.0.0-rc3", "maildev": "^1.0.0-rc3",
"mocha": "^5.0.0", "mocha": "^5.0.0",
"nodemon": "^1.11.0", "nodemon": "^1.11.0",
"prettier": "1.13.2", "prettier": "1.13.6",
"prompt": "^1.0.0", "prompt": "^1.0.0",
"sass-lint": "^1.12.1", "sass-lint": "^1.12.1",
"source-map-support": "^0.5.0", "source-map-support": "^0.5.0",
"spectacle-docs": "^1.0.2", "spectacle-docs": "^1.0.2",
"supertest": "^3.0.0", "supertest": "^3.0.0",
"ts-node": "6.0.5", "ts-node": "7.0.0",
"tslint": "^5.7.0", "tslint": "^5.7.0",
"tslint-config-standard": "^7.0.0", "tslint-config-standard": "^7.0.0",
"typescript": "^2.5.2", "typescript": "^2.5.2",

View File

@ -1,5 +1,5 @@
import * as program from 'commander' import * as program from 'commander'
import { createReadStream } from 'fs' import { createReadStream, readdirSync } from 'fs'
import { join } from 'path' import { join } from 'path'
import { createInterface } from 'readline' import { createInterface } from 'readline'
import * as winston from 'winston' import * as winston from 'winston'
@ -29,7 +29,7 @@ const loggerFormat = winston.format.printf((info) => {
return `[${info.label}] ${toTimeFormat(info.timestamp)} ${info.level}: ${info.message}${additionalInfos}` return `[${info.label}] ${toTimeFormat(info.timestamp)} ${info.level}: ${info.message}${additionalInfos}`
}) })
const logger = new winston.createLogger({ const logger = winston.createLogger({
transports: [ transports: [
new winston.transports.Console({ new winston.transports.Console({
level: program['level'] || 'debug', level: program['level'] || 'debug',
@ -52,7 +52,10 @@ const logLevels = {
debug: logger.debug.bind(logger) debug: logger.debug.bind(logger)
} }
const path = join(CONFIG.STORAGE.LOG_DIR, 'peertube.log') const logFiles = readdirSync(CONFIG.STORAGE.LOG_DIR)
const lastLogFile = logFiles[logFiles.length - 1]
const path = join(CONFIG.STORAGE.LOG_DIR, lastLogFile)
console.log('Opening %s.', path) console.log('Opening %s.', path)
const rl = createInterface({ const rl = createInterface({

View File

@ -30,7 +30,6 @@ const consoleLoggerFormat = winston.format.printf(info => {
if (additionalInfos === '{}') additionalInfos = '' if (additionalInfos === '{}') additionalInfos = ''
else additionalInfos = ' ' + additionalInfos else additionalInfos = ' ' + additionalInfos
if (info.message && info.message.stack !== undefined) info.message = info.message.stack
return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}` return `[${info.label}] ${info.timestamp} ${info.level}: ${info.message}${additionalInfos}`
}) })
@ -39,10 +38,6 @@ const jsonLoggerFormat = winston.format.printf(infoArg => {
? Object.assign({}, infoArg, { err: infoArg.err.stack }) ? Object.assign({}, infoArg, { err: infoArg.err.stack })
: infoArg : infoArg
if (infoArg.message && infoArg.message.stack !== undefined) {
info = Object.assign({}, info, { message: infoArg.message.stack })
}
return JSON.stringify(info) return JSON.stringify(info)
}) })
@ -53,7 +48,7 @@ const labelFormatter = winston.format.label({
label label
}) })
const logger = new winston.createLogger({ const logger = winston.createLogger({
level: CONFIG.LOG.LEVEL, level: CONFIG.LOG.LEVEL,
transports: [ transports: [
new winston.transports.File({ new winston.transports.File({
@ -70,7 +65,6 @@ const logger = new winston.createLogger({
}), }),
new winston.transports.Console({ new winston.transports.Console({
handleExceptions: true, handleExceptions: true,
humanReadableUnhandledException: true,
format: winston.format.combine( format: winston.format.combine(
timestampFormatter, timestampFormatter,
winston.format.splat(), winston.format.splat(),

1133
yarn.lock

File diff suppressed because it is too large Load Diff