fix(core): update

This commit is contained in:
2022-01-18 17:10:46 +01:00
parent 9a23960d21
commit 544277cb8a
9 changed files with 19297 additions and 3152 deletions

View File

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

View File

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

View File

@ -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;
});
}

View File

@ -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;
});
}

View File

@ -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;
});
}

View File

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