diff --git a/package-lock.json b/package-lock.json index 2f56b3e..b113006 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 382cae0..775c04a 100644 --- a/package.json +++ b/package.json @@ -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" } } diff --git a/test/test.ts b/test/test.ts index 433b887..5fb0f6a 100644 --- a/test/test.ts +++ b/test/test.ts @@ -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' } }); diff --git a/ts/sl.classes.smartlogreceiver.ts b/ts/sl.classes.smartlogreceiver.ts index d8ec7d8..2bf09cd 100644 --- a/ts/sl.classes.smartlogreceiver.ts +++ b/ts/sl.classes.smartlogreceiver.ts @@ -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));