fix(core): update

This commit is contained in:
Philipp Kunz 2018-11-11 01:56:02 +01:00
parent 85bba31ff8
commit 20b5dcd355
4 changed files with 17 additions and 22 deletions

25
package-lock.json generated
View File

@ -111,24 +111,17 @@
}
},
"@pushrocks/smartlog": {
"version": "2.0.8",
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog/-/smartlog-2.0.8.tgz",
"integrity": "sha512-fZIzmKye+Lsu7rTH+ILZ1u/jJvrAni9c3udQIgrHXtxyNWd8bROO5GAYsSm8pGWbdawv2hpVoG9qa9yKBUQGJA==",
"version": "2.0.9",
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog/-/smartlog-2.0.9.tgz",
"integrity": "sha512-F2u3O8OOQ7QXgg9o0lI7HnqEhSQZo2A8u0EuNbQH+Kj2oL62xDwjAg6KkINwH7ObSWpaldZ+I28prG0JxaRzvg==",
"requires": {
"@pushrocks/smartlog-interfaces": "^2.0.2"
},
"dependencies": {
"@pushrocks/smartlog-interfaces": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog-interfaces/-/smartlog-interfaces-2.0.3.tgz",
"integrity": "sha512-49nPRfXT1ZJNY5e23ujysHMDx0yaPMrLBpLtjkGxZRDLIfh1HuohMcGt5aeRhvxooLnM88AOM/2Lg4OltpFDPg=="
}
}
},
"@pushrocks/smartlog-interfaces": {
"version": "1.0.15",
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog-interfaces/-/smartlog-interfaces-1.0.15.tgz",
"integrity": "sha512-dn9a+IhneukhtVGQG031oodOITmmQ5s5hcMThd+cMUQL3XYTbLPnZVuJfTDeWCT0iqLqrBD/qp2d1RRc3W/qIQ=="
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@pushrocks/smartlog-interfaces/-/smartlog-interfaces-2.0.3.tgz",
"integrity": "sha512-49nPRfXT1ZJNY5e23ujysHMDx0yaPMrLBpLtjkGxZRDLIfh1HuohMcGt5aeRhvxooLnM88AOM/2Lg4OltpFDPg=="
},
"@pushrocks/smartpath": {
"version": "4.0.1",
@ -225,9 +218,9 @@
}
},
"@types/node": {
"version": "10.12.1",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.1.tgz",
"integrity": "sha512-i1sl+WCX2OCHeUi9oi7PiCNUtYFrpWhpcx878vpeq/tlZTKzcFdHePlyFHVbWqeuKN0SRPl/9ZFDSTsfv9h7VQ=="
"version": "10.12.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.5.tgz",
"integrity": "sha512-GzdHjq3t3eGLMv92Al90Iq+EoLL+86mPfQhuglbBFO7HiLdC/rkt+zrzJJumAiBF6nsrBWhou22rPW663AAyFw=="
},
"@types/through2": {
"version": "2.0.34",

View File

@ -16,13 +16,13 @@
"@gitzone/tsbuild": "^2.0.22",
"@gitzone/tstest": "^1.0.15",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^10.12.1",
"@types/node": "^10.12.5",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0"
},
"dependencies": {
"@pushrocks/smarthash": "^2.0.0",
"@pushrocks/smartlog": "^2.0.8",
"@pushrocks/smartlog-interfaces": "^1.0.15"
"@pushrocks/smartlog": "^2.0.9",
"@pushrocks/smartlog-interfaces": "^2.0.3"
}
}

View File

@ -23,7 +23,8 @@ tap.test('should receive a message', async () => {
testReceiver.handleAuthenticatedLog({
auth: smarthash.sha256FromStringSync('hi'),
logPackage: {
logContext: {
timestamp: Date.now(),
context: {
company: 'Lossless GmbH',
companyunit: 'Lossless Cloud',
containerName: null,
@ -31,7 +32,8 @@ tap.test('should receive a message', async () => {
runtime: 'node',
zone: 'gitzone'
},
logLevel: 'info',
level: 'info',
type: 'log',
message: 'hi there'
}
});

View File

@ -33,7 +33,7 @@ export class SmartlogReceiver {
if(authString === plugins.smarthash.sha256FromStringSync(this.passphrase)) {
this.smartlogInstance.log('ok', 'Message accepted');
this.smartlogInstance
this.smartlogInstance.handleLogPackage(logPackage);
} else {
this.smartlogInstance.log('error', 'Message rejected because of bad passphrase');
// console.log(plugins.smarthash.sha256FromStringSync(this.passphrase));