fix(core): update

This commit is contained in:
Philipp Kunz 2022-01-19 18:06:39 +01:00
parent 895464115e
commit 9fc4db1e35
7 changed files with 1803 additions and 1836 deletions

13
.snyk
View File

@ -1,13 +0,0 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.13.5
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
SNYK-JS-JSYAML-173999:
- '@pushrocks/smartexpress > @pushrocks/smartfile > js-yaml':
reason: None given
expires: '2019-05-24T15:16:11.291Z'
SNYK-JS-JSYAML-174129:
- '@pushrocks/smartexpress > @pushrocks/smartfile > js-yaml':
reason: None given
expires: '2019-05-24T15:16:11.291Z'
patch: {}

3593
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,7 +6,8 @@
"typings": "dist_ts/index.d.ts",
"scripts": {
"test": "(tstest test/)",
"build": "(tsbuild --web && tsbundle --from ./ts/index.ts --to dist_bundle/bundle.js)"
"build": "tsbuild --web --skiplibcheck",
"buildswitch": "(tsbuild --web && tsbundle --from ./ts/index.ts --to dist_bundle/bundle.js)"
},
"repository": {
"type": "git",
@ -31,13 +32,11 @@
"@pushrocks/smartpromise": "^3.1.6",
"@pushrocks/smartrx": "^2.0.19",
"@pushrocks/smarttime": "^3.0.43",
"@types/socket.io": "^3.0.2",
"@types/socket.io-client": "^3.0.0",
"socket.io": "^3.1.0",
"socket.io-client": "^3.1.0"
"socket.io": "^4.4.1",
"socket.io-client": "^4.4.1"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.28",
"@gitzone/tsbuild": "^2.1.29",
"@gitzone/tsrun": "^1.2.18",
"@gitzone/tstest": "^1.0.60",
"@pushrocks/tapbundle": "^3.2.15",

View File

@ -103,7 +103,7 @@ export class Smartsocket {
/**
* the standard handler for new socket connections
*/
private async _handleSocketConnection(socketArg: SocketIO.Socket) {
private async _handleSocketConnection(socketArg: pluginsTyped.socketIo.Socket) {
const socketConnection: SocketConnection = new SocketConnection({
alias: undefined,
authenticated: false,

View File

@ -91,13 +91,7 @@ export class SmartsocketClient {
public async connect() {
const done = plugins.smartpromise.defer();
const smartenvInstance = new plugins.smartenv.Smartenv();
const socketIoClient = await smartenvInstance.getEnvAwareModule({
nodeModuleName: 'socket.io-client',
webUrlArg: 'https://cdn.jsdelivr.net/npm/socket.io-client@2/dist/socket.io.js',
getFunction: () => {
return globalThis.io;
},
});
const socketIoClient = plugins.socketIoClient;
logger.log('info', 'trying to connect...');
const socketUrl = `${this.serverUrl}:${this.serverPort}`;
this.socketConnection = new SocketConnection({

View File

@ -1,4 +1,5 @@
import * as plugins from './smartsocket.plugins';
import * as pluginsTyped from './smartsocket.pluginstyped';
import * as interfaces from './interfaces';
// import classes
@ -7,7 +8,6 @@ import { SocketFunction } from './smartsocket.classes.socketfunction';
import { SocketRequest, ISocketRequestDataObject } from './smartsocket.classes.socketrequest';
// socket.io
import * as pluginsTyped from './smartsocket.pluginstyped';
import { SmartsocketClient } from './smartsocket.classes.smartsocketclient';
import { logger } from './smartsocket.logging';
@ -26,7 +26,7 @@ export interface ISocketConnectionConstructorOptions {
authenticated: boolean;
side: TSocketConnectionSide;
smartsocketHost: Smartsocket | SmartsocketClient;
socket: SocketIO.Socket | SocketIOClient.Socket;
socket: pluginsTyped.socketIo.Socket | plugins.socketIoClient.Socket;
}
/**
@ -47,7 +47,7 @@ export class SocketConnection {
public side: TSocketConnectionSide;
public authenticated: boolean = false;
public smartsocketRef: Smartsocket | SmartsocketClient;
public socket: SocketIO.Socket | SocketIOClient.Socket;
public socket: pluginsTyped.socketIo.Socket | plugins.socketIoClient.Socket;
public eventSubject = new plugins.smartrx.rxjs.Subject<interfaces.TConnectionStatus>();
public eventStatus: interfaces.TConnectionStatus = 'new';

View File

@ -27,3 +27,9 @@ export {
smarttime,
smartrx,
};
// thirdparty
import * as socketIoClient from 'socket.io-client';
export {
socketIoClient
}