fix(core): update
This commit is contained in:
parent
0d39d6f237
commit
86cf94c5dc
174
package-lock.json
generated
174
package-lock.json
generated
@ -14,6 +14,26 @@
|
||||
"nan": "^2.9.2"
|
||||
}
|
||||
},
|
||||
"@babel/code-frame": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@babel%2fcode-frame/-/code-frame-7.0.0.tgz",
|
||||
"integrity": "sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/highlight": "^7.0.0"
|
||||
}
|
||||
},
|
||||
"@babel/highlight": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@babel%2fhighlight/-/highlight-7.0.0.tgz",
|
||||
"integrity": "sha512-UFMC4ZeFC48Tpvj7C8UgLvtkaUuovQX+5xNWrsIoMG8o2z+XFKjKaN9iVmS84dPwVN00W4wPmqvYoZF3EGAsfw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"chalk": "^2.0.0",
|
||||
"esutils": "^2.0.2",
|
||||
"js-tokens": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"@gitzone/tsbuild": {
|
||||
"version": "2.1.8",
|
||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbuild/-/tsbuild-2.1.8.tgz",
|
||||
@ -711,6 +731,15 @@
|
||||
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
|
||||
"dev": true
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://verdaccio.lossless.one/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "^1.9.0"
|
||||
}
|
||||
},
|
||||
"arg": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://verdaccio.lossless.one/arg/-/arg-4.1.0.tgz",
|
||||
@ -871,6 +900,12 @@
|
||||
"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
|
||||
"dev": true
|
||||
},
|
||||
"builtin-modules": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://verdaccio.lossless.one/builtin-modules/-/builtin-modules-1.1.1.tgz",
|
||||
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
|
||||
"dev": true
|
||||
},
|
||||
"bytes": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/bytes/-/bytes-3.0.0.tgz",
|
||||
@ -926,6 +961,17 @@
|
||||
"integrity": "sha512-sydDC3S3pNAQMYwJrs6dQX0oBQ6KfIPuOZ78n7rocW0eJJlsHPh2t3kwW7xfwYA/1Bf6/arGtSUo16rxR2JFlw==",
|
||||
"dev": true
|
||||
},
|
||||
"chalk": {
|
||||
"version": "2.4.2",
|
||||
"resolved": "https://verdaccio.lossless.one/chalk/-/chalk-2.4.2.tgz",
|
||||
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.1",
|
||||
"escape-string-regexp": "^1.0.5",
|
||||
"supports-color": "^5.3.0"
|
||||
}
|
||||
},
|
||||
"check-error": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/check-error/-/check-error-1.0.2.tgz",
|
||||
@ -1003,6 +1049,21 @@
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||
"dev": true
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://verdaccio.lossless.one/color-convert/-/color-convert-1.9.3.tgz",
|
||||
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://verdaccio.lossless.one/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||
"dev": true
|
||||
},
|
||||
"combined-stream": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://verdaccio.lossless.one/combined-stream/-/combined-stream-1.0.7.tgz",
|
||||
@ -1011,6 +1072,12 @@
|
||||
"delayed-stream": "~1.0.0"
|
||||
}
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.0",
|
||||
"resolved": "https://verdaccio.lossless.one/commander/-/commander-2.20.0.tgz",
|
||||
"integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==",
|
||||
"dev": true
|
||||
},
|
||||
"component-bind": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/component-bind/-/component-bind-1.0.0.tgz",
|
||||
@ -1281,6 +1348,12 @@
|
||||
"resolved": "https://verdaccio.lossless.one/esprima/-/esprima-4.0.1.tgz",
|
||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||
},
|
||||
"esutils": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://verdaccio.lossless.one/esutils/-/esutils-2.0.2.tgz",
|
||||
"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
|
||||
"dev": true
|
||||
},
|
||||
"etag": {
|
||||
"version": "1.8.1",
|
||||
"resolved": "https://verdaccio.lossless.one/etag/-/etag-1.8.1.tgz",
|
||||
@ -1610,6 +1683,12 @@
|
||||
"resolved": "https://verdaccio.lossless.one/has-cors/-/has-cors-1.1.0.tgz",
|
||||
"integrity": "sha1-XkdHk/fqmEPRu5nCPu9J/xJv/zk="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/has-flag/-/has-flag-3.0.0.tgz",
|
||||
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
|
||||
"dev": true
|
||||
},
|
||||
"helmet": {
|
||||
"version": "3.16.0",
|
||||
"resolved": "https://verdaccio.lossless.one/helmet/-/helmet-3.16.0.tgz",
|
||||
@ -1788,6 +1867,12 @@
|
||||
"resolved": "https://verdaccio.lossless.one/isstream/-/isstream-0.1.2.tgz",
|
||||
"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo="
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||
"dev": true
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "3.12.1",
|
||||
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.12.1.tgz",
|
||||
@ -2038,6 +2123,23 @@
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"dev": true
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://verdaccio.lossless.one/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"minimist": "0.0.8"
|
||||
},
|
||||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": "https://verdaccio.lossless.one/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.24.0",
|
||||
"resolved": "https://verdaccio.lossless.one/moment/-/moment-2.24.0.tgz",
|
||||
@ -2220,6 +2322,12 @@
|
||||
"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
|
||||
"dev": true
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://verdaccio.lossless.one/path-parse/-/path-parse-1.0.6.tgz",
|
||||
"integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==",
|
||||
"dev": true
|
||||
},
|
||||
"path-to-regexp": {
|
||||
"version": "0.1.7",
|
||||
"resolved": "https://verdaccio.lossless.one/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||
@ -2380,6 +2488,15 @@
|
||||
"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
|
||||
"dev": true
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.10.1",
|
||||
"resolved": "https://verdaccio.lossless.one/resolve/-/resolve-1.10.1.tgz",
|
||||
"integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"path-parse": "^1.0.6"
|
||||
}
|
||||
},
|
||||
"rxjs": {
|
||||
"version": "6.3.3",
|
||||
"resolved": "https://verdaccio.lossless.one/rxjs/-/rxjs-6.3.3.tgz",
|
||||
@ -2698,6 +2815,15 @@
|
||||
"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
|
||||
"dev": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
"resolved": "https://verdaccio.lossless.one/supports-color/-/supports-color-5.5.0.tgz",
|
||||
"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"has-flag": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"symbol-tree": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://verdaccio.lossless.one/symbol-tree/-/symbol-tree-3.2.2.tgz",
|
||||
@ -2751,6 +2877,54 @@
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.9.3.tgz",
|
||||
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
|
||||
},
|
||||
"tslint": {
|
||||
"version": "5.16.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-5.16.0.tgz",
|
||||
"integrity": "sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/code-frame": "^7.0.0",
|
||||
"builtin-modules": "^1.1.1",
|
||||
"chalk": "^2.3.0",
|
||||
"commander": "^2.12.1",
|
||||
"diff": "^3.2.0",
|
||||
"glob": "^7.1.1",
|
||||
"js-yaml": "^3.13.0",
|
||||
"minimatch": "^3.0.4",
|
||||
"mkdirp": "^0.5.1",
|
||||
"resolve": "^1.3.2",
|
||||
"semver": "^5.3.0",
|
||||
"tslib": "^1.8.0",
|
||||
"tsutils": "^2.29.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"js-yaml": {
|
||||
"version": "3.13.1",
|
||||
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.13.1.tgz",
|
||||
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"tslint-config-prettier": {
|
||||
"version": "1.18.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz",
|
||||
"integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==",
|
||||
"dev": true
|
||||
},
|
||||
"tsutils": {
|
||||
"version": "2.29.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tsutils/-/tsutils-2.29.0.tgz",
|
||||
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"tslib": "^1.8.1"
|
||||
}
|
||||
},
|
||||
"tunnel-agent": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://verdaccio.lossless.one/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||
|
@ -37,7 +37,9 @@
|
||||
"@gitzone/tsrun": "^1.2.5",
|
||||
"@gitzone/tstest": "^1.0.20",
|
||||
"@pushrocks/tapbundle": "^3.0.9",
|
||||
"@types/node": "^11.13.7"
|
||||
"@types/node": "^11.13.7",
|
||||
"tslint": "^5.16.0",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"private": false
|
||||
}
|
||||
}
|
@ -29,7 +29,7 @@ export class Smartsocket {
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:member-ordering
|
||||
public async setExternalServer (serverType: 'smartexpress', serverArg: any) {
|
||||
public async setExternalServer(serverType: 'smartexpress', serverArg: any) {
|
||||
await this.socketServer.setExternalServer(serverType, serverArg);
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import { ISocketFunctionCall } from './smartsocket.classes.socketfunction';
|
||||
import { Objectmap } from '@pushrocks/lik';
|
||||
import { SocketFunction } from './smartsocket.classes.socketfunction';
|
||||
import { SocketConnection } from './smartsocket.classes.socketconnection';
|
||||
import { defaultLogger } from '@pushrocks/smartlog';
|
||||
|
||||
// export interfaces
|
||||
export type TSocketRequestStatus = 'new' | 'pending' | 'finished';
|
||||
@ -79,10 +80,15 @@ export class SocketRequest {
|
||||
/**
|
||||
* creates the response on the responding side
|
||||
*/
|
||||
createResponse() {
|
||||
let targetSocketFunction: SocketFunction = helpers.getSocketFunctionByName(
|
||||
public async createResponse(): Promise<void> {
|
||||
const targetSocketFunction: SocketFunction = helpers.getSocketFunctionByName(
|
||||
this.funcCallData.funcName
|
||||
);
|
||||
if (!targetSocketFunction) {
|
||||
defaultLogger.log('warn', `There is no SocketFunction defined for ${this.funcCallData.funcName}`);
|
||||
defaultLogger.log('warn', `So now response is being sent.`);
|
||||
return;
|
||||
}
|
||||
plugins.smartlog.defaultLogger.log('info', `invoking ${targetSocketFunction.name}`);
|
||||
targetSocketFunction.invoke(this.funcCallData).then(resultData => {
|
||||
plugins.smartlog.defaultLogger.log('info', 'got resultData. Sending it to requesting party.');
|
||||
|
@ -23,7 +23,10 @@ export class SocketServer {
|
||||
* starts the server with another server
|
||||
* also works with an express style server
|
||||
*/
|
||||
public async setExternalServer(serverType: 'smartexpress', serverArg: plugins.smartexpress.Server) {
|
||||
public async setExternalServer(
|
||||
serverType: 'smartexpress',
|
||||
serverArg: plugins.smartexpress.Server
|
||||
) {
|
||||
await serverArg.startedPromise;
|
||||
this.httpServer = serverArg.httpServer;
|
||||
}
|
||||
@ -51,8 +54,8 @@ export class SocketServer {
|
||||
// in case an external server has been set "this.standaloneServer" should be false
|
||||
if (this.httpServer && this.standaloneServer) {
|
||||
if (!this.smartsocket.options.port) {
|
||||
console.log('there should be a port specifed for smartsocket!')
|
||||
throw new Error('there should be a port specified for smartsocket')
|
||||
console.log('there should be a port specifed for smartsocket!');
|
||||
throw new Error('there should be a port specified for smartsocket');
|
||||
}
|
||||
this.httpServer.listen(this.smartsocket.options.port, () => {
|
||||
console.log(`Server started in standalone mode on ${this.smartsocket.options.port}`);
|
||||
|
@ -8,4 +8,14 @@ import * as shortid from 'shortid';
|
||||
import * as socketIo from 'socket.io';
|
||||
import * as socketIoClient from 'socket.io-client';
|
||||
|
||||
export { lik, smartlog, smarthash, smartdelay, smartexpress, smartpromise, shortid, socketIo, socketIoClient };
|
||||
export {
|
||||
lik,
|
||||
smartlog,
|
||||
smarthash,
|
||||
smartdelay,
|
||||
smartexpress,
|
||||
smartpromise,
|
||||
shortid,
|
||||
socketIo,
|
||||
socketIoClient
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user