fix(core): update

This commit is contained in:
Philipp Kunz 2019-10-22 15:38:19 +02:00
parent 5c5a351026
commit c1986f3ea1
4 changed files with 1092 additions and 463 deletions

View File

@ -1,4 +1,4 @@
# gitzone standard # gitzone ci_default
image: hosttoday/ht-docker-node:npmci image: hosttoday/ht-docker-node:npmci
cache: cache:

1511
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,16 +13,16 @@
"format": "(gitzone format)" "format": "(gitzone format)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.0.22", "@gitzone/tsbuild": "^2.1.17",
"@gitzone/tstest": "^1.0.15", "@gitzone/tstest": "^1.0.28",
"@pushrocks/tapbundle": "^3.0.7", "@pushrocks/tapbundle": "^3.0.13",
"@types/node": "^10.12.5", "@types/node": "^12.11.2",
"tslint": "^5.11.0", "tslint": "^5.20.0",
"tslint-config-prettier": "^1.15.0" "tslint-config-prettier": "^1.18.0"
}, },
"dependencies": { "dependencies": {
"@pushrocks/smarthash": "^2.0.0", "@pushrocks/smarthash": "^2.0.6",
"@pushrocks/smartlog": "^2.0.9", "@pushrocks/smartlog": "^2.0.21",
"@pushrocks/smartlog-interfaces": "^2.0.3" "@pushrocks/smartlog-interfaces": "^2.0.7"
} }
} }

View File

@ -14,9 +14,9 @@ export interface ISmartlogReceiverOptions {
* a class that receives smartlog packages * a class that receives smartlog packages
*/ */
export class SmartlogReceiver { export class SmartlogReceiver {
passphrase: string; public passphrase: string;
validatorFunction: TValidatorFunction; public validatorFunction: TValidatorFunction;
smartlogInstance: plugins.smartlog.Smartlog; public smartlogInstance: plugins.smartlog.Smartlog;
constructor(smartlogReceiverOptions: ISmartlogReceiverOptions) { constructor(smartlogReceiverOptions: ISmartlogReceiverOptions) {
this.passphrase = smartlogReceiverOptions.passphrase; this.passphrase = smartlogReceiverOptions.passphrase;
@ -27,7 +27,7 @@ export class SmartlogReceiver {
/** /**
* handles a authenticated log * handles a authenticated log
*/ */
async handleAuthenticatedLog(authenticatedLogPackageArg: ILogPackageAuthenticated) { public async handleAuthenticatedLog(authenticatedLogPackageArg: ILogPackageAuthenticated) {
const authString = authenticatedLogPackageArg.auth; const authString = authenticatedLogPackageArg.auth;
const logPackage = authenticatedLogPackageArg.logPackage; const logPackage = authenticatedLogPackageArg.logPackage;
@ -42,5 +42,17 @@ export class SmartlogReceiver {
} }
} }
/**
* handles an array of authenticated logs
* @param authenticatedLogsPackageArrayArg
*/
public async handleManyAuthenticatedLogs(authenticatedLogsPackageArrayArg: ILogPackageAuthenticated[]) {
const promiseArray: Array<Promise<any>> = [];
for (const logPackage of authenticatedLogsPackageArrayArg) {
promiseArray.push(this.handleAuthenticatedLog(logPackage));
}
await Promise.all(promiseArray);
}
} }