fix dependecies
This commit is contained in:
@ -35,7 +35,7 @@
|
||||
"lodash": "^4.17.21",
|
||||
"luxon": "^3.0.4",
|
||||
"puppeteer-core": "^19.1.1",
|
||||
"redis": "^4.6.7",
|
||||
"redis": "^4.3.1",
|
||||
"underscore": "^1.13.6",
|
||||
"uuid": "^9.0.0"
|
||||
}
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
import { createClient } from 'redis'
|
||||
|
||||
export const createRedisClient = async (url?: string, cert?: string) => {
|
||||
// explicitly create the return type of RedisClient
|
||||
export type RedisClient = ReturnType<typeof createClient>
|
||||
|
||||
export const createRedisClient = async (
|
||||
url?: string,
|
||||
cert?: string
|
||||
): Promise<RedisClient> => {
|
||||
const redisClient = createClient({
|
||||
url,
|
||||
socket: {
|
||||
|
||||
@ -2,12 +2,8 @@ import axios from 'axios'
|
||||
import { parseHTML } from 'linkedom'
|
||||
import _, { truncate } from 'lodash'
|
||||
import { DateTime } from 'luxon'
|
||||
import { createClient } from 'redis'
|
||||
import { ContentHandler, PreHandleResult } from '../content-handler'
|
||||
import { createRedisClient } from '../redis'
|
||||
|
||||
// explicitly create the return type of RedisClient
|
||||
type RedisClient = ReturnType<typeof createClient>
|
||||
import { createRedisClient, RedisClient } from '../redis'
|
||||
|
||||
interface Tweet {
|
||||
url: string
|
||||
|
||||
Reference in New Issue
Block a user