aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-03-11 16:54:52 +0100
committerChocobozzz <me@florianbigard.com>2021-03-24 18:18:41 +0100
commit32a18cbf33a7cdbbe3d4885d32e4b67e19cdc1cf (patch)
tree1db53245688a6b7839cab00f9d65e6c1c1774b00 /server/helpers
parent3fbc6974334ca58c068f0f9def0b0a40db2a6de1 (diff)
downloadPeerTube-32a18cbf33a7cdbbe3d4885d32e4b67e19cdc1cf.tar.gz
PeerTube-32a18cbf33a7cdbbe3d4885d32e4b67e19cdc1cf.tar.zst
PeerTube-32a18cbf33a7cdbbe3d4885d32e4b67e19cdc1cf.zip
Add new plugin/peertube version notifs
Diffstat (limited to 'server/helpers')
-rw-r--r--server/helpers/core-utils.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts
index ceb6a341d..0bd84ffaa 100644
--- a/server/helpers/core-utils.ts
+++ b/server/helpers/core-utils.ts
@@ -251,6 +251,7 @@ function promisify2<T, U, A> (func: (arg1: T, arg2: U, cb: (err: any, result: A)
251 } 251 }
252} 252}
253 253
254type SemVersion = { major: number, minor: number, patch: number }
254function parseSemVersion (s: string) { 255function parseSemVersion (s: string) {
255 const parsed = s.match(/^v?(\d+)\.(\d+)\.(\d+)$/i) 256 const parsed = s.match(/^v?(\d+)\.(\d+)\.(\d+)$/i)
256 257
@@ -258,7 +259,7 @@ function parseSemVersion (s: string) {
258 major: parseInt(parsed[1]), 259 major: parseInt(parsed[1]),
259 minor: parseInt(parsed[2]), 260 minor: parseInt(parsed[2]),
260 patch: parseInt(parsed[3]) 261 patch: parseInt(parsed[3])
261 } 262 } as SemVersion
262} 263}
263 264
264const randomBytesPromise = promisify1<number, Buffer>(randomBytes) 265const randomBytesPromise = promisify1<number, Buffer>(randomBytes)