Skip to content

Commit beab01b

Browse files
committed
formatter
1 parent 4302bb1 commit beab01b

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

packages/server/package.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@
88
"bugs": "https://github.com/tus/tus-node-server/issues",
99
"repository": "tus/tus-node-server",
1010
"license": "MIT",
11-
"files": [
12-
"README.md",
13-
"LICENSE",
14-
"dist",
15-
"src"
16-
],
11+
"files": ["README.md", "LICENSE", "dist", "src"],
1712
"scripts": {
1813
"build": "tsc --build",
1914
"test": "mocha --timeout 40000 --exit --extension ts --require ts-node/register"

packages/utils/src/kvstores/IoRedisKvStore.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
import type {Redis as IoRedis} from "ioredis"
1+
import type {Redis as IoRedis} from 'ioredis'
32
import type {KvStore} from './Types'
43
import type {Upload} from '../models'
54

@@ -30,12 +29,18 @@ export class IoRedisKvStore<T = Upload> implements KvStore<T> {
3029

3130
async list(): Promise<Array<string>> {
3231
const keys = new Set<string>()
33-
let cursor = "0"
32+
let cursor = '0'
3433
do {
35-
const [next, batch] = await this.redis.scan(cursor, "MATCH", this.prefixed("*"), "COUNT", "20")
34+
const [next, batch] = await this.redis.scan(
35+
cursor,
36+
'MATCH',
37+
this.prefixed('*'),
38+
'COUNT',
39+
'20'
40+
)
3641
cursor = next
3742
for (const key of batch) keys.add(key)
38-
} while (cursor !== "0")
43+
} while (cursor !== '0')
3944
return Array.from(keys)
4045
}
4146

@@ -47,5 +52,3 @@ export class IoRedisKvStore<T = Upload> implements KvStore<T> {
4752
return buffer ? JSON.parse(buffer) : undefined
4853
}
4954
}
50-
51-

packages/utils/src/kvstores/RedisKvStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class RedisKvStore<T = Upload> implements KvStore<T> {
3232
const keys = new Set<string>()
3333
let cursor = 0
3434
do {
35-
const result = await this.redis.scan(cursor, { MATCH: `${this.prefix}*`, COUNT: 20 })
35+
const result = await this.redis.scan(cursor, {MATCH: `${this.prefix}*`, COUNT: 20})
3636
cursor = result.cursor
3737
for (const key of result.keys) keys.add(key)
3838
} while (cursor !== 0)

0 commit comments

Comments
 (0)