fix dependecies

This commit is contained in:
Hongbo Wu
2023-06-23 13:33:38 +08:00
parent 716fdf9a61
commit e2b66be75d
4 changed files with 9 additions and 58 deletions

View File

@ -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"
}

View File

@ -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: {

View File

@ -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