mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-08-17 17:30:32 +03:00
Upgrade server dependencies
This commit is contained in:
parent
ad3405d087
commit
6091983127
30
package.json
30
package.json
@ -93,9 +93,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"apicache": "^1.4.0",
|
||||
"async": "^2.0.0",
|
||||
"async": "^3.0.1",
|
||||
"async-lru": "^1.1.1",
|
||||
"bcrypt": "3.0.5",
|
||||
"bcrypt": "3.0.6",
|
||||
"bittorrent-tracker": "^9.0.0",
|
||||
"bluebird": "^3.5.0",
|
||||
"body-parser": "^1.12.4",
|
||||
@ -110,14 +110,14 @@
|
||||
"deep-object-diff": "^1.1.0",
|
||||
"express": "^4.12.4",
|
||||
"express-oauth-server": "^2.0.0",
|
||||
"express-rate-limit": "^3.1.0",
|
||||
"express-rate-limit": "^4.0.4",
|
||||
"express-validator": "^5.0.0",
|
||||
"flat": "^4.1.0",
|
||||
"fluent-ffmpeg": "^2.1.0",
|
||||
"fs-extra": "^7.0.0",
|
||||
"fs-extra": "^8.0.1",
|
||||
"helmet": "^3.12.1",
|
||||
"http-signature": "^1.2.0",
|
||||
"ip-anonymize": "^0.0.6",
|
||||
"ip-anonymize": "^0.1.0",
|
||||
"ipaddr.js": "1.9.0",
|
||||
"is-cidr": "^3.0.0",
|
||||
"iso-639-3": "^1.0.1",
|
||||
@ -141,7 +141,7 @@
|
||||
"reflect-metadata": "^0.1.12",
|
||||
"request": "^2.81.0",
|
||||
"scripty": "^1.5.0",
|
||||
"sequelize": "5.7.4",
|
||||
"sequelize": "5.8.7",
|
||||
"sequelize-typescript": "1.0.0-beta.2",
|
||||
"sharp": "^0.22.0",
|
||||
"sitemap": "^2.1.0",
|
||||
@ -149,16 +149,16 @@
|
||||
"srt-to-vtt": "^1.1.2",
|
||||
"useragent": "^2.3.0",
|
||||
"uuid": "^3.1.0",
|
||||
"validator": "^10.2.0",
|
||||
"validator": "^11.0.0",
|
||||
"webfinger.js": "^2.6.6",
|
||||
"webtorrent": "^0.103.0",
|
||||
"winston": "3.2.1",
|
||||
"ws": "^6.0.0",
|
||||
"youtube-dl": "^1.12.2"
|
||||
"ws": "^7.0.0",
|
||||
"youtube-dl": "^2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/apicache": "^1.2.0",
|
||||
"@types/async": "^2.0.40",
|
||||
"@types/async": "^3.0.0",
|
||||
"@types/async-lock": "^1.1.0",
|
||||
"@types/bcrypt": "^3.0.0",
|
||||
"@types/bluebird": "3.5.21",
|
||||
@ -172,7 +172,7 @@
|
||||
"@types/express": "^4.0.35",
|
||||
"@types/express-rate-limit": "^3.3.0",
|
||||
"@types/fluent-ffmpeg": "^2.1.8",
|
||||
"@types/fs-extra": "^5.0.4",
|
||||
"@types/fs-extra": "^7.0.0",
|
||||
"@types/libxmljs": "^0.18.0",
|
||||
"@types/lodash": "^4.14.64",
|
||||
"@types/magnet-uri": "^5.1.1",
|
||||
@ -183,7 +183,7 @@
|
||||
"@types/morgan": "^1.7.32",
|
||||
"@types/multer": "^1.3.3",
|
||||
"@types/node": "^10.0.8",
|
||||
"@types/nodemailer": "^4.3.1",
|
||||
"@types/nodemailer": "^6.2.0",
|
||||
"@types/oauth2-server": "^3.0.8",
|
||||
"@types/pem": "^1.9.3",
|
||||
"@types/redis": "^2.8.5",
|
||||
@ -198,11 +198,11 @@
|
||||
"chai-json-schema": "^1.5.0",
|
||||
"chai-xml": "^0.3.2",
|
||||
"concurrently": "^4.1.0",
|
||||
"husky": "^1.0.0-rc.4",
|
||||
"husky": "^2.4.0",
|
||||
"libxmljs": "0.19.5",
|
||||
"lint-staged": "^8.0.4",
|
||||
"maildev": "^1.0.0-rc3",
|
||||
"marked-man": "^0.4.2",
|
||||
"marked-man": "^0.6.0",
|
||||
"mocha": "^6.0.0",
|
||||
"mocha-parallel-tests": "^2.1.0",
|
||||
"nodemon": "^1.18.6",
|
||||
@ -210,7 +210,7 @@
|
||||
"source-map-support": "^0.5.0",
|
||||
"supertest": "^4.0.2",
|
||||
"swagger-cli": "^2.2.0",
|
||||
"ts-node": "8.0.3",
|
||||
"ts-node": "8.2.0",
|
||||
"tslint": "^5.7.0",
|
||||
"tslint-config-standard": "^8.0.1",
|
||||
"typescript": "^3.4.3",
|
||||
|
@ -50,11 +50,14 @@ import { UserRegister } from '../../../../shared/models/users/user-register.mode
|
||||
|
||||
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,
|
||||
max: RATES_LIMIT.LOGIN.MAX
|
||||
})
|
||||
|
||||
// @ts-ignore
|
||||
const askSendEmailLimiter = new RateLimit({
|
||||
windowMs: RATES_LIMIT.ASK_SEND_EMAIL.WINDOW_MS,
|
||||
max: RATES_LIMIT.ASK_SEND_EMAIL.MAX
|
||||
|
@ -6,9 +6,11 @@ import { immutableAssign } from '../miscs/miscs'
|
||||
|
||||
function searchVideo (url: string, search: string) {
|
||||
const path = '/api/v1/search/videos'
|
||||
|
||||
const query = { sort: '-publishedAt', search: search }
|
||||
const req = request(url)
|
||||
.get(path)
|
||||
.query({ sort: '-publishedAt', search })
|
||||
.query(query)
|
||||
.set('Accept', 'application/json')
|
||||
|
||||
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) {
|
||||
const path = '/api/v1/search/videos'
|
||||
|
||||
const query = {
|
||||
start,
|
||||
search,
|
||||
count
|
||||
}
|
||||
|
||||
const req = request(url)
|
||||
.get(path)
|
||||
.query({ start })
|
||||
.query({ search })
|
||||
.query({ count })
|
||||
.query(query)
|
||||
|
||||
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) {
|
||||
const path = '/api/v1/search/videos'
|
||||
|
||||
const query = { search, sort }
|
||||
|
||||
return request(url)
|
||||
.get(path)
|
||||
.query({ search })
|
||||
.query({ sort })
|
||||
.query(query)
|
||||
.set('Accept', 'application/json')
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/)
|
||||
|
@ -6,12 +6,16 @@ import { makePostBodyRequest } from '../requests/requests'
|
||||
function getFollowersListPaginationAndSort (url: string, start: number, count: number, sort: string, search?: string) {
|
||||
const path = '/api/v1/server/followers'
|
||||
|
||||
const query = {
|
||||
start,
|
||||
count,
|
||||
sort,
|
||||
search
|
||||
}
|
||||
|
||||
return request(url)
|
||||
.get(path)
|
||||
.query({ start })
|
||||
.query({ count })
|
||||
.query({ sort })
|
||||
.query({ search })
|
||||
.query(query)
|
||||
.set('Accept', 'application/json')
|
||||
.expect(200)
|
||||
.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) {
|
||||
const path = '/api/v1/server/following'
|
||||
|
||||
const query = {
|
||||
start,
|
||||
count,
|
||||
sort,
|
||||
search
|
||||
}
|
||||
|
||||
return request(url)
|
||||
.get(path)
|
||||
.query({ start })
|
||||
.query({ count })
|
||||
.query({ sort })
|
||||
.query({ search })
|
||||
.query(query)
|
||||
.set('Accept', 'application/json')
|
||||
.expect(200)
|
||||
.expect('Content-Type', /json/)
|
||||
|
@ -160,12 +160,16 @@ function getUsersList (url: string, accessToken: string) {
|
||||
function getUsersListPaginationAndSort (url: string, accessToken: string, start: number, count: number, sort: string, search?: string) {
|
||||
const path = '/api/v1/users'
|
||||
|
||||
const query = {
|
||||
start,
|
||||
count,
|
||||
sort,
|
||||
search
|
||||
}
|
||||
|
||||
return request(url)
|
||||
.get(path)
|
||||
.query({ start })
|
||||
.query({ count })
|
||||
.query({ sort })
|
||||
.query({ search })
|
||||
.query(query)
|
||||
.set('Accept', 'application/json')
|
||||
.set('Authorization', 'Bearer ' + accessToken)
|
||||
.expect(200)
|
||||
|
Loading…
Reference in New Issue
Block a user