update to latest standards
This commit is contained in:
parent
287c2a73c5
commit
02e17a52c3
@ -7,15 +7,34 @@ cache:
|
|||||||
key: "$CI_BUILD_STAGE"
|
key: "$CI_BUILD_STAGE"
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- security
|
||||||
- test
|
- test
|
||||||
- release
|
- release
|
||||||
- trigger
|
- trigger
|
||||||
- pages
|
- pages
|
||||||
|
|
||||||
|
mirror:
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci git mirror
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
|
snyk:
|
||||||
|
stage: security
|
||||||
|
script:
|
||||||
|
- npmci command yarn global add snyk
|
||||||
|
- npmci command yarn install --ignore-scripts
|
||||||
|
- npmci command snyk test
|
||||||
|
tags:
|
||||||
|
- docker
|
||||||
|
|
||||||
testLEGACY:
|
testLEGACY:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test legacy
|
- npmci node install legacy
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -24,7 +43,9 @@ testLEGACY:
|
|||||||
testLTS:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test lts
|
- npmci node install lts
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -32,7 +53,9 @@ testLTS:
|
|||||||
testSTABLE:
|
testSTABLE:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test stable
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -40,7 +63,8 @@ testSTABLE:
|
|||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci publish
|
- npmci npm prepare
|
||||||
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
@ -69,4 +93,3 @@ pages:
|
|||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
allow_failure: true
|
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
# smartsocket
|
# smartsocket
|
||||||
|
|
||||||
easy and secure websocket communication, TypeScript ready
|
easy and secure websocket communication, TypeScript ready
|
||||||
|
|
||||||
## Availabililty
|
## Availabililty
|
||||||
|
|
||||||
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartsocket)
|
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartsocket)
|
||||||
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartsocket)
|
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartsocket)
|
||||||
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartsocket)
|
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartsocket)
|
||||||
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartsocket/)
|
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartsocket/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
|
|
||||||
[![build status](https://GitLab.com/pushrocks/smartsocket/badges/master/build.svg)](https://GitLab.com/pushrocks/smartsocket/commits/master)
|
[![build status](https://GitLab.com/pushrocks/smartsocket/badges/master/build.svg)](https://GitLab.com/pushrocks/smartsocket/commits/master)
|
||||||
[![coverage report](https://GitLab.com/pushrocks/smartsocket/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartsocket/commits/master)
|
[![coverage report](https://GitLab.com/pushrocks/smartsocket/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartsocket/commits/master)
|
||||||
[![npm downloads per month](https://img.shields.io/npm/dm/smartsocket.svg)](https://www.npmjs.com/package/smartsocket)
|
[![npm downloads per month](https://img.shields.io/npm/dm/smartsocket.svg)](https://www.npmjs.com/package/smartsocket)
|
||||||
@ -19,11 +22,12 @@ easy and secure websocket communication, TypeScript ready
|
|||||||
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Use TypeScript for best in class instellisense.
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
For further information read the linked docs at the top of this README.
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
|
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
|
||||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -10,4 +10,4 @@ __export(require("./smartsocket.classes.smartsocketclient"));
|
|||||||
__export(require("./smartsocket.classes.socketfunction"));
|
__export(require("./smartsocket.classes.socketfunction"));
|
||||||
__export(require("./smartsocket.classes.socketrole"));
|
__export(require("./smartsocket.classes.socketrole"));
|
||||||
__export(require("./smartsocket.classes.socketconnection"));
|
__export(require("./smartsocket.classes.socketconnection"));
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLHNCQUFzQjtBQUN0Qix1REFBaUQ7QUFDakQsNkRBQXVEO0FBRXZELHFDQUFxQztBQUNyQywwREFBb0Q7QUFDcEQsc0RBQWdEO0FBQ2hELDREQUFzRCJ9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUVBLHNCQUFzQjtBQUN0Qix1REFBa0Q7QUFDbEQsNkRBQXdEO0FBRXhELHFDQUFxQztBQUNyQywwREFBcUQ7QUFDckQsc0RBQWlEO0FBQ2pELDREQUF1RCJ9
|
7
dist/smartsocket.classes.smartsocket.d.ts
vendored
7
dist/smartsocket.classes.smartsocket.d.ts
vendored
@ -1,9 +1,10 @@
|
|||||||
/// <reference types="node" />
|
/// <reference types="node" />
|
||||||
/// <reference types="socket.io" />
|
/// <reference types="socket.io" />
|
||||||
|
import * as plugins from './smartsocket.plugins';
|
||||||
import * as http from 'http';
|
import * as http from 'http';
|
||||||
import { Objectmap } from 'lik';
|
|
||||||
import { SocketConnection } from './smartsocket.classes.socketconnection';
|
import { SocketConnection } from './smartsocket.classes.socketconnection';
|
||||||
import { SocketRole } from './smartsocket.classes.socketrole';
|
import { SocketRole } from './smartsocket.classes.socketrole';
|
||||||
|
import * as SocketIO from 'socket.io';
|
||||||
export interface ISmartsocketConstructorOptions {
|
export interface ISmartsocketConstructorOptions {
|
||||||
port: number;
|
port: number;
|
||||||
}
|
}
|
||||||
@ -11,8 +12,8 @@ export declare class Smartsocket {
|
|||||||
options: ISmartsocketConstructorOptions;
|
options: ISmartsocketConstructorOptions;
|
||||||
httpServer: http.Server;
|
httpServer: http.Server;
|
||||||
io: SocketIO.Server;
|
io: SocketIO.Server;
|
||||||
openSockets: Objectmap<SocketConnection>;
|
openSockets: plugins.lik.Objectmap<SocketConnection>;
|
||||||
socketRoles: Objectmap<SocketRole>;
|
socketRoles: plugins.lik.Objectmap<SocketRole>;
|
||||||
constructor(optionsArg: ISmartsocketConstructorOptions);
|
constructor(optionsArg: ISmartsocketConstructorOptions);
|
||||||
/**
|
/**
|
||||||
* starts listening to incoming sockets:
|
* starts listening to incoming sockets:
|
||||||
|
12
dist/smartsocket.classes.smartsocket.js
vendored
12
dist/smartsocket.classes.smartsocket.js
vendored
@ -30,7 +30,7 @@ class Smartsocket {
|
|||||||
this.httpServer = new http.Server();
|
this.httpServer = new http.Server();
|
||||||
}
|
}
|
||||||
this.io = plugins.socketIo(this.httpServer);
|
this.io = plugins.socketIo(this.httpServer);
|
||||||
this.io.on('connection', (socketArg) => {
|
this.io.on('connection', socketArg => {
|
||||||
this._handleSocketConnection(socketArg);
|
this._handleSocketConnection(socketArg);
|
||||||
});
|
});
|
||||||
this.httpServer.listen(this.options.port, () => {
|
this.httpServer.listen(this.options.port, () => {
|
||||||
@ -76,8 +76,7 @@ class Smartsocket {
|
|||||||
funcDataArg: dataArg
|
funcDataArg: dataArg
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
socketRequest.dispatch()
|
socketRequest.dispatch().then((dataArg) => {
|
||||||
.then((dataArg) => {
|
|
||||||
done.resolve(dataArg.funcDataArg);
|
done.resolve(dataArg.funcDataArg);
|
||||||
});
|
});
|
||||||
return done.promise;
|
return done.promise;
|
||||||
@ -105,14 +104,15 @@ class Smartsocket {
|
|||||||
});
|
});
|
||||||
plugins.beautylog.log('Socket connected. Trying to authenticate...');
|
plugins.beautylog.log('Socket connected. Trying to authenticate...');
|
||||||
this.openSockets.add(socketConnection);
|
this.openSockets.add(socketConnection);
|
||||||
socketConnection.authenticate()
|
socketConnection
|
||||||
|
.authenticate()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return socketConnection.listenToFunctionRequests();
|
return socketConnection.listenToFunctionRequests();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch(err => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.Smartsocket = Smartsocket;
|
exports.Smartsocket = Smartsocket;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzb2NrZXQuY2xhc3Nlcy5zbWFydHNvY2tldC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0c29ja2V0LmNsYXNzZXMuc21hcnRzb2NrZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLGlEQUFnRDtBQUdoRCw2QkFBNEI7QUFFNUIsVUFBVTtBQUNWLDZCQUErQjtBQUUvQixpR0FBeUU7QUFDekUsMkZBQW1FO0FBT25FO0lBTUUsWUFBYSxVQUEwQztRQUZ2RCxnQkFBVyxHQUFHLElBQUksZUFBUyxFQUFvQixDQUFBO1FBQy9DLGdCQUFXLEdBQUcsSUFBSSxlQUFTLEVBQWMsQ0FBQTtRQUV2QyxJQUFJLENBQUMsT0FBTyxHQUFHLFVBQVUsQ0FBQTtJQUMzQixDQUFDO0lBRUQ7O09BRUc7SUFDRyxXQUFXOztZQUNmLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsS0FBSyxFQUFFLENBQUE7WUFDakMsRUFBRSxDQUFDLENBQUMsQ0FBQyxJQUFJLENBQUMsVU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sQ0FBQyxnQkFBZ0IsQ0FBQyx3QkFBd0IsRUFBRSxDQUFDO1FBQ3JELENBQUMsQ0FBQzthQUNELEtBQUssQ0FBQyxHQUFHLENBQUMsRUFBRTtZQUNYLE9BQU8sQ0FBQyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUM7UUFDbkIsQ0FBQyxDQUFDLENBQUM7SUFDUCxDQUFDO0NBQ0Y7QUF2R0Qsa0NBdUdDIn0=
|
@ -62,12 +62,11 @@ class SmartsocketClient {
|
|||||||
funcDataArg: dataArg
|
funcDataArg: dataArg
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
socketRequest.dispatch()
|
socketRequest.dispatch().then((dataArg) => {
|
||||||
.then((dataArg) => {
|
|
||||||
done.resolve(dataArg.funcDataArg);
|
done.resolve(dataArg.funcDataArg);
|
||||||
});
|
});
|
||||||
return done.promise;
|
return done.promise;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.SmartsocketClient = SmartsocketClient;
|
exports.SmartsocketClient = SmartsocketClient;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzb2NrZXQuY2xhc3Nlcy5zbWFydHNvY2tldGNsaWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0c29ja2V0LmNsYXNzZXMuc21hcnRzb2NrZXRjbGllbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxpREFBZ0Q7QUFPaEQsaUJBQWlCO0FBQ2pCLGlHQUF5RTtBQUV6RSwyRkFBbUU7QUFZbkU7SUFPRSxZQUFZLFVBQXFDO1FBQy9DLElBQUksQ0FBQyxLQUFLLEdBQUcsVUFBVSxDQUFDLEtBQUssQ0FBQTtRQUM3QixJQUFJLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQyxJQUFJLENBQUE7UUFDM0IsSUFBSSxDQUFDLFNBQVMsR0FBRy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BQWEsR0FBRyxJQUFJLGlEQUFhLENBQUM7WUFDcEMsSUFBSSxFQUFFLFlBQVk7WUFDbEIsc0JBQXNCLEVBQUUsSUFBSSxDQUFDLGdCQUFnQjtZQUM3QyxPQUFPLEVBQUUsT0FBTyxDQUFDLE9BQU8sQ0FBQyxRQUFRLEVBQUU7WUFDbkMsWUFBWSxFQUFFO2dCQUNaLFFBQVEsRUFBRSxlQUFlO2dCQUN6QixXQUFXLEVBQUUsT0FBTzthQUNyQjtTQUNGLENBQUMsQ0FBQztRQUNILGFBQWEsQ0FBQyxRQUFRLEVBQUUsQ0FBQyxJQUFJLENBQUMsQ0FBQyxPQUE0QixFQUFFLEVBQUU7WUFDN0QsSUFBSSxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsV0FBVyxDQUFDLENBQUM7UUFDcEMsQ0FBQyxDQUFDLENBQUM7UUFDSCxNQUFNLENBQUMsSUFBSSxDQUFDLE9BQU8sQ0FBQztJQUN0QixDQUFDO0NBQ0Y7QUF4RUQsOENBd0VDIn0=
|
@ -1,8 +1,9 @@
|
|||||||
/// <reference types="socket.io" />
|
/// <reference types="socket.io" />
|
||||||
/// <reference types="socket.io-client" />
|
/// <reference types="socket.io-client" />
|
||||||
import { Objectmap } from 'lik';
|
import * as plugins from './smartsocket.plugins';
|
||||||
import { Smartsocket } from './smartsocket.classes.smartsocket';
|
import { Smartsocket } from './smartsocket.classes.smartsocket';
|
||||||
import { SocketRole } from './smartsocket.classes.socketrole';
|
import { SocketRole } from './smartsocket.classes.socketrole';
|
||||||
|
import * as SocketIO from 'socket.io';
|
||||||
/**
|
/**
|
||||||
* defines is a SocketConnection is server or client side. Important for mesh setups.
|
* defines is a SocketConnection is server or client side. Important for mesh setups.
|
||||||
*/
|
*/
|
||||||
@ -26,7 +27,7 @@ export interface ISocketConnectionAuthenticationObject {
|
|||||||
password: 'somePassword';
|
password: 'somePassword';
|
||||||
alias: 'coreflow1';
|
alias: 'coreflow1';
|
||||||
}
|
}
|
||||||
export declare let allSocketConnections: Objectmap<SocketConnection>;
|
export declare let allSocketConnections: plugins.lik.Objectmap<SocketConnection>;
|
||||||
/**
|
/**
|
||||||
* class SocketConnection represents a websocket connection
|
* class SocketConnection represents a websocket connection
|
||||||
*/
|
*/
|
||||||
|
5
dist/smartsocket.classes.socketconnection.js
vendored
5
dist/smartsocket.classes.socketconnection.js
vendored
@ -36,6 +36,7 @@ class SocketConnection {
|
|||||||
plugins.beautylog.log('received authentication data. now hashing and comparing...');
|
plugins.beautylog.log('received authentication data. now hashing and comparing...');
|
||||||
this.socket.removeListener('dataAuth', () => { });
|
this.socket.removeListener('dataAuth', () => { });
|
||||||
if (helpers.checkPasswordForRole(dataArg, this.smartsocketHost)) {
|
if (helpers.checkPasswordForRole(dataArg, this.smartsocketHost)) {
|
||||||
|
// TODO: authenticate password
|
||||||
this.alias = dataArg.alias;
|
this.alias = dataArg.alias;
|
||||||
this.authenticated = true;
|
this.authenticated = true;
|
||||||
this.role = helpers.getSocketRoleByName(dataArg.role, this.smartsocketHost);
|
this.role = helpers.getSocketRoleByName(dataArg.role, this.smartsocketHost);
|
||||||
@ -62,7 +63,7 @@ class SocketConnection {
|
|||||||
this.socket.on('function', (dataArg) => {
|
this.socket.on('function', (dataArg) => {
|
||||||
// check if requested function is available to the socket's scope
|
// check if requested function is available to the socket's scope
|
||||||
plugins.beautylog.log('function request received');
|
plugins.beautylog.log('function request received');
|
||||||
let referencedFunction = this.role.allowedFunctions.find((socketFunctionArg) => {
|
let referencedFunction = this.role.allowedFunctions.find(socketFunctionArg => {
|
||||||
return socketFunctionArg.name === dataArg.funcCallData.funcName;
|
return socketFunctionArg.name === dataArg.funcCallData.funcName;
|
||||||
});
|
});
|
||||||
if (referencedFunction !== undefined) {
|
if (referencedFunction !== undefined) {
|
||||||
@ -96,4 +97,4 @@ class SocketConnection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.SocketConnection = SocketConnection;
|
exports.SocketConnection = SocketConnection;
|
||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{ Objectmap } from 'lik';
|
import * as plugins from './smartsocket.plugins';
|
||||||
import { SocketRole } from './smartsocket.classes.socketrole';
|
import { SocketRole } from './smartsocket.classes.socketrole';
|
||||||
/**
|
/**
|
||||||
* interface of the contructor options of class SocketFunction
|
* interface of the contructor options of class SocketFunction
|
||||||
@ -21,7 +21,7 @@ export interface ISocketFunctionCall {
|
|||||||
export interface IFuncDef {
|
export interface IFuncDef {
|
||||||
(dataArg: any): PromiseLike<any>;
|
(dataArg: any): PromiseLike<any>;
|
||||||
}
|
}
|
||||||
export declare let allSocketFunctions: Objectmap<SocketFunction>;
|
export declare let allSocketFunctions: plugins.lik.Objectmap<SocketFunction>;
|
||||||
/**
|
/**
|
||||||
* class that respresents a function that can be transparently called using a SocketConnection
|
* class that respresents a function that can be transparently called using a SocketConnection
|
||||||
*/
|
*/
|
||||||
|
5
dist/smartsocket.classes.socketfunction.js
vendored
5
dist/smartsocket.classes.socketfunction.js
vendored
@ -28,8 +28,7 @@ class SocketFunction {
|
|||||||
invoke(dataArg) {
|
invoke(dataArg) {
|
||||||
let done = plugins.smartq.defer();
|
let done = plugins.smartq.defer();
|
||||||
if (dataArg.funcName === this.name) {
|
if (dataArg.funcName === this.name) {
|
||||||
this.funcDef(dataArg.funcDataArg)
|
this.funcDef(dataArg.funcDataArg).then((resultData) => {
|
||||||
.then((resultData) => {
|
|
||||||
let funcResponseData = {
|
let funcResponseData = {
|
||||||
funcName: this.name,
|
funcName: this.name,
|
||||||
funcDataArg: resultData
|
funcDataArg: resultData
|
||||||
@ -50,4 +49,4 @@ class SocketFunction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.SocketFunction = SocketFunction;
|
exports.SocketFunction = SocketFunction;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzb2NrZXQuY2xhc3Nlcy5zb2NrZXRmdW5jdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpb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JQUN0QixDQUFDO0lBRUQ7O09BRUc7SUFDSyxXQUFXLENBQUMsYUFBeUI7UUFDM0MsYUFBYSxDQUFDLGlCQUFpQixDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ3hDLENBQUM7Q0FDRjtBQTNDRCx3Q0EyQ0MifQ==
|
3
dist/smartsocket.classes.socketrequest.d.ts
vendored
3
dist/smartsocket.classes.socketrequest.d.ts
vendored
@ -1,6 +1,5 @@
|
|||||||
import * as plugins from './smartsocket.plugins';
|
import * as plugins from './smartsocket.plugins';
|
||||||
import { ISocketFunctionCall } from './smartsocket.classes.socketfunction';
|
import { ISocketFunctionCall } from './smartsocket.classes.socketfunction';
|
||||||
import { Objectmap } from 'lik';
|
|
||||||
import { SocketConnection } from './smartsocket.classes.socketconnection';
|
import { SocketConnection } from './smartsocket.classes.socketconnection';
|
||||||
export declare type TSocketRequestStatus = 'new' | 'pending' | 'finished';
|
export declare type TSocketRequestStatus = 'new' | 'pending' | 'finished';
|
||||||
export declare type TSocketRequestSide = 'requesting' | 'responding';
|
export declare type TSocketRequestSide = 'requesting' | 'responding';
|
||||||
@ -21,7 +20,7 @@ export interface ISocketRequestDataObject {
|
|||||||
shortId: string;
|
shortId: string;
|
||||||
responseTimeout?: number;
|
responseTimeout?: number;
|
||||||
}
|
}
|
||||||
export declare let allSocketRequests: Objectmap<SocketRequest>;
|
export declare let allSocketRequests: plugins.lik.Objectmap<SocketRequest>;
|
||||||
export declare class SocketRequest {
|
export declare class SocketRequest {
|
||||||
status: TSocketRequestStatus;
|
status: TSocketRequestStatus;
|
||||||
side: TSocketRequestSide;
|
side: TSocketRequestSide;
|
||||||
|
5
dist/smartsocket.classes.socketrequest.js
vendored
5
dist/smartsocket.classes.socketrequest.js
vendored
@ -44,8 +44,7 @@ class SocketRequest {
|
|||||||
createResponse() {
|
createResponse() {
|
||||||
let targetSocketFunction = helpers.getSocketFunctionByName(this.funcCallData.funcName);
|
let targetSocketFunction = helpers.getSocketFunctionByName(this.funcCallData.funcName);
|
||||||
plugins.beautylog.info(`invoking ${targetSocketFunction.name}`);
|
plugins.beautylog.info(`invoking ${targetSocketFunction.name}`);
|
||||||
targetSocketFunction.invoke(this.funcCallData)
|
targetSocketFunction.invoke(this.funcCallData).then(resultData => {
|
||||||
.then((resultData) => {
|
|
||||||
plugins.beautylog.log('got resultData. Sending it to requesting party.');
|
plugins.beautylog.log('got resultData. Sending it to requesting party.');
|
||||||
let requestData = {
|
let requestData = {
|
||||||
funcCallData: resultData,
|
funcCallData: resultData,
|
||||||
@ -57,4 +56,4 @@ class SocketRequest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.SocketRequest = SocketRequest;
|
exports.SocketRequest = SocketRequest;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzb2NrZXQuY2xhc3Nlcy5zb2NrZXRyZXF1ZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzb2NrZXQuY2xhc3Nlcy5zb2NrZXRyZXF1ZXN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsaURBQWdEO0FBQ2hELGlEQUFnRDtBQUtoRCxpQkFBaUI7QUFDakIsNkJBQStCO0FBMkIvQixpQkFBaUI7QUFDTixRQUFBLGlCQUFpQixHQUFHLElBQUksZUFBUyxFQUFpQixDQUFBO0FBRTdELGlCQUFpQjtBQUNqQjtJQU9FLFlBQWEsVUFBMkM7UUFOeEQsV0FBTSxHQUF5QixLQUFLLENBQUE7UUFLcEMsU0FBSSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsS0FBSyxFQUFFLENBQUE7UUFFM0IsSUFBSSxDQUFDLElBQUksR0FBRyxVQUFVLENBQUMsSUFBSSxDQUFBO1FBQzNCLElBQUksQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFDLE9BQU8sQ0FBQTtRQUNqQyxJQUFJLENBQUMsW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BQUMsWUFBWSxDQUFDLFFBQVEsQ0FDM0IsQ0FBQztRQUNGLE9BQU8sQ0FBQyxTQUFTLENBQUMsSUFBSSxDQUFDLFlBQVksb0JBQW9CLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQztRQUNoRSxvQkFBb0IsQ0FBQyxNQUFNLENBQUMsSUFBSSxDQUFDLFlBQVksQ0FBQyxDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsRUFBRTtZQUMvRCxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsQ0FBQyxpREFBaUQsQ0FBQyxDQUFDO1lBQ3pFLElBQUksV0FBVyxHQUE2QjtnQkFDMUMsWUFBWSxFQUFFLFVBQVU7Z0JBQ3hCLE9BQU8sRUFBRSxJQUFJLENBQUMsT0FBTzthQUN0QixDQUFDO1lBQ0YsSUFBSSxDQUFDLHNCQUFzQixDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsa0JBQWtCLEVBQUUsV0FBVyxDQUFDLENBQUM7WUFDekUseUJBQWlCLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxDQUFDO1FBQ2pDLENBQUMsQ0FBQyxDQUFDO0lBQ0wsQ0FBQztDQUNGO0FBMURELHNDQTBEQyJ9
|
6
dist/smartsocket.classes.socketrole.d.ts
vendored
6
dist/smartsocket.classes.socketrole.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
import { Objectmap } from "lik";
|
import * as plugins from './smartsocket.plugins';
|
||||||
import { SocketFunction } from "./smartsocket.classes.socketfunction";
|
import { SocketFunction } from './smartsocket.classes.socketfunction';
|
||||||
/**
|
/**
|
||||||
* interface for class SocketRole
|
* interface for class SocketRole
|
||||||
*/
|
*/
|
||||||
@ -13,7 +13,7 @@ export interface SocketRoleOptions {
|
|||||||
export declare class SocketRole {
|
export declare class SocketRole {
|
||||||
name: string;
|
name: string;
|
||||||
passwordHash: string;
|
passwordHash: string;
|
||||||
allowedFunctions: Objectmap<SocketFunction>;
|
allowedFunctions: plugins.lik.Objectmap<SocketFunction>;
|
||||||
constructor(optionsArg: SocketRoleOptions);
|
constructor(optionsArg: SocketRoleOptions);
|
||||||
addSocketFunction(socketFunctionArg: SocketFunction): void;
|
addSocketFunction(socketFunctionArg: SocketFunction): void;
|
||||||
}
|
}
|
||||||
|
3
dist/smartsocket.classes.socketrole.js
vendored
3
dist/smartsocket.classes.socketrole.js
vendored
@ -11,10 +11,9 @@ class SocketRole {
|
|||||||
this.name = optionsArg.name;
|
this.name = optionsArg.name;
|
||||||
this.passwordHash = optionsArg.passwordHash;
|
this.passwordHash = optionsArg.passwordHash;
|
||||||
}
|
}
|
||||||
;
|
|
||||||
addSocketFunction(socketFunctionArg) {
|
addSocketFunction(socketFunctionArg) {
|
||||||
this.allowedFunctions.add(socketFunctionArg);
|
this.allowedFunctions.add(socketFunctionArg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
exports.SocketRole = SocketRole;
|
exports.SocketRole = SocketRole;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzb2NrZXQuY2xhc3Nlcy5zb2NrZXRyb2xlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzb2NrZXQuY2xhc3Nlcy5zb2NrZXRyb2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUEsaUJBQWlCO0FBQ2pCLDZCQUFnQztBQVloQzs7R0FFRztBQUNIO0lBSUksWUFBWSxVQUE2QjtRQUR6QyxxQkFBZ0IsR0FBRyxJQUFJLGVBQVMsRUFBa0IsQ0FBQztRQUUvQyxJQUFJLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQyxJQUFJLENBQUM7UUFDNUIsSUFBSSxDQUFDLFlBQVksR0FBRyxVQUFVLENBQUMsWUFBWSxDQUFDO0lBQ2hELENBQUM7SUFBQSxDQUFDO0lBQ0YsaUJBQWlCLENBQUMsaUJBQWdDO1FBQzlDLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxHQUFHLENBQUMsaUJBQWlCLENBQUMsQ0FBQztJQUNqRCxDQUFDO0NBQ0o7QUFYRCxnQ0FXQyJ9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzb2NrZXQuY2xhc3Nlcy5zb2NrZXRyb2xlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRzb2NrZXQuY2xhc3Nlcy5zb2NrZXRyb2xlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUEsaUJBQWlCO0FBQ2pCLDZCQUFnQztBQVdoQzs7R0FFRztBQUNIO0lBSUUsWUFBWSxVQUE2QjtRQUR6QyxxQkFBZ0IsR0FBRyxJQUFJLGVBQVMsRUFBa0IsQ0FBQztRQUVqRCxJQUFJLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQyxJQUFJLENBQUM7UUFDNUIsSUFBSSxDQUFDLFlBQVksR0FBRyxVQUFVLENBQUMsWUFBWSxDQUFDO0lBQzlDLENBQUM7SUFDRCxpQkFBaUIsQ0FBQyxpQkFBaUM7UUFDakQsSUFBSSxDQUFDLGdCQUFnQixDQUFDLEdBQUcsQ0FBQyxpQkFBaUIsQ0FBQyxDQUFDO0lBQy9DLENBQUM7Q0FDRjtBQVhELGdDQVdDIn0=
|
10
dist/smartsocket.helpers.d.ts
vendored
10
dist/smartsocket.helpers.d.ts
vendored
@ -1,8 +1,8 @@
|
|||||||
import { Smartsocket } from "./smartsocket.classes.smartsocket";
|
import { Smartsocket } from './smartsocket.classes.smartsocket';
|
||||||
import { SocketFunction } from "./smartsocket.classes.socketfunction";
|
import { SocketFunction } from './smartsocket.classes.socketfunction';
|
||||||
import { ISocketConnectionAuthenticationObject } from "./smartsocket.classes.socketconnection";
|
import { ISocketConnectionAuthenticationObject } from './smartsocket.classes.socketconnection';
|
||||||
import { SocketRequest, TSocketRequestSide } from "./smartsocket.classes.socketrequest";
|
import { SocketRequest, TSocketRequestSide } from './smartsocket.classes.socketrequest';
|
||||||
import { SocketRole } from "./smartsocket.classes.socketrole";
|
import { SocketRole } from './smartsocket.classes.socketrole';
|
||||||
export declare let checkPasswordForRole: (dataArg: ISocketConnectionAuthenticationObject, referenceSmartsocket: Smartsocket) => boolean;
|
export declare let checkPasswordForRole: (dataArg: ISocketConnectionAuthenticationObject, referenceSmartsocket: Smartsocket) => boolean;
|
||||||
export declare let getSocketFunctionByName: (functionNameArg: string) => SocketFunction;
|
export declare let getSocketFunctionByName: (functionNameArg: string) => SocketFunction;
|
||||||
/**
|
/**
|
||||||
|
14
dist/smartsocket.helpers.js
vendored
14
dist/smartsocket.helpers.js
vendored
@ -11,20 +11,26 @@ exports.checkPasswordForRole = (dataArg, referenceSmartsocket) => {
|
|||||||
};
|
};
|
||||||
// SocketFunction helpers
|
// SocketFunction helpers
|
||||||
exports.getSocketFunctionByName = (functionNameArg) => {
|
exports.getSocketFunctionByName = (functionNameArg) => {
|
||||||
return smartsocket_classes_socketfunction_1.allSocketFunctions.find((socketFunctionArg) => { return socketFunctionArg.name === functionNameArg; });
|
return smartsocket_classes_socketfunction_1.allSocketFunctions.find(socketFunctionArg => {
|
||||||
|
return socketFunctionArg.name === functionNameArg;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
// SocketRequest helpers
|
// SocketRequest helpers
|
||||||
/**
|
/**
|
||||||
* get corresponding Socketrequest instance by shortId
|
* get corresponding Socketrequest instance by shortId
|
||||||
*/
|
*/
|
||||||
exports.getSocketRequestById = (shortIdArg, requestSide) => {
|
exports.getSocketRequestById = (shortIdArg, requestSide) => {
|
||||||
return smartsocket_classes_socketrequest_1.allSocketRequests.find((socketRequestArg) => { return socketRequestArg.shortid === shortIdArg; });
|
return smartsocket_classes_socketrequest_1.allSocketRequests.find(socketRequestArg => {
|
||||||
|
return socketRequestArg.shortid === shortIdArg;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
// SocketRole helpers
|
// SocketRole helpers
|
||||||
/**
|
/**
|
||||||
* get corresponding SocketRole instance by name
|
* get corresponding SocketRole instance by name
|
||||||
*/
|
*/
|
||||||
exports.getSocketRoleByName = (socketRoleNameArg, referenceSmartsocket) => {
|
exports.getSocketRoleByName = (socketRoleNameArg, referenceSmartsocket) => {
|
||||||
return referenceSmartsocket.socketRoles.find((socketRoleArg) => { return socketRoleArg.name === socketRoleNameArg; });
|
return referenceSmartsocket.socketRoles.find(socketRoleArg => {
|
||||||
|
return socketRoleArg.name === socketRoleNameArg;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzb2NrZXQuaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0c29ja2V0LmhlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSxpREFBaUQ7QUFJakQsNkZBQTBGO0FBRTFGLDJGQUEyRztBQUczRywyQkFBMkI7QUFDaEIsUUFBQSxvQkFBb0IsR0FBRyxDQUFDLE9BQThDLEVBQUUsb0JBQWdDLEVBQVcsRUFBRTtJQUM1SCxJQUFJLGtCQUFrQixHQUFHLDJCQUFtQixDQUFDLE9BQU8sQ0FBQyxJQUFJLEVBQUMsb0JBQW9CLENBQUMsQ0FBQyxZQUFZLENBQUM7SUFDN0YsSUFBSSxtQkFBbUIsR0FBRyxPQUFPLENBQUMsUUFBUSxDQUFDLG9CQUFvQixDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQztJQUNsRixNQUFNLENBQUMsa0JBQWtCLEtBQUssbUJBQW1CLENBQUM7QUFDdEQsQ0FBQyxDQUFBO0FBR0QseUJBQXlCO0FBQ2QsUUFBQSx1QkFBdUIsR0FBRyxDQUFDLGVBQXVCLEVBQWtCLEVBQUU7SUFDN0U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7SUFDZCxNQUFNLENBQUMsb0JBQW9CLENBQUMsV0FBVyxDQUFDLElBQUksQ0FBQyxhQUFhLENBQUMsRUFBRTtRQUMzRCxNQUFNLENBQUMsYUFBYSxDQUFDLElBQUksS0FBSyxpQkFBaUIsQ0FBQztJQUNsRCxDQUFDLENBQUMsQ0FBQztBQUNMLENBQUMsQ0FBQyJ9
|
1
dist/smartsocket.plugins.d.ts
vendored
1
dist/smartsocket.plugins.d.ts
vendored
@ -1,4 +1,3 @@
|
|||||||
import 'typings-global';
|
|
||||||
export import beautylog = require('beautylog');
|
export import beautylog = require('beautylog');
|
||||||
export import lik = require('lik');
|
export import lik = require('lik');
|
||||||
export import nodehash = require('nodehash');
|
export import nodehash = require('nodehash');
|
||||||
|
3
dist/smartsocket.plugins.js
vendored
3
dist/smartsocket.plugins.js
vendored
@ -1,6 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
require("typings-global");
|
|
||||||
exports.beautylog = require("beautylog");
|
exports.beautylog = require("beautylog");
|
||||||
exports.lik = require("lik");
|
exports.lik = require("lik");
|
||||||
exports.nodehash = require("nodehash");
|
exports.nodehash = require("nodehash");
|
||||||
@ -9,4 +8,4 @@ exports.smartq = require("smartq");
|
|||||||
exports.shortid = require("shortid");
|
exports.shortid = require("shortid");
|
||||||
exports.socketIo = require("socket.io");
|
exports.socketIo = require("socket.io");
|
||||||
exports.socketIoClient = require("socket.io-client");
|
exports.socketIoClient = require("socket.io-client");
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzb2NrZXQucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0c29ja2V0LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSwwQkFBdUI7QUFDdkIseUNBQThDO0FBQzlDLDZCQUFtQztBQUNuQyx1Q0FBNEM7QUFDNUMsMkNBQWdEO0FBQ2hELG1DQUF3QztBQUN4QyxxQ0FBMEM7QUFDMUMsd0NBQTZDO0FBQzdDLHFEQUEwRCJ9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzb2NrZXQucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0c29ja2V0LnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFBQSx5Q0FBK0M7QUFDL0MsNkJBQW1DO0FBQ25DLHVDQUE2QztBQUM3QywyQ0FBaUQ7QUFDakQsbUNBQXlDO0FBQ3pDLHFDQUEyQztBQUMzQyx3Q0FBOEM7QUFDOUMscURBQTJEIn0=
|
@ -1,13 +1,16 @@
|
|||||||
# smartsocket
|
# smartsocket
|
||||||
|
|
||||||
easy and secure websocket communication, TypeScript ready
|
easy and secure websocket communication, TypeScript ready
|
||||||
|
|
||||||
## Availabililty
|
## Availabililty
|
||||||
|
|
||||||
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartsocket)
|
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartsocket)
|
||||||
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartsocket)
|
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartsocket)
|
||||||
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartsocket)
|
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartsocket)
|
||||||
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartsocket/)
|
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartsocket/)
|
||||||
|
|
||||||
## Status for master
|
## Status for master
|
||||||
|
|
||||||
[![build status](https://GitLab.com/pushrocks/smartsocket/badges/master/build.svg)](https://GitLab.com/pushrocks/smartsocket/commits/master)
|
[![build status](https://GitLab.com/pushrocks/smartsocket/badges/master/build.svg)](https://GitLab.com/pushrocks/smartsocket/commits/master)
|
||||||
[![coverage report](https://GitLab.com/pushrocks/smartsocket/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartsocket/commits/master)
|
[![coverage report](https://GitLab.com/pushrocks/smartsocket/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartsocket/commits/master)
|
||||||
[![npm downloads per month](https://img.shields.io/npm/dm/smartsocket.svg)](https://www.npmjs.com/package/smartsocket)
|
[![npm downloads per month](https://img.shields.io/npm/dm/smartsocket.svg)](https://www.npmjs.com/package/smartsocket)
|
||||||
@ -19,14 +22,16 @@ easy and secure websocket communication, TypeScript ready
|
|||||||
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Use TypeScript for best in class instellisense.
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
Under the hood we use socket.io and shortid for managed data exchange.
|
Under the hood we use socket.io and shortid for managed data exchange.
|
||||||
|
|
||||||
### Serverside
|
### Serverside
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import * as smartsocket from "smartsocket";
|
import * as smartsocket from 'smartsocket';
|
||||||
import * as q from q // q is a promise library
|
import * as q from q; // q is a promise library
|
||||||
|
|
||||||
// The "Smartsocket" listens on a port and can receive new "SocketConnection" requests.
|
// The "Smartsocket" listens on a port and can receive new "SocketConnection" requests.
|
||||||
let mySmartsocket = new smartsocket.Smartsocket({
|
let mySmartsocket = new smartsocket.Smartsocket({
|
||||||
@ -37,17 +42,17 @@ let mySmartsocket = new smartsocket.Smartsocket({
|
|||||||
// All "SocketRequest"s carry authentication data for a specific "SocketRole".
|
// All "SocketRequest"s carry authentication data for a specific "SocketRole".
|
||||||
// "SocketFunction"s know which "SocketRole"s are allowed to execute them
|
// "SocketFunction"s know which "SocketRole"s are allowed to execute them
|
||||||
let mySocketRole = new smartsocket.SocketRole({
|
let mySocketRole = new smartsocket.SocketRole({
|
||||||
name: "someRoleName",
|
name: 'someRoleName',
|
||||||
passwordHash: "someHashedString"
|
passwordHash: 'someHashedString'
|
||||||
});
|
});
|
||||||
|
|
||||||
// A "SocketFunction" executes a referenced function and passes in any data of the corresponding "SocketRequest".
|
// A "SocketFunction" executes a referenced function and passes in any data of the corresponding "SocketRequest".
|
||||||
// The referenced function must return a promise and resolve with data of type any.
|
// The referenced function must return a promise and resolve with data of type any.
|
||||||
// Any "SocketRequest" carries a unique identifier. If the referenced function's promise resolved any passed on argument will be returned to the requesting party
|
// Any "SocketRequest" carries a unique identifier. If the referenced function's promise resolved any passed on argument will be returned to the requesting party
|
||||||
let testSocketFunction1 = new smartsocket.SocketFunction({
|
let testSocketFunction1 = new smartsocket.SocketFunction({
|
||||||
funcName:"testSocketFunction1",
|
funcName: 'testSocketFunction1',
|
||||||
funcDef:(data) => {
|
funcDef: data => {
|
||||||
console.log('testSocketFunction1 executed successfully!')
|
console.log('testSocketFunction1 executed successfully!');
|
||||||
},
|
},
|
||||||
allowedRoles: [mySocketRole] // all roles that have access to a specific function
|
allowedRoles: [mySocketRole] // all roles that have access to a specific function
|
||||||
});
|
});
|
||||||
@ -57,55 +62,50 @@ let testSocketFunction1 = new smartsocket.SocketFunction({
|
|||||||
// 2. the data to pass in
|
// 2. the data to pass in
|
||||||
// 3. And a target "SocketConnection" (there can be multiple connections at once)
|
// 3. And a target "SocketConnection" (there can be multiple connections at once)
|
||||||
// any unique id association is done internally
|
// any unique id association is done internally
|
||||||
mySmartsocket.clientCall("restart",data,someTargetConnection)
|
mySmartsocket.clientCall('restart', data, someTargetConnection).then(responseData => {});
|
||||||
.then((responseData) => {
|
|
||||||
|
|
||||||
});
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Client side
|
#### Client side
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
import * as smartsocket from "smartsocket";
|
import * as smartsocket from 'smartsocket';
|
||||||
|
|
||||||
// A "SmartsocketClient" is different from a "Smartsocket" in that it doesn't expose any public address.
|
// A "SmartsocketClient" is different from a "Smartsocket" in that it doesn't expose any public address.
|
||||||
// Thus any new "SocketConnection"s must be innitiated from a "SmartsocketClient".
|
// Thus any new "SocketConnection"s must be innitiated from a "SmartsocketClient".
|
||||||
let testSmartsocketClient = new smartsocket.SmartsocketClient({
|
let testSmartsocketClient = new smartsocket.SmartsocketClient({
|
||||||
port: testConfig.port,
|
port: testConfig.port,
|
||||||
url: "http://localhost",
|
url: 'http://localhost',
|
||||||
password: "testPassword",
|
password: 'testPassword',
|
||||||
alias: "testClient1",
|
alias: 'testClient1',
|
||||||
role: "testRole1"
|
role: 'testRole1'
|
||||||
});
|
});
|
||||||
|
|
||||||
// You can .connect() and .disconnect() from a "Smartsocket"
|
// You can .connect() and .disconnect() from a "Smartsocket"
|
||||||
testSmartsocketClient.connect()
|
testSmartsocketClient.connect().then(() => {
|
||||||
.then(() => {
|
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
// The client can also specify "SocketFunction"s. It can also specify "SocketRole"s in case a client connects to multiple servers at once
|
// The client can also specify "SocketFunction"s. It can also specify "SocketRole"s in case a client connects to multiple servers at once
|
||||||
let testSocketFunction2 = new smartsocket.SocketFunction({
|
let testSocketFunction2 = new smartsocket.SocketFunction({
|
||||||
funcName: "testSocketFunction2",
|
funcName: 'testSocketFunction2',
|
||||||
funcDef: (data) => {}, // the function to execute, has to return promise
|
funcDef: data => {}, // the function to execute, has to return promise
|
||||||
allowedRoles: []
|
allowedRoles: []
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// A "SmartsocketClient" can call functions on the serverside using .serverCall() analog to the "Smartsocket"'s .clientCall method.
|
// A "SmartsocketClient" can call functions on the serverside using .serverCall() analog to the "Smartsocket"'s .clientCall method.
|
||||||
mySmartsocketClient.serverCall("function",functionCallData)
|
mySmartsocketClient.serverCall('function', functionCallData).then(functionResponseData => {
|
||||||
.then((functionResponseData) => { // the functionResponseData comes from the server... awesome, right?
|
// the functionResponseData comes from the server... awesome, right?
|
||||||
|
});
|
||||||
});;
|
|
||||||
```
|
```
|
||||||
|
|
||||||
> **NOTE:**
|
> **NOTE:**
|
||||||
you can easily chain dependent requests on either the server or client side with promises.
|
> you can easily chain dependent requests on either the server or client side with promises.
|
||||||
`data` is always a js object that you can design for your specific needs.
|
> `data` is always a js object that you can design for your specific needs.
|
||||||
It supports buffers for large binary data network exchange.
|
> It supports buffers for large binary data network exchange.
|
||||||
|
|
||||||
For further information read the linked docs at the top of this README.
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
|
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"npmts":{},
|
"npmts":{},
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"globalNpmTools": [
|
"npmGlobalTools": [
|
||||||
"npmts"
|
"npmts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
15
package.json
15
package.json
@ -19,19 +19,18 @@
|
|||||||
"homepage": "https://gitlab.com/pushrocks/smartsocket#README",
|
"homepage": "https://gitlab.com/pushrocks/smartsocket#README",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/shortid": "0.0.29",
|
"@types/shortid": "0.0.29",
|
||||||
"@types/socket.io": "^1.4.31",
|
"@types/socket.io": "^1.4.32",
|
||||||
"@types/socket.io-client": "^1.4.30",
|
"@types/socket.io-client": "^1.4.32",
|
||||||
"beautylog": "^6.1.10",
|
"beautylog": "^6.1.10",
|
||||||
"lik": "^1.0.42",
|
"lik": "^2.0.5",
|
||||||
"nodehash": "^1.0.4",
|
"nodehash": "^1.0.4",
|
||||||
"shortid": "^2.2.8",
|
"shortid": "^2.2.8",
|
||||||
"smartdelay": "^1.0.3",
|
"smartdelay": "^1.0.4",
|
||||||
"smartq": "^1.1.6",
|
"smartq": "^1.1.6",
|
||||||
"socket.io": "^2.0.3",
|
"socket.io": "^2.0.4",
|
||||||
"socket.io-client": "^2.0.3",
|
"socket.io-client": "^2.0.4"
|
||||||
"typings-global": "^1.0.20"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"tapbundle": "^1.1.1"
|
"tapbundle": "^2.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
133
test/test.ts
133
test/test.ts
@ -1,113 +1,120 @@
|
|||||||
import { expect, tap } from 'tapbundle'
|
import { expect, tap } from 'tapbundle';
|
||||||
|
|
||||||
import socketIoClient = require('socket.io-client')
|
import socketIoClient = require('socket.io-client');
|
||||||
import smartsocket = require('../ts/index')
|
import smartsocket = require('../ts/index');
|
||||||
import smartq = require('smartq')
|
import smartq = require('smartq');
|
||||||
import nodehash = require('nodehash')
|
import nodehash = require('nodehash');
|
||||||
|
|
||||||
let testSmartsocket: smartsocket.Smartsocket
|
let testSmartsocket: smartsocket.Smartsocket;
|
||||||
let testSmartsocketClient: smartsocket.SmartsocketClient
|
let testSmartsocketClient: smartsocket.SmartsocketClient;
|
||||||
let testSocketRole1: smartsocket.SocketRole
|
let testSocketRole1: smartsocket.SocketRole;
|
||||||
let testSocketFunction1: smartsocket.SocketFunction
|
let testSocketFunction1: smartsocket.SocketFunction;
|
||||||
|
|
||||||
let testConfig = {
|
let testConfig = {
|
||||||
port: 3000
|
port: 3000
|
||||||
}
|
};
|
||||||
|
|
||||||
// class smartsocket
|
// class smartsocket
|
||||||
tap.test('should create a new smartsocket', async () => {
|
tap.test('should create a new smartsocket', async () => {
|
||||||
testSmartsocket = new smartsocket.Smartsocket({ port: testConfig.port })
|
testSmartsocket = new smartsocket.Smartsocket({ port: testConfig.port });
|
||||||
expect(testSmartsocket).be.instanceOf(smartsocket.Smartsocket)
|
expect(testSmartsocket).be.instanceOf(smartsocket.Smartsocket);
|
||||||
})
|
});
|
||||||
|
|
||||||
tap.test('should start listening when .started is called', async () => {
|
tap.test('should start listening when .started is called', async () => {
|
||||||
testSmartsocket.startServer()
|
testSmartsocket.startServer();
|
||||||
})
|
});
|
||||||
|
|
||||||
// class socketrole
|
// class socketrole
|
||||||
tap.test('should add a socketrole', async () => {
|
tap.test('should add a socketrole', async () => {
|
||||||
testSocketRole1 = new smartsocket.SocketRole({
|
testSocketRole1 = new smartsocket.SocketRole({
|
||||||
name: 'testRole1',
|
name: 'testRole1',
|
||||||
passwordHash: nodehash.sha256FromStringSync('testPassword')
|
passwordHash: nodehash.sha256FromStringSync('testPassword')
|
||||||
})
|
});
|
||||||
testSmartsocket.addSocketRoles([ testSocketRole1 ])
|
testSmartsocket.addSocketRoles([testSocketRole1]);
|
||||||
})
|
});
|
||||||
|
|
||||||
// class SocketFunction
|
// class SocketFunction
|
||||||
tap.test('should register a new Function', async () => {
|
tap.test('should register a new Function', async () => {
|
||||||
testSocketFunction1 = new smartsocket.SocketFunction({
|
testSocketFunction1 = new smartsocket.SocketFunction({
|
||||||
funcName: 'testFunction1',
|
funcName: 'testFunction1',
|
||||||
funcDef: async (dataArg) => {
|
funcDef: async dataArg => {
|
||||||
return dataArg
|
return dataArg;
|
||||||
},
|
},
|
||||||
allowedRoles: [testSocketRole1]
|
allowedRoles: [testSocketRole1]
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
// class SmartsocketClient
|
// class SmartsocketClient
|
||||||
tap.test('should react to a new websocket connection from client', async () => {
|
tap.test('should react to a new websocket connection from client', async () => {
|
||||||
let done = smartq.defer()
|
let done = smartq.defer();
|
||||||
testSmartsocketClient = new smartsocket.SmartsocketClient({
|
testSmartsocketClient = new smartsocket.SmartsocketClient({
|
||||||
port: testConfig.port,
|
port: testConfig.port,
|
||||||
url: 'http://localhost',
|
url: 'http://localhost',
|
||||||
password: 'testPassword',
|
password: 'testPassword',
|
||||||
alias: 'testClient1',
|
alias: 'testClient1',
|
||||||
role: 'testRole1'
|
role: 'testRole1'
|
||||||
})
|
});
|
||||||
testSmartsocketClient.connect()
|
testSmartsocketClient.connect().then(() => {
|
||||||
.then(() => {
|
done.resolve();
|
||||||
done.resolve()
|
});
|
||||||
})
|
await done.promise;
|
||||||
await done.promise
|
});
|
||||||
})
|
|
||||||
tap.test('client should disconnect and reconnect', async () => {
|
tap.test('client should disconnect and reconnect', async () => {
|
||||||
let done = smartq.defer()
|
let done = smartq.defer();
|
||||||
testSmartsocketClient.disconnect()
|
testSmartsocketClient
|
||||||
|
.disconnect()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
let done = smartq.defer()
|
let done = smartq.defer();
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
testSmartsocketClient.connect()
|
testSmartsocketClient.connect().then(done.resolve);
|
||||||
.then(done.resolve)
|
}, 0);
|
||||||
}, 0)
|
return done.promise;
|
||||||
return done.promise
|
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
done.resolve()
|
done.resolve();
|
||||||
})
|
});
|
||||||
await done.promise
|
await done.promise;
|
||||||
})
|
});
|
||||||
tap.test('2 clients should connect in parallel', async () => {
|
tap.test('2 clients should connect in parallel', async () => {
|
||||||
// nothing here
|
// nothing here
|
||||||
})
|
});
|
||||||
tap.test('should be able to make a functionCall from client to server', async () => {
|
tap.test('should be able to make a functionCall from client to server', async () => {
|
||||||
let done = smartq.defer()
|
let done = smartq.defer();
|
||||||
testSmartsocketClient.serverCall('testFunction1', {
|
testSmartsocketClient
|
||||||
|
.serverCall('testFunction1', {
|
||||||
value1: 'hello'
|
value1: 'hello'
|
||||||
}).then((dataArg) => {
|
|
||||||
console.log(dataArg)
|
|
||||||
done.resolve()
|
|
||||||
})
|
|
||||||
await done.promise
|
|
||||||
})
|
})
|
||||||
|
.then(dataArg => {
|
||||||
|
console.log(dataArg);
|
||||||
|
done.resolve();
|
||||||
|
});
|
||||||
|
await done.promise;
|
||||||
|
});
|
||||||
|
|
||||||
tap.test('should be able to make a functionCall from server to client', async () => {
|
tap.test('should be able to make a functionCall from server to client', async () => {
|
||||||
let done = smartq.defer()
|
let done = smartq.defer();
|
||||||
let targetSocket = (() => {
|
let targetSocket = (() => {
|
||||||
return smartsocket.allSocketConnections.find((socketConnectionArg) => {
|
return smartsocket.allSocketConnections.find(socketConnectionArg => {
|
||||||
return socketConnectionArg.alias === 'testClient1'
|
return socketConnectionArg.alias === 'testClient1';
|
||||||
})
|
});
|
||||||
})()
|
})();
|
||||||
testSmartsocket.clientCall('testFunction1', {
|
testSmartsocket
|
||||||
|
.clientCall(
|
||||||
|
'testFunction1',
|
||||||
|
{
|
||||||
value1: 'helloFromServer'
|
value1: 'helloFromServer'
|
||||||
}, targetSocket).then((dataArg) => {
|
},
|
||||||
console.log(dataArg)
|
targetSocket
|
||||||
done.resolve()
|
)
|
||||||
})
|
.then(dataArg => {
|
||||||
})
|
console.log(dataArg);
|
||||||
|
done.resolve();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// terminate
|
// terminate
|
||||||
tap.test('should close the server', async () => {
|
tap.test('should close the server', async () => {
|
||||||
await testSmartsocket.closeServer()
|
await testSmartsocket.closeServer();
|
||||||
})
|
});
|
||||||
|
|
||||||
tap.start()
|
tap.start();
|
||||||
|
12
ts/index.ts
12
ts/index.ts
@ -1,10 +1,10 @@
|
|||||||
import * as plugins from './smartsocket.plugins'
|
import * as plugins from './smartsocket.plugins';
|
||||||
|
|
||||||
// export main classes
|
// export main classes
|
||||||
export * from './smartsocket.classes.smartsocket'
|
export * from './smartsocket.classes.smartsocket';
|
||||||
export * from './smartsocket.classes.smartsocketclient'
|
export * from './smartsocket.classes.smartsocketclient';
|
||||||
|
|
||||||
// export further classes and objects
|
// export further classes and objects
|
||||||
export * from './smartsocket.classes.socketfunction'
|
export * from './smartsocket.classes.socketfunction';
|
||||||
export * from './smartsocket.classes.socketrole'
|
export * from './smartsocket.classes.socketrole';
|
||||||
export * from './smartsocket.classes.socketconnection'
|
export * from './smartsocket.classes.socketconnection';
|
||||||
|
@ -1,65 +1,68 @@
|
|||||||
import * as plugins from './smartsocket.plugins'
|
import * as plugins from './smartsocket.plugins';
|
||||||
import * as helpers from './smartsocket.helpers'
|
import * as helpers from './smartsocket.helpers';
|
||||||
|
|
||||||
import * as http from 'http'
|
import * as http from 'http';
|
||||||
|
|
||||||
// classes
|
// classes
|
||||||
import { Objectmap } from 'lik'
|
import { Objectmap } from 'lik';
|
||||||
import { SocketFunction, ISocketFunctionCall } from './smartsocket.classes.socketfunction'
|
import { SocketFunction, ISocketFunctionCall } from './smartsocket.classes.socketfunction';
|
||||||
import { SocketConnection } from './smartsocket.classes.socketconnection'
|
import { SocketConnection } from './smartsocket.classes.socketconnection';
|
||||||
import { SocketRequest } from './smartsocket.classes.socketrequest'
|
import { SocketRequest } from './smartsocket.classes.socketrequest';
|
||||||
import { SocketRole } from './smartsocket.classes.socketrole'
|
import { SocketRole } from './smartsocket.classes.socketrole';
|
||||||
|
|
||||||
|
// socket.io
|
||||||
|
import * as SocketIO from 'socket.io';
|
||||||
|
|
||||||
export interface ISmartsocketConstructorOptions {
|
export interface ISmartsocketConstructorOptions {
|
||||||
port: number
|
port: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Smartsocket {
|
export class Smartsocket {
|
||||||
options: ISmartsocketConstructorOptions
|
options: ISmartsocketConstructorOptions;
|
||||||
httpServer: http.Server
|
httpServer: http.Server;
|
||||||
io: SocketIO.Server
|
io: SocketIO.Server;
|
||||||
openSockets = new Objectmap<SocketConnection>()
|
openSockets = new Objectmap<SocketConnection>();
|
||||||
socketRoles = new Objectmap<SocketRole>()
|
socketRoles = new Objectmap<SocketRole>();
|
||||||
constructor(optionsArg: ISmartsocketConstructorOptions) {
|
constructor(optionsArg: ISmartsocketConstructorOptions) {
|
||||||
this.options = optionsArg
|
this.options = optionsArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* starts listening to incoming sockets:
|
* starts listening to incoming sockets:
|
||||||
*/
|
*/
|
||||||
async startServer() {
|
async startServer() {
|
||||||
let done = plugins.smartq.defer()
|
let done = plugins.smartq.defer();
|
||||||
if (!this.httpServer) {
|
if (!this.httpServer) {
|
||||||
this.httpServer = new http.Server()
|
this.httpServer = new http.Server();
|
||||||
}
|
}
|
||||||
this.io = plugins.socketIo(this.httpServer)
|
this.io = plugins.socketIo(this.httpServer);
|
||||||
this.io.on('connection', (socketArg) => {
|
this.io.on('connection', socketArg => {
|
||||||
this._handleSocketConnection(socketArg)
|
this._handleSocketConnection(socketArg);
|
||||||
})
|
});
|
||||||
this.httpServer.listen(this.options.port, () => {
|
this.httpServer.listen(this.options.port, () => {
|
||||||
done.resolve()
|
done.resolve();
|
||||||
})
|
});
|
||||||
return await done.promise
|
return await done.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* starts the server with another server
|
* starts the server with another server
|
||||||
*/
|
*/
|
||||||
async setServer(httpServerArg: http.Server) {
|
async setServer(httpServerArg: http.Server) {
|
||||||
this.httpServer = httpServerArg
|
this.httpServer = httpServerArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* closes the server
|
* closes the server
|
||||||
*/
|
*/
|
||||||
async closeServer() {
|
async closeServer() {
|
||||||
await plugins.smartdelay.delayFor(1000)
|
await plugins.smartdelay.delayFor(1000);
|
||||||
this.openSockets.forEach((socketObjectArg: SocketConnection) => {
|
this.openSockets.forEach((socketObjectArg: SocketConnection) => {
|
||||||
plugins.beautylog.log(`disconnect socket with >>alias ${socketObjectArg.alias}`)
|
plugins.beautylog.log(`disconnect socket with >>alias ${socketObjectArg.alias}`);
|
||||||
socketObjectArg.socket.disconnect()
|
socketObjectArg.socket.disconnect();
|
||||||
})
|
});
|
||||||
this.openSockets.wipe()
|
this.openSockets.wipe();
|
||||||
this.io.close()
|
this.io.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
// communication
|
// communication
|
||||||
@ -68,7 +71,7 @@ export class Smartsocket {
|
|||||||
* allows call to specific client.
|
* allows call to specific client.
|
||||||
*/
|
*/
|
||||||
clientCall(functionNameArg: string, dataArg: any, targetSocketConnectionArg: SocketConnection) {
|
clientCall(functionNameArg: string, dataArg: any, targetSocketConnectionArg: SocketConnection) {
|
||||||
let done = plugins.smartq.defer()
|
let done = plugins.smartq.defer();
|
||||||
let socketRequest = new SocketRequest({
|
let socketRequest = new SocketRequest({
|
||||||
side: 'requesting',
|
side: 'requesting',
|
||||||
originSocketConnection: targetSocketConnectionArg,
|
originSocketConnection: targetSocketConnectionArg,
|
||||||
@ -77,12 +80,11 @@ export class Smartsocket {
|
|||||||
funcName: functionNameArg,
|
funcName: functionNameArg,
|
||||||
funcDataArg: dataArg
|
funcDataArg: dataArg
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
socketRequest.dispatch()
|
socketRequest.dispatch().then((dataArg: ISocketFunctionCall) => {
|
||||||
.then((dataArg: ISocketFunctionCall) => {
|
done.resolve(dataArg.funcDataArg);
|
||||||
done.resolve(dataArg.funcDataArg)
|
});
|
||||||
})
|
return done.promise;
|
||||||
return done.promise
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -90,9 +92,9 @@ export class Smartsocket {
|
|||||||
*/
|
*/
|
||||||
addSocketRoles(socketRolesArray: SocketRole[]): void {
|
addSocketRoles(socketRolesArray: SocketRole[]): void {
|
||||||
for (let socketRole of socketRolesArray) {
|
for (let socketRole of socketRolesArray) {
|
||||||
this.socketRoles.add(socketRole)
|
this.socketRoles.add(socketRole);
|
||||||
}
|
}
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -106,16 +108,16 @@ export class Smartsocket {
|
|||||||
side: 'server',
|
side: 'server',
|
||||||
smartsocketHost: this,
|
smartsocketHost: this,
|
||||||
socket: socketArg
|
socket: socketArg
|
||||||
})
|
});
|
||||||
plugins.beautylog.log('Socket connected. Trying to authenticate...')
|
plugins.beautylog.log('Socket connected. Trying to authenticate...');
|
||||||
this.openSockets.add(socketConnection)
|
this.openSockets.add(socketConnection);
|
||||||
socketConnection.authenticate()
|
socketConnection
|
||||||
|
.authenticate()
|
||||||
.then(() => {
|
.then(() => {
|
||||||
return socketConnection.listenToFunctionRequests()
|
return socketConnection.listenToFunctionRequests();
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err)
|
|
||||||
})
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,47 +1,46 @@
|
|||||||
import * as plugins from './smartsocket.plugins'
|
import * as plugins from './smartsocket.plugins';
|
||||||
|
|
||||||
|
|
||||||
// import interfaces
|
// import interfaces
|
||||||
import { ISocketFunctionCall } from './smartsocket.classes.socketfunction'
|
import { ISocketFunctionCall } from './smartsocket.classes.socketfunction';
|
||||||
import { ISocketRequestDataObject } from './smartsocket.classes.socketrequest'
|
import { ISocketRequestDataObject } from './smartsocket.classes.socketrequest';
|
||||||
|
|
||||||
// import classes
|
// import classes
|
||||||
import { SocketConnection } from './smartsocket.classes.socketconnection'
|
import { SocketConnection } from './smartsocket.classes.socketconnection';
|
||||||
import { SocketFunction } from './smartsocket.classes.socketfunction'
|
import { SocketFunction } from './smartsocket.classes.socketfunction';
|
||||||
import { SocketRequest } from './smartsocket.classes.socketrequest'
|
import { SocketRequest } from './smartsocket.classes.socketrequest';
|
||||||
/**
|
/**
|
||||||
* interface for class SmartsocketClient
|
* interface for class SmartsocketClient
|
||||||
*/
|
*/
|
||||||
export interface ISmartsocketClientOptions {
|
export interface ISmartsocketClientOptions {
|
||||||
port: number
|
port: number;
|
||||||
url: string
|
url: string;
|
||||||
alias: string // an alias makes it easier to identify this client in a multo client environment
|
alias: string; // an alias makes it easier to identify this client in a multo client environment
|
||||||
role: string
|
role: string;
|
||||||
password: string // by setting a password access to functions can be limited
|
password: string; // by setting a password access to functions can be limited
|
||||||
}
|
}
|
||||||
|
|
||||||
export class SmartsocketClient {
|
export class SmartsocketClient {
|
||||||
alias: string
|
alias: string;
|
||||||
role: string
|
role: string;
|
||||||
socketConnection: SocketConnection
|
socketConnection: SocketConnection;
|
||||||
serverUrl: string
|
serverUrl: string;
|
||||||
serverPort: number
|
serverPort: number;
|
||||||
serverPassword: string
|
serverPassword: string;
|
||||||
constructor(optionsArg: ISmartsocketClientOptions) {
|
constructor(optionsArg: ISmartsocketClientOptions) {
|
||||||
this.alias = optionsArg.alias
|
this.alias = optionsArg.alias;
|
||||||
this.role = optionsArg.role
|
this.role = optionsArg.role;
|
||||||
this.serverUrl = optionsArg.url
|
this.serverUrl = optionsArg.url;
|
||||||
this.serverPort = optionsArg.port
|
this.serverPort = optionsArg.port;
|
||||||
this.serverPassword = optionsArg.password
|
this.serverPassword = optionsArg.password;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* connect the client to the server
|
* connect the client to the server
|
||||||
*/
|
*/
|
||||||
connect() {
|
connect() {
|
||||||
let done = plugins.smartq.defer()
|
let done = plugins.smartq.defer();
|
||||||
plugins.beautylog.log('trying to connect...')
|
plugins.beautylog.log('trying to connect...');
|
||||||
let socketUrl = `${this.serverUrl}:${this.serverPort}`
|
let socketUrl = `${this.serverUrl}:${this.serverPort}`;
|
||||||
this.socketConnection = new SocketConnection({
|
this.socketConnection = new SocketConnection({
|
||||||
alias: this.alias,
|
alias: this.alias,
|
||||||
authenticated: false,
|
authenticated: false,
|
||||||
@ -49,35 +48,35 @@ export class SmartsocketClient {
|
|||||||
side: 'client',
|
side: 'client',
|
||||||
smartsocketHost: null,
|
smartsocketHost: null,
|
||||||
socket: plugins.socketIoClient(socketUrl, { multiplex: false })
|
socket: plugins.socketIoClient(socketUrl, { multiplex: false })
|
||||||
})
|
});
|
||||||
this.socketConnection.socket.on('requestAuth', () => {
|
this.socketConnection.socket.on('requestAuth', () => {
|
||||||
console.log('server requested authentication')
|
console.log('server requested authentication');
|
||||||
this.socketConnection.socket.emit('dataAuth', {
|
this.socketConnection.socket.emit('dataAuth', {
|
||||||
role: this.role,
|
role: this.role,
|
||||||
password: this.serverPassword,
|
password: this.serverPassword,
|
||||||
alias: this.alias
|
alias: this.alias
|
||||||
})
|
});
|
||||||
this.socketConnection.socket.on('authenticated', () => {
|
this.socketConnection.socket.on('authenticated', () => {
|
||||||
console.log('client is authenticated')
|
console.log('client is authenticated');
|
||||||
this.socketConnection.authenticated = true
|
this.socketConnection.authenticated = true;
|
||||||
this.socketConnection.listenToFunctionRequests()
|
this.socketConnection.listenToFunctionRequests();
|
||||||
done.resolve()
|
done.resolve();
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
return done.promise
|
return done.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
disconnect() {
|
disconnect() {
|
||||||
let done = plugins.smartq.defer()
|
let done = plugins.smartq.defer();
|
||||||
this.socketConnection.socket.disconnect()
|
this.socketConnection.socket.disconnect();
|
||||||
this.socketConnection = undefined
|
this.socketConnection = undefined;
|
||||||
plugins.beautylog.ok('disconnected!')
|
plugins.beautylog.ok('disconnected!');
|
||||||
done.resolve()
|
done.resolve();
|
||||||
return done.promise
|
return done.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
serverCall(functionNameArg: string, dataArg: any) {
|
serverCall(functionNameArg: string, dataArg: any) {
|
||||||
let done = plugins.smartq.defer()
|
let done = plugins.smartq.defer();
|
||||||
let socketRequest = new SocketRequest({
|
let socketRequest = new SocketRequest({
|
||||||
side: 'requesting',
|
side: 'requesting',
|
||||||
originSocketConnection: this.socketConnection,
|
originSocketConnection: this.socketConnection,
|
||||||
@ -86,12 +85,10 @@ export class SmartsocketClient {
|
|||||||
funcName: functionNameArg,
|
funcName: functionNameArg,
|
||||||
funcDataArg: dataArg
|
funcDataArg: dataArg
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
socketRequest.dispatch()
|
socketRequest.dispatch().then((dataArg: ISocketFunctionCall) => {
|
||||||
.then((dataArg: ISocketFunctionCall) => {
|
done.resolve(dataArg.funcDataArg);
|
||||||
done.resolve(dataArg.funcDataArg)
|
});
|
||||||
})
|
return done.promise;
|
||||||
return done.promise
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,70 +1,79 @@
|
|||||||
import * as plugins from './smartsocket.plugins'
|
import * as plugins from './smartsocket.plugins';
|
||||||
import * as helpers from './smartsocket.helpers'
|
import * as helpers from './smartsocket.helpers';
|
||||||
|
|
||||||
import { Objectmap } from 'lik'
|
import { Objectmap } from 'lik';
|
||||||
|
|
||||||
// import classes
|
// import classes
|
||||||
import { Smartsocket } from './smartsocket.classes.smartsocket'
|
import { Smartsocket } from './smartsocket.classes.smartsocket';
|
||||||
import { SocketFunction } from './smartsocket.classes.socketfunction'
|
import { SocketFunction } from './smartsocket.classes.socketfunction';
|
||||||
import { SocketRequest, ISocketRequestDataObject, allSocketRequests } from './smartsocket.classes.socketrequest'
|
import {
|
||||||
import { SocketRole } from './smartsocket.classes.socketrole'
|
SocketRequest,
|
||||||
|
ISocketRequestDataObject,
|
||||||
|
allSocketRequests
|
||||||
|
} from './smartsocket.classes.socketrequest';
|
||||||
|
import { SocketRole } from './smartsocket.classes.socketrole';
|
||||||
|
|
||||||
|
// socket.io
|
||||||
|
import * as SocketIO from 'socket.io';
|
||||||
|
|
||||||
// export interfaces
|
// export interfaces
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* defines is a SocketConnection is server or client side. Important for mesh setups.
|
* defines is a SocketConnection is server or client side. Important for mesh setups.
|
||||||
*/
|
*/
|
||||||
export type TSocketConnectionSide = 'server' | 'client'
|
export type TSocketConnectionSide = 'server' | 'client';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* interface for constructor of class SocketConnection
|
* interface for constructor of class SocketConnection
|
||||||
*/
|
*/
|
||||||
export interface ISocketConnectionConstructorOptions {
|
export interface ISocketConnectionConstructorOptions {
|
||||||
alias: string
|
alias: string;
|
||||||
authenticated: boolean
|
authenticated: boolean;
|
||||||
role: SocketRole
|
role: SocketRole;
|
||||||
side: TSocketConnectionSide
|
side: TSocketConnectionSide;
|
||||||
smartsocketHost: Smartsocket
|
smartsocketHost: Smartsocket;
|
||||||
socket: SocketIO.Socket | SocketIOClient.Socket
|
socket: SocketIO.Socket | SocketIOClient.Socket;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* interface for authentication data
|
* interface for authentication data
|
||||||
*/
|
*/
|
||||||
export interface ISocketConnectionAuthenticationObject {
|
export interface ISocketConnectionAuthenticationObject {
|
||||||
role: 'coreflowContainer',
|
role: 'coreflowContainer';
|
||||||
password: 'somePassword',
|
password: 'somePassword';
|
||||||
alias: 'coreflow1'
|
alias: 'coreflow1';
|
||||||
}
|
}
|
||||||
|
|
||||||
// export classes
|
// export classes
|
||||||
export let allSocketConnections = new Objectmap<SocketConnection>()
|
export let allSocketConnections = new Objectmap<SocketConnection>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class SocketConnection represents a websocket connection
|
* class SocketConnection represents a websocket connection
|
||||||
*/
|
*/
|
||||||
export class SocketConnection {
|
export class SocketConnection {
|
||||||
alias: string
|
alias: string;
|
||||||
side: TSocketConnectionSide
|
side: TSocketConnectionSide;
|
||||||
authenticated: boolean = false
|
authenticated: boolean = false;
|
||||||
role: SocketRole
|
role: SocketRole;
|
||||||
smartsocketHost: Smartsocket
|
smartsocketHost: Smartsocket;
|
||||||
socket: any // SocketIO.Socket | SocketIOClient.Socket
|
socket: any; // SocketIO.Socket | SocketIOClient.Socket
|
||||||
constructor(optionsArg: ISocketConnectionConstructorOptions) {
|
constructor(optionsArg: ISocketConnectionConstructorOptions) {
|
||||||
this.alias = optionsArg.alias
|
this.alias = optionsArg.alias;
|
||||||
this.authenticated = optionsArg.authenticated
|
this.authenticated = optionsArg.authenticated;
|
||||||
this.role = optionsArg.role
|
this.role = optionsArg.role;
|
||||||
this.side = optionsArg.side
|
this.side = optionsArg.side;
|
||||||
this.smartsocketHost = optionsArg.smartsocketHost
|
this.smartsocketHost = optionsArg.smartsocketHost;
|
||||||
this.socket = optionsArg.socket
|
this.socket = optionsArg.socket;
|
||||||
|
|
||||||
// standard behaviour that is always true
|
// standard behaviour that is always true
|
||||||
allSocketConnections.add(this)
|
allSocketConnections.add(this);
|
||||||
this.socket.on('disconnect', () => {
|
this.socket.on('disconnect', () => {
|
||||||
plugins.beautylog.info(`SocketConnection with >alias ${this.alias} on >side ${this.side} disconnected`)
|
plugins.beautylog.info(
|
||||||
this.socket.disconnect()
|
`SocketConnection with >alias ${this.alias} on >side ${this.side} disconnected`
|
||||||
allSocketConnections.remove(this)
|
);
|
||||||
})
|
this.socket.disconnect();
|
||||||
|
allSocketConnections.remove(this);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// authenticating --------------------------
|
// authenticating --------------------------
|
||||||
@ -73,25 +82,28 @@ export class SocketConnection {
|
|||||||
* authenticate the socket
|
* authenticate the socket
|
||||||
*/
|
*/
|
||||||
authenticate() {
|
authenticate() {
|
||||||
let done = plugins.smartq.defer()
|
let done = plugins.smartq.defer();
|
||||||
this.socket.on('dataAuth', (dataArg: ISocketConnectionAuthenticationObject) => {
|
this.socket.on('dataAuth', (dataArg: ISocketConnectionAuthenticationObject) => {
|
||||||
plugins.beautylog.log('received authentication data. now hashing and comparing...')
|
plugins.beautylog.log('received authentication data. now hashing and comparing...');
|
||||||
this.socket.removeListener('dataAuth', () => { })
|
this.socket.removeListener('dataAuth', () => {});
|
||||||
if (helpers.checkPasswordForRole(dataArg, this.smartsocketHost)) { // TODO: authenticate password
|
if (helpers.checkPasswordForRole(dataArg, this.smartsocketHost)) {
|
||||||
this.alias = dataArg.alias
|
// TODO: authenticate password
|
||||||
this.authenticated = true
|
this.alias = dataArg.alias;
|
||||||
this.role = helpers.getSocketRoleByName(dataArg.role, this.smartsocketHost)
|
this.authenticated = true;
|
||||||
this.socket.emit('authenticated')
|
this.role = helpers.getSocketRoleByName(dataArg.role, this.smartsocketHost);
|
||||||
plugins.beautylog.ok(`socket with >>alias ${this.alias} >>role ${this.role} is authenticated!`)
|
this.socket.emit('authenticated');
|
||||||
done.resolve(this)
|
plugins.beautylog.ok(
|
||||||
|
`socket with >>alias ${this.alias} >>role ${this.role} is authenticated!`
|
||||||
|
);
|
||||||
|
done.resolve(this);
|
||||||
} else {
|
} else {
|
||||||
this.authenticated = false
|
this.authenticated = false;
|
||||||
this.socket.disconnect()
|
this.socket.disconnect();
|
||||||
done.reject('not authenticated')
|
done.reject('not authenticated');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.socket.emit('requestAuth')
|
this.socket.emit('requestAuth');
|
||||||
return done.promise
|
return done.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
// listening -------------------------------
|
// listening -------------------------------
|
||||||
@ -100,42 +112,43 @@ export class SocketConnection {
|
|||||||
* listen to function requests
|
* listen to function requests
|
||||||
*/
|
*/
|
||||||
listenToFunctionRequests() {
|
listenToFunctionRequests() {
|
||||||
let done = plugins.smartq.defer()
|
let done = plugins.smartq.defer();
|
||||||
if (this.authenticated) {
|
if (this.authenticated) {
|
||||||
this.socket.on('function', (dataArg: ISocketRequestDataObject) => {
|
this.socket.on('function', (dataArg: ISocketRequestDataObject) => {
|
||||||
// check if requested function is available to the socket's scope
|
// check if requested function is available to the socket's scope
|
||||||
plugins.beautylog.log('function request received')
|
plugins.beautylog.log('function request received');
|
||||||
let referencedFunction: SocketFunction = this.role.allowedFunctions.find((socketFunctionArg) => {
|
let referencedFunction: SocketFunction = this.role.allowedFunctions.find(
|
||||||
return socketFunctionArg.name === dataArg.funcCallData.funcName
|
socketFunctionArg => {
|
||||||
})
|
return socketFunctionArg.name === dataArg.funcCallData.funcName;
|
||||||
|
}
|
||||||
|
);
|
||||||
if (referencedFunction !== undefined) {
|
if (referencedFunction !== undefined) {
|
||||||
plugins.beautylog.ok!('function in access scope')
|
plugins.beautylog.ok!('function in access scope');
|
||||||
let localSocketRequest = new SocketRequest({
|
let localSocketRequest = new SocketRequest({
|
||||||
side: 'responding',
|
side: 'responding',
|
||||||
originSocketConnection: this,
|
originSocketConnection: this,
|
||||||
shortId: dataArg.shortId,
|
shortId: dataArg.shortId,
|
||||||
funcCallData: dataArg.funcCallData
|
funcCallData: dataArg.funcCallData
|
||||||
})
|
});
|
||||||
localSocketRequest.createResponse() // takes care of creating response and sending it back
|
localSocketRequest.createResponse(); // takes care of creating response and sending it back
|
||||||
} else {
|
} else {
|
||||||
plugins.beautylog.warn('function not existent or out of access scope')
|
plugins.beautylog.warn('function not existent or out of access scope');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.socket.on('functionResponse', (dataArg: ISocketRequestDataObject) => {
|
this.socket.on('functionResponse', (dataArg: ISocketRequestDataObject) => {
|
||||||
plugins.beautylog.info(`received response for request with id ${dataArg.shortId}`)
|
plugins.beautylog.info(`received response for request with id ${dataArg.shortId}`);
|
||||||
let targetSocketRequest = helpers.getSocketRequestById(dataArg.shortId)
|
let targetSocketRequest = helpers.getSocketRequestById(dataArg.shortId);
|
||||||
targetSocketRequest.handleResponse(dataArg)
|
targetSocketRequest.handleResponse(dataArg);
|
||||||
})
|
});
|
||||||
plugins.beautylog.log(`now listening to function requests for ${this.alias}`)
|
plugins.beautylog.log(`now listening to function requests for ${this.alias}`);
|
||||||
done.resolve(this)
|
done.resolve(this);
|
||||||
} else {
|
} else {
|
||||||
let errMessage: 'socket needs to be authenticated first'
|
let errMessage: 'socket needs to be authenticated first';
|
||||||
plugins.beautylog.error(errMessage)
|
plugins.beautylog.error(errMessage);
|
||||||
done.reject(errMessage)
|
done.reject(errMessage);
|
||||||
}
|
}
|
||||||
return done.promise
|
return done.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
// sending ----------------------
|
// sending ----------------------
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import * as plugins from './smartsocket.plugins'
|
import * as plugins from './smartsocket.plugins';
|
||||||
|
|
||||||
// import classes
|
// import classes
|
||||||
import { Objectmap } from 'lik'
|
import { Objectmap } from 'lik';
|
||||||
import { SocketRole } from './smartsocket.classes.socketrole'
|
import { SocketRole } from './smartsocket.classes.socketrole';
|
||||||
|
|
||||||
// export interfaces
|
// export interfaces
|
||||||
|
|
||||||
@ -10,28 +10,28 @@ import { SocketRole } from './smartsocket.classes.socketrole'
|
|||||||
* interface of the contructor options of class SocketFunction
|
* interface of the contructor options of class SocketFunction
|
||||||
*/
|
*/
|
||||||
export interface ISocketFunctionConstructorOptions {
|
export interface ISocketFunctionConstructorOptions {
|
||||||
funcName: string
|
funcName: string;
|
||||||
funcDef: any
|
funcDef: any;
|
||||||
allowedRoles: SocketRole[] // all roles that are allowed to execute a SocketFunction
|
allowedRoles: SocketRole[]; // all roles that are allowed to execute a SocketFunction
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* interface of the Socket Function call, in other words the object that routes a call to a function
|
* interface of the Socket Function call, in other words the object that routes a call to a function
|
||||||
*/
|
*/
|
||||||
export interface ISocketFunctionCall {
|
export interface ISocketFunctionCall {
|
||||||
funcName: string
|
funcName: string;
|
||||||
funcDataArg: any
|
funcDataArg: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* interface for function definition of SocketFunction
|
* interface for function definition of SocketFunction
|
||||||
*/
|
*/
|
||||||
export interface IFuncDef {
|
export interface IFuncDef {
|
||||||
(dataArg: any): PromiseLike<any>
|
(dataArg: any): PromiseLike<any>;
|
||||||
}
|
}
|
||||||
|
|
||||||
// export objects
|
// export objects
|
||||||
export let allSocketFunctions = new Objectmap<SocketFunction>()
|
export let allSocketFunctions = new Objectmap<SocketFunction>();
|
||||||
|
|
||||||
// export classes
|
// export classes
|
||||||
|
|
||||||
@ -39,48 +39,46 @@ export let allSocketFunctions = new Objectmap<SocketFunction>()
|
|||||||
* class that respresents a function that can be transparently called using a SocketConnection
|
* class that respresents a function that can be transparently called using a SocketConnection
|
||||||
*/
|
*/
|
||||||
export class SocketFunction {
|
export class SocketFunction {
|
||||||
name: string
|
name: string;
|
||||||
funcDef: IFuncDef
|
funcDef: IFuncDef;
|
||||||
roles: SocketRole[]
|
roles: SocketRole[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* the constructor for SocketFunction
|
* the constructor for SocketFunction
|
||||||
*/
|
*/
|
||||||
constructor(optionsArg: ISocketFunctionConstructorOptions) {
|
constructor(optionsArg: ISocketFunctionConstructorOptions) {
|
||||||
this.name = optionsArg.funcName
|
this.name = optionsArg.funcName;
|
||||||
this.funcDef = optionsArg.funcDef
|
this.funcDef = optionsArg.funcDef;
|
||||||
this.roles = optionsArg.allowedRoles
|
this.roles = optionsArg.allowedRoles;
|
||||||
for (let socketRoleArg of this.roles) {
|
for (let socketRoleArg of this.roles) {
|
||||||
this._notifyRole(socketRoleArg)
|
this._notifyRole(socketRoleArg);
|
||||||
}
|
}
|
||||||
allSocketFunctions.add(this) // map instance with Objectmap
|
allSocketFunctions.add(this); // map instance with Objectmap
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* invokes the function of this SocketFunction
|
* invokes the function of this SocketFunction
|
||||||
*/
|
*/
|
||||||
invoke(dataArg: ISocketFunctionCall): Promise<any> {
|
invoke(dataArg: ISocketFunctionCall): Promise<any> {
|
||||||
let done = plugins.smartq.defer()
|
let done = plugins.smartq.defer();
|
||||||
if (dataArg.funcName === this.name) {
|
if (dataArg.funcName === this.name) {
|
||||||
this.funcDef(dataArg.funcDataArg)
|
this.funcDef(dataArg.funcDataArg).then((resultData: any) => {
|
||||||
.then((resultData: any) => {
|
|
||||||
let funcResponseData: ISocketFunctionCall = {
|
let funcResponseData: ISocketFunctionCall = {
|
||||||
funcName: this.name,
|
funcName: this.name,
|
||||||
funcDataArg: resultData
|
funcDataArg: resultData
|
||||||
}
|
};
|
||||||
done.resolve(funcResponseData)
|
done.resolve(funcResponseData);
|
||||||
})
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw new Error("SocketFunction.name does not match the data argument's .name!")
|
throw new Error("SocketFunction.name does not match the data argument's .name!");
|
||||||
}
|
}
|
||||||
return done.promise
|
return done.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* notifies a role about access to this SocketFunction
|
* notifies a role about access to this SocketFunction
|
||||||
*/
|
*/
|
||||||
private _notifyRole(socketRoleArg: SocketRole) {
|
private _notifyRole(socketRoleArg: SocketRole) {
|
||||||
socketRoleArg.addSocketFunction(this)
|
socketRoleArg.addSocketFunction(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,54 +1,54 @@
|
|||||||
import * as plugins from './smartsocket.plugins'
|
import * as plugins from './smartsocket.plugins';
|
||||||
import * as helpers from './smartsocket.helpers'
|
import * as helpers from './smartsocket.helpers';
|
||||||
|
|
||||||
// import interfaces
|
// import interfaces
|
||||||
import { ISocketFunctionCall } from './smartsocket.classes.socketfunction'
|
import { ISocketFunctionCall } from './smartsocket.classes.socketfunction';
|
||||||
|
|
||||||
// import classes
|
// import classes
|
||||||
import { Objectmap } from 'lik'
|
import { Objectmap } from 'lik';
|
||||||
import { SocketFunction } from './smartsocket.classes.socketfunction'
|
import { SocketFunction } from './smartsocket.classes.socketfunction';
|
||||||
import { SocketConnection } from './smartsocket.classes.socketconnection'
|
import { SocketConnection } from './smartsocket.classes.socketconnection';
|
||||||
|
|
||||||
// export interfaces
|
// export interfaces
|
||||||
export type TSocketRequestStatus = 'new' | 'pending' | 'finished'
|
export type TSocketRequestStatus = 'new' | 'pending' | 'finished';
|
||||||
export type TSocketRequestSide = 'requesting' | 'responding'
|
export type TSocketRequestSide = 'requesting' | 'responding';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* interface of constructor of class SocketRequest
|
* interface of constructor of class SocketRequest
|
||||||
*/
|
*/
|
||||||
export interface SocketRequestConstructorOptions {
|
export interface SocketRequestConstructorOptions {
|
||||||
side: TSocketRequestSide
|
side: TSocketRequestSide;
|
||||||
originSocketConnection: SocketConnection
|
originSocketConnection: SocketConnection;
|
||||||
shortId: string
|
shortId: string;
|
||||||
funcCallData?: ISocketFunctionCall
|
funcCallData?: ISocketFunctionCall;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* request object that is sent initially and may or may not receive a response
|
* request object that is sent initially and may or may not receive a response
|
||||||
*/
|
*/
|
||||||
export interface ISocketRequestDataObject {
|
export interface ISocketRequestDataObject {
|
||||||
funcCallData: ISocketFunctionCall
|
funcCallData: ISocketFunctionCall;
|
||||||
shortId: string
|
shortId: string;
|
||||||
responseTimeout?: number
|
responseTimeout?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
// export objects
|
// export objects
|
||||||
export let allSocketRequests = new Objectmap<SocketRequest>()
|
export let allSocketRequests = new Objectmap<SocketRequest>();
|
||||||
|
|
||||||
// export classes
|
// export classes
|
||||||
export class SocketRequest {
|
export class SocketRequest {
|
||||||
status: TSocketRequestStatus = 'new'
|
status: TSocketRequestStatus = 'new';
|
||||||
side: TSocketRequestSide
|
side: TSocketRequestSide;
|
||||||
shortid: string
|
shortid: string;
|
||||||
originSocketConnection: SocketConnection
|
originSocketConnection: SocketConnection;
|
||||||
funcCallData: ISocketFunctionCall
|
funcCallData: ISocketFunctionCall;
|
||||||
done = plugins.smartq.defer()
|
done = plugins.smartq.defer();
|
||||||
constructor(optionsArg: SocketRequestConstructorOptions) {
|
constructor(optionsArg: SocketRequestConstructorOptions) {
|
||||||
this.side = optionsArg.side
|
this.side = optionsArg.side;
|
||||||
this.shortid = optionsArg.shortId
|
this.shortid = optionsArg.shortId;
|
||||||
this.funcCallData = optionsArg.funcCallData
|
this.funcCallData = optionsArg.funcCallData;
|
||||||
this.originSocketConnection = optionsArg.originSocketConnection
|
this.originSocketConnection = optionsArg.originSocketConnection;
|
||||||
allSocketRequests.add(this)
|
allSocketRequests.add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// requesting --------------------------
|
// requesting --------------------------
|
||||||
@ -60,18 +60,18 @@ export class SocketRequest {
|
|||||||
let requestData: ISocketRequestDataObject = {
|
let requestData: ISocketRequestDataObject = {
|
||||||
funcCallData: this.funcCallData,
|
funcCallData: this.funcCallData,
|
||||||
shortId: this.shortid
|
shortId: this.shortid
|
||||||
}
|
};
|
||||||
this.originSocketConnection.socket.emit('function', requestData)
|
this.originSocketConnection.socket.emit('function', requestData);
|
||||||
return this.done.promise
|
return this.done.promise;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* handles the response that is received by the requesting side
|
* handles the response that is received by the requesting side
|
||||||
*/
|
*/
|
||||||
handleResponse(responseDataArg: ISocketRequestDataObject) {
|
handleResponse(responseDataArg: ISocketRequestDataObject) {
|
||||||
plugins.beautylog.log('handling response!')
|
plugins.beautylog.log('handling response!');
|
||||||
this.done.resolve(responseDataArg.funcCallData)
|
this.done.resolve(responseDataArg.funcCallData);
|
||||||
allSocketRequests.remove(this)
|
allSocketRequests.remove(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// responding --------------------------
|
// responding --------------------------
|
||||||
@ -80,17 +80,18 @@ export class SocketRequest {
|
|||||||
* creates the response on the responding side
|
* creates the response on the responding side
|
||||||
*/
|
*/
|
||||||
createResponse() {
|
createResponse() {
|
||||||
let targetSocketFunction: SocketFunction = helpers.getSocketFunctionByName(this.funcCallData.funcName)
|
let targetSocketFunction: SocketFunction = helpers.getSocketFunctionByName(
|
||||||
plugins.beautylog.info(`invoking ${targetSocketFunction.name}`)
|
this.funcCallData.funcName
|
||||||
targetSocketFunction.invoke(this.funcCallData)
|
);
|
||||||
.then((resultData) => {
|
plugins.beautylog.info(`invoking ${targetSocketFunction.name}`);
|
||||||
plugins.beautylog.log('got resultData. Sending it to requesting party.')
|
targetSocketFunction.invoke(this.funcCallData).then(resultData => {
|
||||||
|
plugins.beautylog.log('got resultData. Sending it to requesting party.');
|
||||||
let requestData: ISocketRequestDataObject = {
|
let requestData: ISocketRequestDataObject = {
|
||||||
funcCallData: resultData,
|
funcCallData: resultData,
|
||||||
shortId: this.shortid
|
shortId: this.shortid
|
||||||
}
|
};
|
||||||
this.originSocketConnection.socket.emit('functionResponse', requestData)
|
this.originSocketConnection.socket.emit('functionResponse', requestData);
|
||||||
allSocketRequests.remove(this)
|
allSocketRequests.remove(this);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import * as plugins from "./smartsocket.plugins";
|
import * as plugins from './smartsocket.plugins';
|
||||||
|
|
||||||
// import classes
|
// import classes
|
||||||
import { Objectmap } from "lik";
|
import { Objectmap } from 'lik';
|
||||||
import { SocketFunction } from "./smartsocket.classes.socketfunction";
|
import { SocketFunction } from './smartsocket.classes.socketfunction';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* interface for class SocketRole
|
* interface for class SocketRole
|
||||||
@ -23,7 +22,7 @@ export class SocketRole {
|
|||||||
constructor(optionsArg: SocketRoleOptions) {
|
constructor(optionsArg: SocketRoleOptions) {
|
||||||
this.name = optionsArg.name;
|
this.name = optionsArg.name;
|
||||||
this.passwordHash = optionsArg.passwordHash;
|
this.passwordHash = optionsArg.passwordHash;
|
||||||
};
|
}
|
||||||
addSocketFunction(socketFunctionArg: SocketFunction) {
|
addSocketFunction(socketFunctionArg: SocketFunction) {
|
||||||
this.allowedFunctions.add(socketFunctionArg);
|
this.allowedFunctions.add(socketFunctionArg);
|
||||||
}
|
}
|
||||||
|
@ -1,40 +1,60 @@
|
|||||||
import * as plugins from "./smartsocket.plugins";
|
import * as plugins from './smartsocket.plugins';
|
||||||
|
|
||||||
// classes
|
// classes
|
||||||
import { Smartsocket } from "./smartsocket.classes.smartsocket";
|
import { Smartsocket } from './smartsocket.classes.smartsocket';
|
||||||
import { SocketFunction, allSocketFunctions } from "./smartsocket.classes.socketfunction";
|
import { SocketFunction, allSocketFunctions } from './smartsocket.classes.socketfunction';
|
||||||
import { SocketConnection, ISocketConnectionAuthenticationObject } from "./smartsocket.classes.socketconnection";
|
import {
|
||||||
import { SocketRequest, allSocketRequests, TSocketRequestSide } from "./smartsocket.classes.socketrequest";
|
SocketConnection,
|
||||||
import { SocketRole } from "./smartsocket.classes.socketrole";
|
ISocketConnectionAuthenticationObject
|
||||||
|
} from './smartsocket.classes.socketconnection';
|
||||||
|
import {
|
||||||
|
SocketRequest,
|
||||||
|
allSocketRequests,
|
||||||
|
TSocketRequestSide
|
||||||
|
} from './smartsocket.classes.socketrequest';
|
||||||
|
import { SocketRole } from './smartsocket.classes.socketrole';
|
||||||
|
|
||||||
// SocketConnection helpers
|
// SocketConnection helpers
|
||||||
export let checkPasswordForRole = (dataArg: ISocketConnectionAuthenticationObject, referenceSmartsocket:Smartsocket): boolean => {
|
export let checkPasswordForRole = (
|
||||||
|
dataArg: ISocketConnectionAuthenticationObject,
|
||||||
|
referenceSmartsocket: Smartsocket
|
||||||
|
): boolean => {
|
||||||
let targetPasswordHash = getSocketRoleByName(dataArg.role, referenceSmartsocket).passwordHash;
|
let targetPasswordHash = getSocketRoleByName(dataArg.role, referenceSmartsocket).passwordHash;
|
||||||
let computedCompareHash = plugins.nodehash.sha256FromStringSync(dataArg.password);
|
let computedCompareHash = plugins.nodehash.sha256FromStringSync(dataArg.password);
|
||||||
return targetPasswordHash === computedCompareHash;
|
return targetPasswordHash === computedCompareHash;
|
||||||
}
|
};
|
||||||
|
|
||||||
|
|
||||||
// SocketFunction helpers
|
// SocketFunction helpers
|
||||||
export let getSocketFunctionByName = (functionNameArg: string): SocketFunction => {
|
export let getSocketFunctionByName = (functionNameArg: string): SocketFunction => {
|
||||||
return allSocketFunctions.find((socketFunctionArg) => { return socketFunctionArg.name === functionNameArg });
|
return allSocketFunctions.find(socketFunctionArg => {
|
||||||
}
|
return socketFunctionArg.name === functionNameArg;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// SocketRequest helpers
|
// SocketRequest helpers
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get corresponding Socketrequest instance by shortId
|
* get corresponding Socketrequest instance by shortId
|
||||||
*/
|
*/
|
||||||
export let getSocketRequestById = (shortIdArg: string, requestSide?: TSocketRequestSide): SocketRequest => {
|
export let getSocketRequestById = (
|
||||||
return allSocketRequests.find((socketRequestArg) => { return socketRequestArg.shortid === shortIdArg })
|
shortIdArg: string,
|
||||||
}
|
requestSide?: TSocketRequestSide
|
||||||
|
): SocketRequest => {
|
||||||
|
return allSocketRequests.find(socketRequestArg => {
|
||||||
|
return socketRequestArg.shortid === shortIdArg;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
// SocketRole helpers
|
// SocketRole helpers
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get corresponding SocketRole instance by name
|
* get corresponding SocketRole instance by name
|
||||||
*/
|
*/
|
||||||
export let getSocketRoleByName = (socketRoleNameArg: string,referenceSmartsocket:Smartsocket): SocketRole => {
|
export let getSocketRoleByName = (
|
||||||
return referenceSmartsocket.socketRoles.find((socketRoleArg) => { return socketRoleArg.name === socketRoleNameArg })
|
socketRoleNameArg: string,
|
||||||
|
referenceSmartsocket: Smartsocket
|
||||||
|
): SocketRole => {
|
||||||
|
return referenceSmartsocket.socketRoles.find(socketRoleArg => {
|
||||||
|
return socketRoleArg.name === socketRoleNameArg;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
import 'typings-global'
|
export import beautylog = require('beautylog');
|
||||||
export import beautylog = require('beautylog')
|
export import lik = require('lik');
|
||||||
export import lik = require('lik')
|
export import nodehash = require('nodehash');
|
||||||
export import nodehash = require('nodehash')
|
export import smartdelay = require('smartdelay');
|
||||||
export import smartdelay = require('smartdelay')
|
export import smartq = require('smartq');
|
||||||
export import smartq = require('smartq')
|
export import shortid = require('shortid');
|
||||||
export import shortid = require('shortid')
|
export import socketIo = require('socket.io');
|
||||||
export import socketIo = require('socket.io')
|
export import socketIoClient = require('socket.io-client');
|
||||||
export import socketIoClient = require('socket.io-client')
|
|
||||||
|
534
yarn.lock
534
yarn.lock
@ -2,76 +2,49 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@types/chai-as-promised@0.0.29":
|
"@types/chai-as-promised@^7.1.0":
|
||||||
version "0.0.29"
|
version "7.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz#43d52892aa998e185a3de3e2477edb8573be1d77"
|
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-7.1.0.tgz#010b04cde78eacfb6e72bfddb3e58fe23c2e78b9"
|
||||||
dependencies:
|
|
||||||
"@types/chai" "*"
|
|
||||||
"@types/promises-a-plus" "*"
|
|
||||||
|
|
||||||
"@types/chai-string@^1.1.30":
|
|
||||||
version "1.1.31"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.31.tgz#a22f75d713f69da8c5cf34f8bc808a62cd249405"
|
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/chai" "*"
|
"@types/chai" "*"
|
||||||
|
|
||||||
"@types/chai@*":
|
"@types/chai-string@^1.4.0":
|
||||||
version "4.0.4"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.4.tgz#fe86315d9a66827feeb16f73bc954688ec950e18"
|
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.4.0.tgz#c8b78deb9ae53e86c05a446c256138faeaff53c1"
|
||||||
|
|
||||||
"@types/chai@^3.4.35":
|
|
||||||
version "3.5.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
|
||||||
|
|
||||||
"@types/glob@*":
|
|
||||||
version "5.0.33"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.33.tgz#3dff7c6ce09d65abe919c7961dc3dee016f36ad7"
|
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/minimatch" "*"
|
"@types/chai" "*"
|
||||||
"@types/node" "*"
|
|
||||||
|
|
||||||
"@types/lodash@^4.14.55", "@types/lodash@^4.14.74":
|
"@types/chai@*", "@types/chai@^4.1.2":
|
||||||
version "4.14.77"
|
version "4.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.77.tgz#0bc699413e84d6ed5d927ca30ea0f0a890b42d75"
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.1.2.tgz#f1af664769cfb50af805431c407425ed619daa21"
|
||||||
|
|
||||||
"@types/minimatch@*", "@types/minimatch@3.x.x":
|
"@types/lodash@^4.14.55", "@types/lodash@^4.14.97":
|
||||||
version "3.0.1"
|
version "4.14.104"
|
||||||
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.1.tgz#b683eb60be358304ef146f5775db4c0e3696a550"
|
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80"
|
||||||
|
|
||||||
|
"@types/minimatch@^3.0.3":
|
||||||
|
version "3.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
|
||||||
|
|
||||||
"@types/node@*":
|
"@types/node@*":
|
||||||
version "8.0.33"
|
version "9.4.7"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.33.tgz#1126e94374014e54478092830704f6ea89df04cd"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.7.tgz#57d81cd98719df2c9de118f2d5f3b1120dcd7275"
|
||||||
|
|
||||||
"@types/promises-a-plus@*":
|
|
||||||
version "0.0.27"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
|
||||||
|
|
||||||
"@types/q@0.x.x":
|
"@types/q@0.x.x":
|
||||||
version "0.0.37"
|
version "0.0.37"
|
||||||
resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.37.tgz#7d6a934b35ee2f0ed0646d286eba559599021c9e"
|
resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.37.tgz#7d6a934b35ee2f0ed0646d286eba559599021c9e"
|
||||||
|
|
||||||
"@types/q@1.x.x":
|
|
||||||
version "1.0.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/q/-/q-1.0.5.tgz#02b9d43a1a8e7503d15ed2fecb15ebb18c519b1d"
|
|
||||||
|
|
||||||
"@types/shelljs@^0.7.4":
|
|
||||||
version "0.7.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.4.tgz#137b5f31306eaff4de120ffe5b9d74b297809cfc"
|
|
||||||
dependencies:
|
|
||||||
"@types/glob" "*"
|
|
||||||
"@types/node" "*"
|
|
||||||
|
|
||||||
"@types/shortid@0.0.29":
|
"@types/shortid@0.0.29":
|
||||||
version "0.0.29"
|
version "0.0.29"
|
||||||
resolved "https://registry.yarnpkg.com/@types/shortid/-/shortid-0.0.29.tgz#8093ee0416a6e2bf2aa6338109114b3fbffa0e9b"
|
resolved "https://registry.yarnpkg.com/@types/shortid/-/shortid-0.0.29.tgz#8093ee0416a6e2bf2aa6338109114b3fbffa0e9b"
|
||||||
|
|
||||||
"@types/socket.io-client@^1.4.30":
|
"@types/socket.io-client@^1.4.32":
|
||||||
version "1.4.30"
|
version "1.4.32"
|
||||||
resolved "https://registry.yarnpkg.com/@types/socket.io-client/-/socket.io-client-1.4.30.tgz#a76d5a1738aded8889c612bfe7f53f3b5298bfc3"
|
resolved "https://registry.yarnpkg.com/@types/socket.io-client/-/socket.io-client-1.4.32.tgz#988a65a0386c274b1c22a55377fab6a30789ac14"
|
||||||
|
|
||||||
"@types/socket.io@^1.4.31":
|
"@types/socket.io@^1.4.32":
|
||||||
version "1.4.31"
|
version "1.4.32"
|
||||||
resolved "https://registry.yarnpkg.com/@types/socket.io/-/socket.io-1.4.31.tgz#7a928518a35516fccd90431f94538ed3fddaba19"
|
resolved "https://registry.yarnpkg.com/@types/socket.io/-/socket.io-1.4.32.tgz#bf7bc4ea6991327f31672c05e237a8a28d7bfc30"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
@ -81,15 +54,11 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
"@types/which@^1.0.28":
|
accepts@~1.3.4:
|
||||||
version "1.0.28"
|
version "1.3.5"
|
||||||
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
|
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2"
|
||||||
|
|
||||||
accepts@1.3.3:
|
|
||||||
version "1.3.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca"
|
|
||||||
dependencies:
|
dependencies:
|
||||||
mime-types "~2.1.11"
|
mime-types "~2.1.18"
|
||||||
negotiator "0.6.1"
|
negotiator "0.6.1"
|
||||||
|
|
||||||
after@0.8.2:
|
after@0.8.2:
|
||||||
@ -100,21 +69,23 @@ ansi-256-colors@^1.1.0:
|
|||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
|
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
|
||||||
|
|
||||||
ansi-regex@^2.0.0:
|
ansi-styles@^3.2.1:
|
||||||
version "2.1.1"
|
version "3.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
|
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
|
||||||
|
dependencies:
|
||||||
|
color-convert "^1.9.0"
|
||||||
|
|
||||||
ansi-styles@^2.2.1:
|
arraybuffer.slice@~0.0.7:
|
||||||
version "2.2.1"
|
version "0.0.7"
|
||||||
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
|
resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz#3bbc4275dd584cc1b10809b89d4e8b63a69e7675"
|
||||||
|
|
||||||
arraybuffer.slice@0.0.6:
|
|
||||||
version "0.0.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/arraybuffer.slice/-/arraybuffer.slice-0.0.6.tgz#f33b2159f0532a3f3107a272c0ccfbd1ad2979ca"
|
|
||||||
|
|
||||||
assertion-error@^1.0.1:
|
assertion-error@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b"
|
||||||
|
|
||||||
|
async-limiter@~1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
|
||||||
|
|
||||||
backo2@1.0.2:
|
backo2@1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
@ -167,8 +138,8 @@ blob@0.0.4:
|
|||||||
resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921"
|
resolved "https://registry.yarnpkg.com/blob/-/blob-0.0.4.tgz#bcf13052ca54463f30f9fc7e95b9a47630a94921"
|
||||||
|
|
||||||
brace-expansion@^1.1.7:
|
brace-expansion@^1.1.7:
|
||||||
version "1.1.8"
|
version "1.1.11"
|
||||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||||
dependencies:
|
dependencies:
|
||||||
balanced-match "^1.0.0"
|
balanced-match "^1.0.0"
|
||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
@ -177,35 +148,36 @@ callsite@1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20"
|
resolved "https://registry.yarnpkg.com/callsite/-/callsite-1.0.0.tgz#280398e5d664bd74038b6f0905153e6e8af1bc20"
|
||||||
|
|
||||||
chai-as-promised@^6.0.0:
|
chai-as-promised@^7.1.1:
|
||||||
version "6.0.0"
|
version "7.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
|
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0"
|
||||||
dependencies:
|
dependencies:
|
||||||
check-error "^1.0.2"
|
check-error "^1.0.2"
|
||||||
|
|
||||||
chai-string@^1.3.0:
|
chai-string@^1.4.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
|
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
|
||||||
|
|
||||||
chai@^3.5.0:
|
chai@^4.1.2:
|
||||||
version "3.5.0"
|
version "4.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
|
resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c"
|
||||||
dependencies:
|
dependencies:
|
||||||
assertion-error "^1.0.1"
|
assertion-error "^1.0.1"
|
||||||
deep-eql "^0.1.3"
|
check-error "^1.0.1"
|
||||||
type-detect "^1.0.0"
|
deep-eql "^3.0.0"
|
||||||
|
get-func-name "^2.0.0"
|
||||||
|
pathval "^1.0.0"
|
||||||
|
type-detect "^4.0.0"
|
||||||
|
|
||||||
chalk@^1.0.0, chalk@^1.1.1:
|
chalk@^2.0.1, chalk@^2.1.0:
|
||||||
version "1.1.3"
|
version "2.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
|
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65"
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-styles "^2.2.1"
|
ansi-styles "^3.2.1"
|
||||||
escape-string-regexp "^1.0.2"
|
escape-string-regexp "^1.0.5"
|
||||||
has-ansi "^2.0.0"
|
supports-color "^5.3.0"
|
||||||
strip-ansi "^3.0.0"
|
|
||||||
supports-color "^2.0.0"
|
|
||||||
|
|
||||||
check-error@^1.0.2:
|
check-error@^1.0.1, check-error@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
|
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
|
||||||
|
|
||||||
@ -215,10 +187,20 @@ cli-cursor@^2.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
restore-cursor "^2.0.0"
|
restore-cursor "^2.0.0"
|
||||||
|
|
||||||
cli-spinners@^1.0.0:
|
cli-spinners@^1.0.1:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.1.0.tgz#f1847b168844d917a671eb9d147e3df497c90d06"
|
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.1.0.tgz#f1847b168844d917a671eb9d147e3df497c90d06"
|
||||||
|
|
||||||
|
color-convert@^1.9.0:
|
||||||
|
version "1.9.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
|
||||||
|
dependencies:
|
||||||
|
color-name "^1.1.1"
|
||||||
|
|
||||||
|
color-name@^1.1.1:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
||||||
|
|
||||||
component-bind@1.0.0:
|
component-bind@1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1"
|
resolved "https://registry.yarnpkg.com/component-bind/-/component-bind-1.0.0.tgz#00c608ab7dcd93897c0009651b1d3a8e1e73bbd1"
|
||||||
@ -249,11 +231,17 @@ debug@~2.6.4, debug@~2.6.6:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ms "2.0.0"
|
ms "2.0.0"
|
||||||
|
|
||||||
deep-eql@^0.1.3:
|
debug@~3.1.0:
|
||||||
version "0.1.3"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
|
resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
|
||||||
dependencies:
|
dependencies:
|
||||||
type-detect "0.1.1"
|
ms "2.0.0"
|
||||||
|
|
||||||
|
deep-eql@^3.0.0:
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df"
|
||||||
|
dependencies:
|
||||||
|
type-detect "^4.0.0"
|
||||||
|
|
||||||
define-properties@^1.1.2:
|
define-properties@^1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
@ -271,47 +259,47 @@ early@^2.1.1:
|
|||||||
typings-global "^1.0.16"
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
engine.io-client@~3.1.0:
|
engine.io-client@~3.1.0:
|
||||||
version "3.1.2"
|
version "3.1.6"
|
||||||
resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.1.2.tgz#62a0ef08ec83d16a06668ccc3a4f37916768a6b9"
|
resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-3.1.6.tgz#5bdeb130f8b94a50ac5cbeb72583e7a4a063ddfd"
|
||||||
dependencies:
|
dependencies:
|
||||||
component-emitter "1.2.1"
|
component-emitter "1.2.1"
|
||||||
component-inherit "0.0.3"
|
component-inherit "0.0.3"
|
||||||
debug "~2.6.4"
|
debug "~3.1.0"
|
||||||
engine.io-parser "~2.1.1"
|
engine.io-parser "~2.1.1"
|
||||||
has-cors "1.1.0"
|
has-cors "1.1.0"
|
||||||
indexof "0.0.1"
|
indexof "0.0.1"
|
||||||
parseqs "0.0.5"
|
parseqs "0.0.5"
|
||||||
parseuri "0.0.5"
|
parseuri "0.0.5"
|
||||||
ws "~2.3.1"
|
ws "~3.3.1"
|
||||||
xmlhttprequest-ssl "1.5.3"
|
xmlhttprequest-ssl "~1.5.4"
|
||||||
yeast "0.1.2"
|
yeast "0.1.2"
|
||||||
|
|
||||||
engine.io-parser@~2.1.0, engine.io-parser@~2.1.1:
|
engine.io-parser@~2.1.0, engine.io-parser@~2.1.1:
|
||||||
version "2.1.1"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.1.tgz#e0fb3f0e0462f7f58bb77c1a52e9f5a7e26e4668"
|
resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-2.1.2.tgz#4c0f4cff79aaeecbbdcfdea66a823c6085409196"
|
||||||
dependencies:
|
dependencies:
|
||||||
after "0.8.2"
|
after "0.8.2"
|
||||||
arraybuffer.slice "0.0.6"
|
arraybuffer.slice "~0.0.7"
|
||||||
base64-arraybuffer "0.1.5"
|
base64-arraybuffer "0.1.5"
|
||||||
blob "0.0.4"
|
blob "0.0.4"
|
||||||
has-binary2 "~1.0.2"
|
has-binary2 "~1.0.2"
|
||||||
|
|
||||||
engine.io@~3.1.0:
|
engine.io@~3.1.0:
|
||||||
version "3.1.2"
|
version "3.1.5"
|
||||||
resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.1.2.tgz#00a3f6a4054bb1a07958074b1058764deedb7d8a"
|
resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.1.5.tgz#0e7ef9d690eb0b35597f1d4ad02a26ca2dba3845"
|
||||||
dependencies:
|
dependencies:
|
||||||
accepts "1.3.3"
|
accepts "~1.3.4"
|
||||||
base64id "1.0.0"
|
base64id "1.0.0"
|
||||||
cookie "0.3.1"
|
cookie "0.3.1"
|
||||||
debug "~2.6.4"
|
debug "~3.1.0"
|
||||||
engine.io-parser "~2.1.0"
|
engine.io-parser "~2.1.0"
|
||||||
ws "~2.3.1"
|
ws "~3.3.1"
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
uws "~0.14.4"
|
uws "~9.14.0"
|
||||||
|
|
||||||
es-abstract@^1.5.1:
|
es-abstract@^1.5.1:
|
||||||
version "1.9.0"
|
version "1.10.0"
|
||||||
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.9.0.tgz#690829a07cae36b222e7fd9b75c0d0573eb25227"
|
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864"
|
||||||
dependencies:
|
dependencies:
|
||||||
es-to-primitive "^1.1.1"
|
es-to-primitive "^1.1.1"
|
||||||
function-bind "^1.1.1"
|
function-bind "^1.1.1"
|
||||||
@ -328,10 +316,10 @@ es-to-primitive@^1.1.1:
|
|||||||
is-symbol "^1.0.1"
|
is-symbol "^1.0.1"
|
||||||
|
|
||||||
es6-error@^4.0.2:
|
es6-error@^4.0.2:
|
||||||
version "4.0.2"
|
version "4.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
|
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
|
||||||
|
|
||||||
escape-string-regexp@^1.0.2:
|
escape-string-regexp@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||||
|
|
||||||
@ -343,30 +331,13 @@ foreach@^2.0.5:
|
|||||||
version "2.0.5"
|
version "2.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
||||||
|
|
||||||
fs.realpath@^1.0.0:
|
|
||||||
version "1.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
|
||||||
|
|
||||||
function-bind@^1.0.2, function-bind@^1.1.1:
|
function-bind@^1.0.2, function-bind@^1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||||
|
|
||||||
glob@^7.0.0:
|
get-func-name@^2.0.0:
|
||||||
version "7.1.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
|
||||||
dependencies:
|
|
||||||
fs.realpath "^1.0.0"
|
|
||||||
inflight "^1.0.4"
|
|
||||||
inherits "2"
|
|
||||||
minimatch "^3.0.4"
|
|
||||||
once "^1.3.0"
|
|
||||||
path-is-absolute "^1.0.0"
|
|
||||||
|
|
||||||
has-ansi@^2.0.0:
|
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
|
resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41"
|
||||||
dependencies:
|
|
||||||
ansi-regex "^2.0.0"
|
|
||||||
|
|
||||||
has-binary2@~1.0.2:
|
has-binary2@~1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
@ -378,6 +349,10 @@ has-cors@1.1.0:
|
|||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39"
|
resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39"
|
||||||
|
|
||||||
|
has-flag@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
|
||||||
|
|
||||||
has@^1.0.1:
|
has@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
|
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
|
||||||
@ -388,21 +363,10 @@ indexof@0.0.1:
|
|||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
|
resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
|
||||||
|
|
||||||
inflight@^1.0.4:
|
inherits@~2.0.3:
|
||||||
version "1.0.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
|
||||||
dependencies:
|
|
||||||
once "^1.3.0"
|
|
||||||
wrappy "1"
|
|
||||||
|
|
||||||
inherits@2, inherits@~2.0.3:
|
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
|
|
||||||
interpret@^1.0.0:
|
|
||||||
version "1.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.4.tgz#820cdd588b868ffb191a809506d6c9c8f212b1b0"
|
|
||||||
|
|
||||||
is-callable@^1.1.1, is-callable@^1.1.3:
|
is-callable@^1.1.1, is-callable@^1.1.3:
|
||||||
version "1.1.3"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
|
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
|
||||||
@ -429,10 +393,6 @@ isarray@~1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||||
|
|
||||||
isexe@^2.0.0:
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
|
||||||
|
|
||||||
leakage@^0.3.0:
|
leakage@^0.3.0:
|
||||||
version "0.3.0"
|
version "0.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
|
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
|
||||||
@ -444,32 +404,29 @@ leakage@^0.3.0:
|
|||||||
pretty-bytes "^4.0.2"
|
pretty-bytes "^4.0.2"
|
||||||
|
|
||||||
left-pad@^1.1.3:
|
left-pad@^1.1.3:
|
||||||
version "1.1.3"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
|
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"
|
||||||
|
|
||||||
lik@^1.0.42:
|
lik@^2.0.5:
|
||||||
version "1.0.42"
|
version "2.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/lik/-/lik-1.0.42.tgz#e77604fac257c1b3552779c443de08c09b6e5332"
|
resolved "https://registry.yarnpkg.com/lik/-/lik-2.0.5.tgz#1338a3201828b557fa91a5b8a6013743ff720e10"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/lodash" "^4.14.74"
|
"@types/lodash" "^4.14.97"
|
||||||
"@types/minimatch" "3.x.x"
|
"@types/minimatch" "^3.0.3"
|
||||||
"@types/q" "1.x.x"
|
|
||||||
lodash "^4.17.4"
|
lodash "^4.17.4"
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
q "^1.5.0"
|
|
||||||
rxjs "^5.4.3"
|
|
||||||
smartq "^1.1.6"
|
smartq "^1.1.6"
|
||||||
typings-global "^1.0.20"
|
symbol-tree "^3.2.2"
|
||||||
|
|
||||||
lodash@^4.17.4:
|
lodash@^4.17.4:
|
||||||
version "4.17.4"
|
version "4.17.5"
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
|
||||||
|
|
||||||
log-symbols@^1.0.2:
|
log-symbols@^2.1.0:
|
||||||
version "1.0.2"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18"
|
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
|
||||||
dependencies:
|
dependencies:
|
||||||
chalk "^1.0.0"
|
chalk "^2.0.1"
|
||||||
|
|
||||||
memwatch-next@^0.3.0:
|
memwatch-next@^0.3.0:
|
||||||
version "0.3.0"
|
version "0.3.0"
|
||||||
@ -478,19 +435,19 @@ memwatch-next@^0.3.0:
|
|||||||
bindings "^1.2.1"
|
bindings "^1.2.1"
|
||||||
nan "^2.3.2"
|
nan "^2.3.2"
|
||||||
|
|
||||||
mime-db@~1.30.0:
|
mime-db@~1.33.0:
|
||||||
version "1.30.0"
|
version "1.33.0"
|
||||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01"
|
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db"
|
||||||
|
|
||||||
mime-types@~2.1.11:
|
mime-types@~2.1.18:
|
||||||
version "2.1.17"
|
version "2.1.18"
|
||||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a"
|
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8"
|
||||||
dependencies:
|
dependencies:
|
||||||
mime-db "~1.30.0"
|
mime-db "~1.33.0"
|
||||||
|
|
||||||
mimic-fn@^1.0.0:
|
mimic-fn@^1.0.0:
|
||||||
version "1.1.0"
|
version "1.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18"
|
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
|
||||||
|
|
||||||
minimatch@^3.0.4:
|
minimatch@^3.0.4:
|
||||||
version "3.0.4"
|
version "3.0.4"
|
||||||
@ -507,8 +464,8 @@ ms@2.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||||
|
|
||||||
nan@^2.3.2:
|
nan@^2.3.2:
|
||||||
version "2.7.0"
|
version "2.9.2"
|
||||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46"
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.9.2.tgz#f564d75f5f8f36a6d9456cca7a6c4fe488ab7866"
|
||||||
|
|
||||||
negotiator@0.6.1:
|
negotiator@0.6.1:
|
||||||
version "0.6.1"
|
version "0.6.1"
|
||||||
@ -524,10 +481,6 @@ nodehash@^1.0.4:
|
|||||||
through2 "^2.0.1"
|
through2 "^2.0.1"
|
||||||
typings-global "^1.0.6"
|
typings-global "^1.0.6"
|
||||||
|
|
||||||
object-assign@~4.1.1:
|
|
||||||
version "4.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
|
||||||
|
|
||||||
object-component@0.0.3:
|
object-component@0.0.3:
|
||||||
version "0.0.3"
|
version "0.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291"
|
resolved "https://registry.yarnpkg.com/object-component/-/object-component-0.0.3.tgz#f0c69aa50efc95b866c186f400a33769cb2f1291"
|
||||||
@ -543,12 +496,6 @@ object.getownpropertydescriptors@^2.0.3:
|
|||||||
define-properties "^1.1.2"
|
define-properties "^1.1.2"
|
||||||
es-abstract "^1.5.1"
|
es-abstract "^1.5.1"
|
||||||
|
|
||||||
once@^1.3.0:
|
|
||||||
version "1.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
|
||||||
dependencies:
|
|
||||||
wrappy "1"
|
|
||||||
|
|
||||||
onetime@^2.0.0:
|
onetime@^2.0.0:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
|
resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
|
||||||
@ -556,13 +503,13 @@ onetime@^2.0.0:
|
|||||||
mimic-fn "^1.0.0"
|
mimic-fn "^1.0.0"
|
||||||
|
|
||||||
ora@^1.1.0:
|
ora@^1.1.0:
|
||||||
version "1.3.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/ora/-/ora-1.3.0.tgz#80078dd2b92a934af66a3ad72a5b910694ede51a"
|
resolved "https://registry.yarnpkg.com/ora/-/ora-1.4.0.tgz#884458215b3a5d4097592285f93321bb7a79e2e5"
|
||||||
dependencies:
|
dependencies:
|
||||||
chalk "^1.1.1"
|
chalk "^2.1.0"
|
||||||
cli-cursor "^2.1.0"
|
cli-cursor "^2.1.0"
|
||||||
cli-spinners "^1.0.0"
|
cli-spinners "^1.0.1"
|
||||||
log-symbols "^1.0.2"
|
log-symbols "^2.1.0"
|
||||||
|
|
||||||
parseqs@0.0.5:
|
parseqs@0.0.5:
|
||||||
version "0.0.5"
|
version "0.0.5"
|
||||||
@ -576,50 +523,34 @@ parseuri@0.0.5:
|
|||||||
dependencies:
|
dependencies:
|
||||||
better-assert "~1.0.0"
|
better-assert "~1.0.0"
|
||||||
|
|
||||||
path-is-absolute@^1.0.0:
|
pathval@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.0.tgz#b942e6d4bde653005ef6b71361def8727d0645e0"
|
||||||
|
|
||||||
path-parse@^1.0.5:
|
|
||||||
version "1.0.5"
|
|
||||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
|
|
||||||
|
|
||||||
pretty-bytes@^4.0.2:
|
pretty-bytes@^4.0.2:
|
||||||
version "4.0.2"
|
version "4.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
|
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
|
||||||
|
|
||||||
process-nextick-args@~1.0.6:
|
process-nextick-args@~2.0.0:
|
||||||
version "1.0.7"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa"
|
||||||
|
|
||||||
q@^1.4.1, q@^1.5.0:
|
q@^1.4.1:
|
||||||
version "1.5.0"
|
version "1.5.1"
|
||||||
resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1"
|
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
|
||||||
|
|
||||||
readable-stream@^2.1.5:
|
readable-stream@^2.1.5:
|
||||||
version "2.3.3"
|
version "2.3.5"
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c"
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.5.tgz#b4f85003a938cbb6ecbce2a124fb1012bd1a838d"
|
||||||
dependencies:
|
dependencies:
|
||||||
core-util-is "~1.0.0"
|
core-util-is "~1.0.0"
|
||||||
inherits "~2.0.3"
|
inherits "~2.0.3"
|
||||||
isarray "~1.0.0"
|
isarray "~1.0.0"
|
||||||
process-nextick-args "~1.0.6"
|
process-nextick-args "~2.0.0"
|
||||||
safe-buffer "~5.1.1"
|
safe-buffer "~5.1.1"
|
||||||
string_decoder "~1.0.3"
|
string_decoder "~1.0.3"
|
||||||
util-deprecate "~1.0.1"
|
util-deprecate "~1.0.1"
|
||||||
|
|
||||||
rechoir@^0.6.2:
|
|
||||||
version "0.6.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
|
||||||
dependencies:
|
|
||||||
resolve "^1.1.6"
|
|
||||||
|
|
||||||
resolve@^1.1.6:
|
|
||||||
version "1.4.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86"
|
|
||||||
dependencies:
|
|
||||||
path-parse "^1.0.5"
|
|
||||||
|
|
||||||
restore-cursor@^2.0.0:
|
restore-cursor@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
|
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
|
||||||
@ -627,32 +558,10 @@ restore-cursor@^2.0.0:
|
|||||||
onetime "^2.0.0"
|
onetime "^2.0.0"
|
||||||
signal-exit "^3.0.2"
|
signal-exit "^3.0.2"
|
||||||
|
|
||||||
rxjs@^5.4.3:
|
|
||||||
version "5.4.3"
|
|
||||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.4.3.tgz#0758cddee6033d68e0fd53676f0f3596ce3d483f"
|
|
||||||
dependencies:
|
|
||||||
symbol-observable "^1.0.1"
|
|
||||||
|
|
||||||
safe-buffer@~5.0.1:
|
|
||||||
version "5.0.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7"
|
|
||||||
|
|
||||||
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
version "5.1.1"
|
version "5.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
|
||||||
|
|
||||||
semver@^5.3.0:
|
|
||||||
version "5.4.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
|
||||||
|
|
||||||
shelljs@^0.7.8:
|
|
||||||
version "0.7.8"
|
|
||||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
|
||||||
dependencies:
|
|
||||||
glob "^7.0.0"
|
|
||||||
interpret "^1.0.0"
|
|
||||||
rechoir "^0.6.2"
|
|
||||||
|
|
||||||
shortid@^2.2.8:
|
shortid@^2.2.8:
|
||||||
version "2.2.8"
|
version "2.2.8"
|
||||||
resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.8.tgz#033b117d6a2e975804f6f0969dbe7d3d0b355131"
|
resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.8.tgz#033b117d6a2e975804f6f0969dbe7d3d0b355131"
|
||||||
@ -661,20 +570,20 @@ signal-exit@^3.0.2:
|
|||||||
version "3.0.2"
|
version "3.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
|
||||||
|
|
||||||
smartchai@^1.0.3:
|
smartchai@^2.0.0:
|
||||||
version "1.0.3"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
|
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-2.0.1.tgz#d20f17221f0e3c6c3473600b78ddfba0ab0ea762"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/chai" "^3.4.35"
|
"@types/chai" "^4.1.2"
|
||||||
"@types/chai-as-promised" "0.0.29"
|
"@types/chai-as-promised" "^7.1.0"
|
||||||
"@types/chai-string" "^1.1.30"
|
"@types/chai-string" "^1.4.0"
|
||||||
chai "^3.5.0"
|
chai "^4.1.2"
|
||||||
chai-as-promised "^6.0.0"
|
chai-as-promised "^7.1.1"
|
||||||
chai-string "^1.3.0"
|
chai-string "^1.4.0"
|
||||||
|
|
||||||
smartdelay@^1.0.3:
|
smartdelay@^1.0.3, smartdelay@^1.0.4:
|
||||||
version "1.0.3"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.3.tgz#5fd44dad77262d110702f0293efa80c072cfb579"
|
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.4.tgz#791c1a4ee6770494064c10b1d2d2b8e6f3105b82"
|
||||||
dependencies:
|
dependencies:
|
||||||
smartq "^1.1.1"
|
smartq "^1.1.1"
|
||||||
typings-global "^1.0.16"
|
typings-global "^1.0.16"
|
||||||
@ -694,24 +603,13 @@ smartq@^1.1.1, smartq@^1.1.6:
|
|||||||
typings-global "^1.0.19"
|
typings-global "^1.0.19"
|
||||||
util.promisify "^1.0.0"
|
util.promisify "^1.0.0"
|
||||||
|
|
||||||
smartshell@^1.0.6:
|
|
||||||
version "1.0.18"
|
|
||||||
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.18.tgz#b84ccc65cedf3a875bf676cec78ee07f4b4aa9e5"
|
|
||||||
dependencies:
|
|
||||||
"@types/shelljs" "^0.7.4"
|
|
||||||
"@types/which" "^1.0.28"
|
|
||||||
shelljs "^0.7.8"
|
|
||||||
smartq "^1.1.6"
|
|
||||||
typings-global "^1.0.20"
|
|
||||||
which "^1.3.0"
|
|
||||||
|
|
||||||
socket.io-adapter@~1.1.0:
|
socket.io-adapter@~1.1.0:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz#2a805e8a14d6372124dd9159ad4502f8cb07f06b"
|
resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz#2a805e8a14d6372124dd9159ad4502f8cb07f06b"
|
||||||
|
|
||||||
socket.io-client@^2.0.3, socket.io-client@~2.0.2:
|
socket.io-client@2.0.4, socket.io-client@^2.0.4:
|
||||||
version "2.0.3"
|
version "2.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.0.3.tgz#6caf4aff9f85b19fd91b6ce13d69adb564f8873b"
|
resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-2.0.4.tgz#0918a552406dc5e540b380dcd97afc4a64332f8e"
|
||||||
dependencies:
|
dependencies:
|
||||||
backo2 "1.0.2"
|
backo2 "1.0.2"
|
||||||
base64-arraybuffer "0.1.5"
|
base64-arraybuffer "0.1.5"
|
||||||
@ -728,23 +626,22 @@ socket.io-client@^2.0.3, socket.io-client@~2.0.2:
|
|||||||
to-array "0.1.4"
|
to-array "0.1.4"
|
||||||
|
|
||||||
socket.io-parser@~3.1.1:
|
socket.io-parser@~3.1.1:
|
||||||
version "3.1.2"
|
version "3.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.1.2.tgz#dbc2282151fc4faebbe40aeedc0772eba619f7f2"
|
resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-3.1.3.tgz#ed2da5ee79f10955036e3da413bfd7f1e4d86c8e"
|
||||||
dependencies:
|
dependencies:
|
||||||
component-emitter "1.2.1"
|
component-emitter "1.2.1"
|
||||||
debug "~2.6.4"
|
debug "~3.1.0"
|
||||||
has-binary2 "~1.0.2"
|
has-binary2 "~1.0.2"
|
||||||
isarray "2.0.1"
|
isarray "2.0.1"
|
||||||
|
|
||||||
socket.io@^2.0.3:
|
socket.io@^2.0.4:
|
||||||
version "2.0.3"
|
version "2.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.0.3.tgz#4359f06a24933ae6bd087798af78c680eae345e3"
|
resolved "https://registry.yarnpkg.com/socket.io/-/socket.io-2.0.4.tgz#c1a4590ceff87ecf13c72652f046f716b29e6014"
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "~2.6.6"
|
debug "~2.6.6"
|
||||||
engine.io "~3.1.0"
|
engine.io "~3.1.0"
|
||||||
object-assign "~4.1.1"
|
|
||||||
socket.io-adapter "~1.1.0"
|
socket.io-adapter "~1.1.0"
|
||||||
socket.io-client "~2.0.2"
|
socket.io-client "2.0.4"
|
||||||
socket.io-parser "~3.1.1"
|
socket.io-parser "~3.1.1"
|
||||||
|
|
||||||
string_decoder@~1.0.3:
|
string_decoder@~1.0.3:
|
||||||
@ -753,30 +650,25 @@ string_decoder@~1.0.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
safe-buffer "~5.1.0"
|
safe-buffer "~5.1.0"
|
||||||
|
|
||||||
strip-ansi@^3.0.0:
|
supports-color@^5.3.0:
|
||||||
version "3.0.1"
|
version "5.3.0"
|
||||||
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
|
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.3.0.tgz#5b24ac15db80fa927cf5227a4a33fd3c4c7676c0"
|
||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex "^2.0.0"
|
has-flag "^3.0.0"
|
||||||
|
|
||||||
supports-color@^2.0.0:
|
symbol-tree@^3.2.2:
|
||||||
|
version "3.2.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"
|
||||||
|
|
||||||
|
tapbundle@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
|
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-2.0.0.tgz#79fce68ff185c786fabaf6eb589a4afc7d2714b7"
|
||||||
|
|
||||||
symbol-observable@^1.0.1:
|
|
||||||
version "1.0.4"
|
|
||||||
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
|
|
||||||
|
|
||||||
tapbundle@^1.1.1:
|
|
||||||
version "1.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.1.1.tgz#ec4172c0e82a77b1f6133fef2606311ede28a62d"
|
|
||||||
dependencies:
|
dependencies:
|
||||||
early "^2.1.1"
|
early "^2.1.1"
|
||||||
leakage "^0.3.0"
|
leakage "^0.3.0"
|
||||||
smartchai "^1.0.3"
|
smartchai "^2.0.0"
|
||||||
smartdelay "^1.0.3"
|
smartdelay "^1.0.3"
|
||||||
smartq "^1.1.1"
|
smartq "^1.1.1"
|
||||||
typings-global "^1.0.19"
|
|
||||||
|
|
||||||
through2@^2.0.1:
|
through2@^2.0.1:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
@ -789,24 +681,17 @@ to-array@0.1.4:
|
|||||||
version "0.1.4"
|
version "0.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890"
|
resolved "https://registry.yarnpkg.com/to-array/-/to-array-0.1.4.tgz#17e6c11f73dd4f3d74cda7a4ff3238e9ad9bf890"
|
||||||
|
|
||||||
type-detect@0.1.1:
|
type-detect@^4.0.0:
|
||||||
version "0.1.1"
|
version "4.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
|
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
|
||||||
|
|
||||||
type-detect@^1.0.0:
|
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19, typings-global@^1.0.6:
|
||||||
version "1.0.0"
|
version "1.0.28"
|
||||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.28.tgz#e28cc965476564cbc00e438739e0aa0735d323d4"
|
||||||
|
|
||||||
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19, typings-global@^1.0.20, typings-global@^1.0.6:
|
|
||||||
version "1.0.20"
|
|
||||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.20.tgz#3da769c54db538247c5d877d1d9e97eb2ec981ff"
|
|
||||||
dependencies:
|
|
||||||
semver "^5.3.0"
|
|
||||||
smartshell "^1.0.6"
|
|
||||||
|
|
||||||
ultron@~1.1.0:
|
ultron@~1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.0.tgz#b07a2e6a541a815fc6a34ccd4533baec307ca864"
|
resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c"
|
||||||
|
|
||||||
util-deprecate@~1.0.1:
|
util-deprecate@~1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
@ -819,30 +704,21 @@ util.promisify@^1.0.0:
|
|||||||
define-properties "^1.1.2"
|
define-properties "^1.1.2"
|
||||||
object.getownpropertydescriptors "^2.0.3"
|
object.getownpropertydescriptors "^2.0.3"
|
||||||
|
|
||||||
uws@~0.14.4:
|
uws@~9.14.0:
|
||||||
version "0.14.5"
|
version "9.14.0"
|
||||||
resolved "https://registry.yarnpkg.com/uws/-/uws-0.14.5.tgz#67aaf33c46b2a587a5f6666d00f7691328f149dc"
|
resolved "https://registry.yarnpkg.com/uws/-/uws-9.14.0.tgz#fac8386befc33a7a3705cbd58dc47b430ca4dd95"
|
||||||
|
|
||||||
which@^1.3.0:
|
ws@~3.3.1:
|
||||||
version "1.3.0"
|
version "3.3.3"
|
||||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
|
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
|
||||||
dependencies:
|
dependencies:
|
||||||
isexe "^2.0.0"
|
async-limiter "~1.0.0"
|
||||||
|
safe-buffer "~5.1.0"
|
||||||
wrappy@1:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
|
||||||
|
|
||||||
ws@~2.3.1:
|
|
||||||
version "2.3.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/ws/-/ws-2.3.1.tgz#6b94b3e447cb6a363f785eaf94af6359e8e81c80"
|
|
||||||
dependencies:
|
|
||||||
safe-buffer "~5.0.1"
|
|
||||||
ultron "~1.1.0"
|
ultron "~1.1.0"
|
||||||
|
|
||||||
xmlhttprequest-ssl@1.5.3:
|
xmlhttprequest-ssl@~1.5.4:
|
||||||
version "1.5.3"
|
version "1.5.5"
|
||||||
resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.3.tgz#185a888c04eca46c3e4070d99f7b49de3528992d"
|
resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e"
|
||||||
|
|
||||||
xtend@~4.0.1:
|
xtend@~4.0.1:
|
||||||
version "4.0.1"
|
version "4.0.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user