aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers
diff options
context:
space:
mode:
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)