Upgrade server dependencies

pull/1913/head
Chocobozzz 2019-06-06 15:39:11 +02:00
parent ad3405d087
commit 6091983127
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
6 changed files with 756 additions and 704 deletions

View File

@ -93,9 +93,9 @@
}, },
"dependencies": { "dependencies": {
"apicache": "^1.4.0", "apicache": "^1.4.0",
"async": "^2.0.0", "async": "^3.0.1",
"async-lru": "^1.1.1", "async-lru": "^1.1.1",
"bcrypt": "3.0.5", "bcrypt": "3.0.6",
"bittorrent-tracker": "^9.0.0", "bittorrent-tracker": "^9.0.0",
"bluebird": "^3.5.0", "bluebird": "^3.5.0",
"body-parser": "^1.12.4", "body-parser": "^1.12.4",
@ -110,14 +110,14 @@
"deep-object-diff": "^1.1.0", "deep-object-diff": "^1.1.0",
"express": "^4.12.4", "express": "^4.12.4",
"express-oauth-server": "^2.0.0", "express-oauth-server": "^2.0.0",
"express-rate-limit": "^3.1.0", "express-rate-limit": "^4.0.4",
"express-validator": "^5.0.0", "express-validator": "^5.0.0",
"flat": "^4.1.0", "flat": "^4.1.0",
"fluent-ffmpeg": "^2.1.0", "fluent-ffmpeg": "^2.1.0",
"fs-extra": "^7.0.0", "fs-extra": "^8.0.1",
"helmet": "^3.12.1", "helmet": "^3.12.1",
"http-signature": "^1.2.0", "http-signature": "^1.2.0",
"ip-anonymize": "^0.0.6", "ip-anonymize": "^0.1.0",
"ipaddr.js": "1.9.0", "ipaddr.js": "1.9.0",
"is-cidr": "^3.0.0", "is-cidr": "^3.0.0",
"iso-639-3": "^1.0.1", "iso-639-3": "^1.0.1",
@ -141,7 +141,7 @@
"reflect-metadata": "^0.1.12", "reflect-metadata": "^0.1.12",
"request": "^2.81.0", "request": "^2.81.0",
"scripty": "^1.5.0", "scripty": "^1.5.0",
"sequelize": "5.7.4", "sequelize": "5.8.7",
"sequelize-typescript": "1.0.0-beta.2", "sequelize-typescript": "1.0.0-beta.2",
"sharp": "^0.22.0", "sharp": "^0.22.0",
"sitemap": "^2.1.0", "sitemap": "^2.1.0",
@ -149,16 +149,16 @@
"srt-to-vtt": "^1.1.2", "srt-to-vtt": "^1.1.2",
"useragent": "^2.3.0", "useragent": "^2.3.0",
"uuid": "^3.1.0", "uuid": "^3.1.0",
"validator": "^10.2.0", "validator": "^11.0.0",
"webfinger.js": "^2.6.6", "webfinger.js": "^2.6.6",
"webtorrent": "^0.103.0", "webtorrent": "^0.103.0",
"winston": "3.2.1", "winston": "3.2.1",
"ws": "^6.0.0", "ws": "^7.0.0",
"youtube-dl": "^1.12.2" "youtube-dl": "^2.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/apicache": "^1.2.0", "@types/apicache": "^1.2.0",
"@types/async": "^2.0.40", "@types/async": "^3.0.0",
"@types/async-lock": "^1.1.0", "@types/async-lock": "^1.1.0",
"@types/bcrypt": "^3.0.0", "@types/bcrypt": "^3.0.0",
"@types/bluebird": "3.5.21", "@types/bluebird": "3.5.21",
@ -172,7 +172,7 @@
"@types/express": "^4.0.35", "@types/express": "^4.0.35",
"@types/express-rate-limit": "^3.3.0", "@types/express-rate-limit": "^3.3.0",
"@types/fluent-ffmpeg": "^2.1.8", "@types/fluent-ffmpeg": "^2.1.8",
"@types/fs-extra": "^5.0.4", "@types/fs-extra": "^7.0.0",
"@types/libxmljs": "^0.18.0", "@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",
@ -183,7 +183,7 @@
"@types/morgan": "^1.7.32", "@types/morgan": "^1.7.32",
"@types/multer": "^1.3.3", "@types/multer": "^1.3.3",
"@types/node": "^10.0.8", "@types/node": "^10.0.8",
"@types/nodemailer": "^4.3.1", "@types/nodemailer": "^6.2.0",
"@types/oauth2-server": "^3.0.8", "@types/oauth2-server": "^3.0.8",
"@types/pem": "^1.9.3", "@types/pem": "^1.9.3",
"@types/redis": "^2.8.5", "@types/redis": "^2.8.5",
@ -198,11 +198,11 @@
"chai-json-schema": "^1.5.0", "chai-json-schema": "^1.5.0",
"chai-xml": "^0.3.2", "chai-xml": "^0.3.2",
"concurrently": "^4.1.0", "concurrently": "^4.1.0",
"husky": "^1.0.0-rc.4", "husky": "^2.4.0",
"libxmljs": "0.19.5", "libxmljs": "0.19.5",
"lint-staged": "^8.0.4", "lint-staged": "^8.0.4",
"maildev": "^1.0.0-rc3", "maildev": "^1.0.0-rc3",
"marked-man": "^0.4.2", "marked-man": "^0.6.0",
"mocha": "^6.0.0", "mocha": "^6.0.0",
"mocha-parallel-tests": "^2.1.0", "mocha-parallel-tests": "^2.1.0",
"nodemon": "^1.18.6", "nodemon": "^1.18.6",
@ -210,7 +210,7 @@
"source-map-support": "^0.5.0", "source-map-support": "^0.5.0",
"supertest": "^4.0.2", "supertest": "^4.0.2",
"swagger-cli": "^2.2.0", "swagger-cli": "^2.2.0",
"ts-node": "8.0.3", "ts-node": "8.2.0",
"tslint": "^5.7.0", "tslint": "^5.7.0",
"tslint-config-standard": "^8.0.1", "tslint-config-standard": "^8.0.1",
"typescript": "^3.4.3", "typescript": "^3.4.3",

View File

@ -50,11 +50,14 @@ import { UserRegister } from '../../../../shared/models/users/user-register.mode
const auditLogger = auditLoggerFactory('users') const auditLogger = auditLoggerFactory('users')
const loginRateLimiter = new RateLimit({ // FIXME: https://github.com/nfriedly/express-rate-limit/issues/138
// @ts-ignore
const loginRateLimiter = RateLimit({
windowMs: RATES_LIMIT.LOGIN.WINDOW_MS, windowMs: RATES_LIMIT.LOGIN.WINDOW_MS,
max: RATES_LIMIT.LOGIN.MAX max: RATES_LIMIT.LOGIN.MAX
}) })
// @ts-ignore
const askSendEmailLimiter = new RateLimit({ const askSendEmailLimiter = new RateLimit({
windowMs: RATES_LIMIT.ASK_SEND_EMAIL.WINDOW_MS, windowMs: RATES_LIMIT.ASK_SEND_EMAIL.WINDOW_MS,
max: RATES_LIMIT.ASK_SEND_EMAIL.MAX max: RATES_LIMIT.ASK_SEND_EMAIL.MAX

View File

@ -6,9 +6,11 @@ import { immutableAssign } from '../miscs/miscs'
function searchVideo (url: string, search: string) { function searchVideo (url: string, search: string) {
const path = '/api/v1/search/videos' const path = '/api/v1/search/videos'
const query = { sort: '-publishedAt', search: search }
const req = request(url) const req = request(url)
.get(path) .get(path)
.query({ sort: '-publishedAt', search }) .query(query)
.set('Accept', 'application/json') .set('Accept', 'application/json')
return req.expect(200) return req.expect(200)
@ -30,11 +32,15 @@ function searchVideoWithToken (url: string, search: string, token: string, query
function searchVideoWithPagination (url: string, search: string, start: number, count: number, sort?: string) { function searchVideoWithPagination (url: string, search: string, start: number, count: number, sort?: string) {
const path = '/api/v1/search/videos' const path = '/api/v1/search/videos'
const query = {
start,
search,
count
}
const req = request(url) const req = request(url)
.get(path) .get(path)
.query({ start }) .query(query)
.query({ search })
.query({ count })
if (sort) req.query({ sort }) if (sort) req.query({ sort })
@ -46,10 +52,11 @@ function searchVideoWithPagination (url: string, search: string, start: number,
function searchVideoWithSort (url: string, search: string, sort: string) { function searchVideoWithSort (url: string, search: string, sort: string) {
const path = '/api/v1/search/videos' const path = '/api/v1/search/videos'
const query = { search, sort }
return request(url) return request(url)
.get(path) .get(path)
.query({ search }) .query(query)
.query({ sort })
.set('Accept', 'application/json') .set('Accept', 'application/json')
.expect(200) .expect(200)
.expect('Content-Type', /json/) .expect('Content-Type', /json/)

View File

@ -6,12 +6,16 @@ import { makePostBodyRequest } from '../requests/requests'
function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) {
const path = '/api/v1/server/followers' const path = '/api/v1/server/followers'
const query = {
start,
count,
sort,
search
}
return request(url) return request(url)
.get(path) .get(path)
.query({ start }) .query(query)
.query({ count })
.query({ sort })
.query({ search })
.set('Accept', 'application/json') .set('Accept', 'application/json')
.expect(200) .expect(200)
.expect('Content-Type', /json/) .expect('Content-Type', /json/)
@ -42,12 +46,16 @@ function rejectFollower (url: string, token: string, follower: string, statusCod
function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) { function getFollowingListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) {
const path = '/api/v1/server/following' const path = '/api/v1/server/following'
const query = {
start,
count,
sort,
search
}
return request(url) return request(url)
.get(path) .get(path)
.query({ start }) .query(query)
.query({ count })
.query({ sort })
.query({ search })
.set('Accept', 'application/json') .set('Accept', 'application/json')
.expect(200) .expect(200)
.expect('Content-Type', /json/) .expect('Content-Type', /json/)

View File

@ -160,12 +160,16 @@ function getUsersList (url: string, accessToken: string) {
function getUsersListPaginationAndSort (url: string, accessToken: string, start: number, count: number, sort: string, search?: string) { function getUsersListPaginationAndSort (url: string, accessToken: string, start: number, count: number, sort: string, search?: string) {
const path = '/api/v1/users' const path = '/api/v1/users'
const query = {
start,
count,
sort,
search
}
return request(url) return request(url)
.get(path) .get(path)
.query({ start }) .query(query)
.query({ count })
.query({ sort })
.query({ search })
.set('Accept', 'application/json') .set('Accept', 'application/json')
.set('Authorization', 'Bearer ' + accessToken) .set('Authorization', 'Bearer ' + accessToken)
.expect(200) .expect(200)

1370
yarn.lock

File diff suppressed because it is too large Load Diff