diff options
author | Chocobozzz <me@florianbigard.com> | 2021-02-03 09:33:05 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-02-03 09:45:08 +0100 |
commit | ba5a8d89bbf049e4afc41543bcc072cccdb02669 (patch) | |
tree | 6cc6b2dca17745cc0824c7ad4515f3bc4883fa4a /server/helpers/core-utils.ts | |
parent | 29f148a61381727a432c22a71c7a2b7cc23d9c9e (diff) | |
download | PeerTube-ba5a8d89bbf049e4afc41543bcc072cccdb02669.tar.gz PeerTube-ba5a8d89bbf049e4afc41543bcc072cccdb02669.tar.zst PeerTube-ba5a8d89bbf049e4afc41543bcc072cccdb02669.zip |
Update server dependencies
Diffstat (limited to 'server/helpers/core-utils.ts')
-rw-r--r-- | server/helpers/core-utils.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts index e1c15a6eb..935fd22d9 100644 --- a/server/helpers/core-utils.ts +++ b/server/helpers/core-utils.ts | |||
@@ -5,12 +5,12 @@ | |||
5 | Useful to avoid circular dependencies. | 5 | Useful to avoid circular dependencies. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | import { createHash, HexBase64Latin1Encoding, randomBytes } from 'crypto' | 8 | import { exec, ExecOptions } from 'child_process' |
9 | import { BinaryToTextEncoding, createHash, randomBytes } from 'crypto' | ||
10 | import { truncate } from 'lodash' | ||
9 | import { basename, isAbsolute, join, resolve } from 'path' | 11 | import { basename, isAbsolute, join, resolve } from 'path' |
10 | import * as pem from 'pem' | 12 | import * as pem from 'pem' |
11 | import { URL } from 'url' | 13 | import { URL } from 'url' |
12 | import { truncate } from 'lodash' | ||
13 | import { exec, ExecOptions } from 'child_process' | ||
14 | 14 | ||
15 | const objectConverter = (oldObject: any, keyConverter: (e: string) => string, valueConverter: (e: any) => any) => { | 15 | const objectConverter = (oldObject: any, keyConverter: (e: string) => string, valueConverter: (e: any) => any) => { |
16 | if (!oldObject || typeof oldObject !== 'object') { | 16 | if (!oldObject || typeof oldObject !== 'object') { |
@@ -205,11 +205,11 @@ function peertubeTruncate (str: string, options: { length: number, separator?: R | |||
205 | return truncate(str, options) | 205 | return truncate(str, options) |
206 | } | 206 | } |
207 | 207 | ||
208 | function sha256 (str: string | Buffer, encoding: HexBase64Latin1Encoding = 'hex') { | 208 | function sha256 (str: string | Buffer, encoding: BinaryToTextEncoding = 'hex') { |
209 | return createHash('sha256').update(str).digest(encoding) | 209 | return createHash('sha256').update(str).digest(encoding) |
210 | } | 210 | } |
211 | 211 | ||
212 | function sha1 (str: string | Buffer, encoding: HexBase64Latin1Encoding = 'hex') { | 212 | function sha1 (str: string | Buffer, encoding: BinaryToTextEncoding = 'hex') { |
213 | return createHash('sha1').update(str).digest(encoding) | 213 | return createHash('sha1').update(str).digest(encoding) |
214 | } | 214 | } |
215 | 215 | ||