chore: Upgrade socket.io (#3697)
* Upgrade wip * tsc * tsc * fix: Missing authenticated message
This commit is contained in:
2
server/typings/index.d.ts
vendored
2
server/typings/index.d.ts
vendored
@@ -6,8 +6,6 @@ declare module "styled-components-breakpoint";
|
||||
|
||||
declare module "formidable/lib/file";
|
||||
|
||||
declare module "socket.io-client";
|
||||
|
||||
declare module "oy-vey";
|
||||
|
||||
declare module "fetch-test-server";
|
||||
|
||||
28
server/typings/socketio-auth.d.ts
vendored
28
server/typings/socketio-auth.d.ts
vendored
@@ -1,28 +0,0 @@
|
||||
declare module "socketio-auth" {
|
||||
import IO from "socket.io";
|
||||
|
||||
type AuthenticatedSocket = IO.Socket & {
|
||||
client: IO.Client & {
|
||||
user: any;
|
||||
};
|
||||
};
|
||||
|
||||
type AuthenticateCallback = (
|
||||
socket: AuthenticatedSocket,
|
||||
data: { token: string },
|
||||
callback: (err: Error | null, allow: boolean) => void
|
||||
) => Promise<void>;
|
||||
|
||||
type PostAuthenticateCallback = (
|
||||
socket: AuthenticatedSocket
|
||||
) => Promise<void>;
|
||||
|
||||
type AuthenticationConfig = {
|
||||
authenticate: AuthenticateCallback;
|
||||
postAuthenticate: PostAuthenticateCallback;
|
||||
};
|
||||
|
||||
const SocketAuth: (io: IO.Server, config: AuthenticationConfig) => void;
|
||||
|
||||
export = SocketAuth;
|
||||
}
|
||||
12
server/typings/socketio-redis.d.ts
vendored
12
server/typings/socketio-redis.d.ts
vendored
@@ -1,12 +0,0 @@
|
||||
declare module "socket.io-redis" {
|
||||
import { Redis } from "ioredis";
|
||||
|
||||
type Config = {
|
||||
pubClient: Redis;
|
||||
subClient: Redis;
|
||||
};
|
||||
|
||||
const socketRedisAdapter: (config: Config) => void;
|
||||
|
||||
export = socketRedisAdapter;
|
||||
}
|
||||
Reference in New Issue
Block a user