1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Add new plugin/peertube version notifs

This commit is contained in:
Chocobozzz 2021-03-11 16:54:52 +01:00
parent 3fbc697433
commit 32a18cbf33
No known key found for this signature in database
GPG key ID: 583A612D890159BE
44 changed files with 808 additions and 37 deletions

View file

@ -251,6 +251,7 @@ function promisify2<T, U, A> (func: (arg1: T, arg2: U, cb: (err: any, result: A)
}
}
type SemVersion = { major: number, minor: number, patch: number }
function parseSemVersion (s: string) {
const parsed = s.match(/^v?(\d+)\.(\d+)\.(\d+)$/i)
@ -258,7 +259,7 @@ function parseSemVersion (s: string) {
major: parseInt(parsed[1]),
minor: parseInt(parsed[2]),
patch: parseInt(parsed[3])
}
} as SemVersion
}
const randomBytesPromise = promisify1<number, Buffer>(randomBytes)