mirror of https://github.com/Chocobozzz/PeerTube
Update server dependencies
parent
4adebd513e
commit
d96994289b
|
@ -64,6 +64,8 @@
|
|||
}
|
||||
],
|
||||
|
||||
"@typescript-eslint/return-await": "off",
|
||||
"@typescript-eslint/no-base-to-string": "off",
|
||||
"@typescript-eslint/quotes": "off",
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"@typescript-eslint/explicit-function-return-type": "off",
|
||||
|
|
26
package.json
26
package.json
|
@ -86,13 +86,13 @@
|
|||
"apicache": "^1.4.0",
|
||||
"async": "^3.0.1",
|
||||
"async-lru": "^1.1.1",
|
||||
"bcrypt": "4.0.0",
|
||||
"bcrypt": "4.0.1",
|
||||
"bittorrent-tracker": "^9.0.0",
|
||||
"bluebird": "^3.5.0",
|
||||
"body-parser": "^1.12.4",
|
||||
"bull": "^3.4.2",
|
||||
"bytes": "^3.0.0",
|
||||
"commander": "^4.0.1",
|
||||
"commander": "^5.0.0",
|
||||
"config": "^3.0.0",
|
||||
"cookie-parser": "^1.4.3",
|
||||
"cors": "^2.8.1",
|
||||
|
@ -104,7 +104,7 @@
|
|||
"express-validator": "^6.4.0",
|
||||
"flat": "^5.0.0",
|
||||
"fluent-ffmpeg": "^2.1.0",
|
||||
"fs-extra": "^8.0.1",
|
||||
"fs-extra": "^9.0.0",
|
||||
"helmet": "^3.12.1",
|
||||
"http-signature": "1.3.2",
|
||||
"ip-anonymize": "^0.1.0",
|
||||
|
@ -112,7 +112,7 @@
|
|||
"is-cidr": "^3.0.0",
|
||||
"iso-639-3": "^2.0.0",
|
||||
"js-yaml": "^3.5.4",
|
||||
"jsonld": "~2.0.1",
|
||||
"jsonld": "~3.0.1",
|
||||
"lodash": "^4.17.10",
|
||||
"lru-cache": "^5.1.1",
|
||||
"magnet-uri": "^5.1.4",
|
||||
|
@ -130,17 +130,17 @@
|
|||
"redis": "^3.0.2",
|
||||
"reflect-metadata": "^0.1.12",
|
||||
"request": "^2.81.0",
|
||||
"scripty": "^1.5.0",
|
||||
"scripty": "^2.0.0",
|
||||
"sequelize": "5.21.5",
|
||||
"sequelize-typescript": "^1.0.0-beta.4",
|
||||
"sharp": "^0.24.0",
|
||||
"sitemap": "^5.0.0",
|
||||
"sharp": "^0.25.2",
|
||||
"sitemap": "^6.1.0",
|
||||
"socket.io": "^2.2.0",
|
||||
"srt-to-vtt": "^1.1.2",
|
||||
"tsconfig-paths": "^3.9.0",
|
||||
"useragent": "^2.3.0",
|
||||
"uuid": "^7.0.1",
|
||||
"validator": "^12.1.0",
|
||||
"validator": "^13.0.0",
|
||||
"webfinger.js": "^2.6.6",
|
||||
"webtorrent": "^0.107.16",
|
||||
"winston": "3.2.1",
|
||||
|
@ -148,12 +148,12 @@
|
|||
"youtube-dl": "^3.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openapitools/openapi-generator-cli": "^1.0.10-4.2.3",
|
||||
"@openapitools/openapi-generator-cli": "^1.0.12-4.3.0",
|
||||
"@types/apicache": "^1.2.0",
|
||||
"@types/async": "^3.0.0",
|
||||
"@types/async-lock": "^1.1.0",
|
||||
"@types/bcrypt": "^3.0.0",
|
||||
"@types/bluebird": "3.5.29",
|
||||
"@types/bluebird": "3.5.30",
|
||||
"@types/body-parser": "^1.16.3",
|
||||
"@types/bull": "3.12.1",
|
||||
"@types/bytes": "^3.0.0",
|
||||
|
@ -193,7 +193,7 @@
|
|||
"chai-xml": "^0.3.2",
|
||||
"concurrently": "^5.0.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-standard-with-typescript": "^14.0.0",
|
||||
"eslint-config-standard-with-typescript": "^15.0.1",
|
||||
"eslint-plugin-import": "^2.20.1",
|
||||
"eslint-plugin-node": "^11.0.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
|
@ -207,8 +207,8 @@
|
|||
"nodemon": "^2.0.1",
|
||||
"source-map-support": "^0.5.0",
|
||||
"supertest": "^4.0.2",
|
||||
"swagger-cli": "^3.0.1",
|
||||
"ts-node": "8.6.2",
|
||||
"swagger-cli": "^4.0.2",
|
||||
"ts-node": "8.8.1",
|
||||
"typescript": "^3.7.2"
|
||||
},
|
||||
"scripty": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as express from 'express'
|
||||
import { asyncMiddleware } from '../middlewares'
|
||||
import { ROUTE_CACHE_LIFETIME, WEBSERVER } from '../initializers/constants'
|
||||
import * as sitemapModule from 'sitemap'
|
||||
import { SitemapStream, streamToPromise } from 'sitemap'
|
||||
import { VideoModel } from '../models/video/video'
|
||||
import { VideoChannelModel } from '../models/video/video-channel'
|
||||
import { AccountModel } from '../models/account/account'
|
||||
|
@ -33,12 +33,14 @@ async function getSitemap (req: express.Request, res: express.Response) {
|
|||
urls = urls.concat(await getSitemapVideoChannelUrls())
|
||||
urls = urls.concat(await getSitemapAccountUrls())
|
||||
|
||||
const sitemap = sitemapModule.createSitemap({
|
||||
hostname: WEBSERVER.URL,
|
||||
urls: urls
|
||||
})
|
||||
const sitemapStream = new SitemapStream({ hostname: WEBSERVER.URL })
|
||||
|
||||
const xml = sitemap.toXML()
|
||||
for (const url of urls) {
|
||||
sitemapStream.write({ url })
|
||||
}
|
||||
sitemapStream.end()
|
||||
|
||||
const xml = await streamToPromise(sitemapStream)
|
||||
|
||||
res.header('Content-Type', 'application/xml')
|
||||
res.send(xml)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{"ngccVersion":"9.1.0","configFileHash":"87c535c3ce0eac2a54c246892e0e21a1","lockFileHash":"d04bf20520f2518af162e882d32081e4","entryPointPaths":[]}
|
|
@ -12,7 +12,7 @@ class MockSmtpServer {
|
|||
private constructor () {
|
||||
this.emailChildProcess = fork(`${__dirname}/email-child-process`, [])
|
||||
|
||||
this.emailChildProcess.on('message', (msg) => {
|
||||
this.emailChildProcess.on('message', (msg: any) => {
|
||||
if (msg.email) {
|
||||
return this.emails.push(msg.email)
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ class MockSmtpServer {
|
|||
this.emailChildProcess.on('exit', () => {
|
||||
return rej(new Error('maildev exited unexpectedly, confirm port not in use'))
|
||||
})
|
||||
this.emailChildProcess.on('message', (msg) => {
|
||||
this.emailChildProcess.on('message', (msg: any) => {
|
||||
if (msg.err) {
|
||||
return rej(new Error(msg.err))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue