diff --git a/package-lock.json b/package-lock.json index 1c1aed2..26e9702 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,6 @@ "@apiglobal/typedrequest": "^1.0.58", "@apiglobal/typedrequest-interfaces": "^1.0.15", "@pushrocks/isohash": "^1.0.2", - "@pushrocks/smartexpress": "^3.0.107", "@pushrocks/smartsocket": "^1.2.8", "@pushrocks/smartstring": "^3.0.24" }, diff --git a/package.json b/package.json index 1231a47..124e098 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,6 @@ "@apiglobal/typedrequest": "^1.0.58", "@apiglobal/typedrequest-interfaces": "^1.0.15", "@pushrocks/isohash": "^1.0.2", - "@pushrocks/smartexpress": "^3.0.107", "@pushrocks/smartsocket": "^1.2.8", "@pushrocks/smartstring": "^3.0.24" }, diff --git a/test/test.ts b/test/test.ts index 2db5152..78d3af2 100644 --- a/test/test.ts +++ b/test/test.ts @@ -34,11 +34,15 @@ tap.test('should add some handlers', async () => { tap.test('should create Server and Client', async (tools) => { testTypedSocketServer = await typedsocket.TypedSocket.createServer(testTypedRouter); testTypedSocketClient = await typedsocket.TypedSocket.createClient(testTypedRouter, 'http://localhost:3000'); - await tools.delayFor(1000); + console.log('test: waiting 5 seconds'); + await tools.delayFor(5000); await testTypedSocketServer.stop(); + + // lets create another server testTypedSocketServer = await typedsocket.TypedSocket.createServer(testTypedRouter); // lets see if auto reconnect works + console.log('test: waiting 60 seconds for reconnect'); await tools.delayFor(60000); }); diff --git a/ts/typedsocket.classes.typedsocket.ts b/ts/typedsocket.classes.typedsocket.ts index dcb3fd2..4781495 100644 --- a/ts/typedsocket.classes.typedsocket.ts +++ b/ts/typedsocket.classes.typedsocket.ts @@ -1,5 +1,4 @@ import * as plugins from './typedsocket.plugins'; -import type * as smartexpress from '@pushrocks/smartexpress'; const publicRoleName = 'publicRoleName'; const publicRolePass = 'publicRolePass'; @@ -14,7 +13,7 @@ export class TypedSocket { */ public static async createServer( typedrouterArg: plugins.typedrequest.TypedRouter, - smartexpressServerArg?: smartexpress.Server + smartexpressServerArg?: any ): Promise { const smartsocketServer = new plugins.smartsocket.Smartsocket({ port: 3000,