fix(core): update
This commit is contained in:
@ -113,7 +113,7 @@ export class Smartsocket {
|
||||
/**
|
||||
* the standard handler for new socket connections
|
||||
*/
|
||||
private async _handleSocketConnection(socketArg: pluginsTyped.socketIo.Socket) {
|
||||
private async _handleSocketConnection(socketArg: SocketIO.Socket) {
|
||||
const socketConnection: SocketConnection = new SocketConnection({
|
||||
alias: undefined,
|
||||
authenticated: false,
|
||||
|
@ -8,7 +8,7 @@ import { SocketRequest, ISocketRequestDataObject } from './smartsocket.classes.s
|
||||
import { SocketRole } from './smartsocket.classes.socketrole';
|
||||
|
||||
// socket.io
|
||||
import * as SocketIO from 'socket.io';
|
||||
import * as pluginsTyped from './smartsocket.pluginstyped';
|
||||
import { SmartsocketClient } from './smartsocket.classes.smartsocketclient';
|
||||
import { logger } from './smartsocket.logging';
|
||||
|
||||
@ -165,7 +165,7 @@ export class SocketConnection {
|
||||
this.socket.on('function', (dataArg: ISocketRequestDataObject<any>) => {
|
||||
// check if requested function is available to the socket's scope
|
||||
// logger.log('info', 'function request received');
|
||||
const referencedFunction: SocketFunction<any> = this.role.allowedFunctions.find(
|
||||
const referencedFunction: SocketFunction<any> = this.role.allowedFunctions.findSync(
|
||||
(socketFunctionArg) => {
|
||||
return socketFunctionArg.name === dataArg.funcCallData.funcName;
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ export class SocketFunction<T extends plugins.typedrequestInterfaces.ITypedReque
|
||||
smartsocketRefArg: Smartsocket | SmartsocketClient,
|
||||
functionNameArg: string
|
||||
): SocketFunction<Q> {
|
||||
return smartsocketRefArg.socketFunctions.find((socketFunctionArg) => {
|
||||
return smartsocketRefArg.socketFunctions.findSync((socketFunctionArg) => {
|
||||
return socketFunctionArg.name === functionNameArg;
|
||||
});
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ export class SocketRequest<T extends plugins.typedrequestInterfaces.ITypedReques
|
||||
smartsocketRef: Smartsocket | SmartsocketClient,
|
||||
shortIdArg: string
|
||||
): SocketRequest<any> {
|
||||
return smartsocketRef.socketRequests.find((socketRequestArg) => {
|
||||
return smartsocketRef.socketRequests.findSync((socketRequestArg) => {
|
||||
return socketRequestArg.shortid === shortIdArg;
|
||||
});
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ export class SocketRole {
|
||||
referenceSmartsocket: Smartsocket | SmartsocketClient,
|
||||
socketRoleNameArg: string
|
||||
): SocketRole {
|
||||
return referenceSmartsocket.socketRoles.find((socketRoleArg) => {
|
||||
return referenceSmartsocket.socketRoles.findSync((socketRoleArg) => {
|
||||
return socketRoleArg.name === socketRoleNameArg;
|
||||
});
|
||||
}
|
||||
|
@ -13,4 +13,4 @@ export { smartexpress };
|
||||
import type socketIo from 'socket.io';
|
||||
import type socketIoClient from 'socket.io-client';
|
||||
|
||||
export { socketIo, socketIoClient };
|
||||
export { socketIoClient, socketIo };
|
||||
|
Reference in New Issue
Block a user