fix(core): update
This commit is contained in:
parent
5b868f1259
commit
106eb12a7f
1
package-lock.json
generated
1
package-lock.json
generated
@ -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"
|
||||
},
|
||||
|
@ -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"
|
||||
},
|
||||
|
@ -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);
|
||||
});
|
||||
|
||||
|
@ -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<TypedSocket> {
|
||||
const smartsocketServer = new plugins.smartsocket.Smartsocket({
|
||||
port: 3000,
|
||||
|
Loading…
Reference in New Issue
Block a user