fix(core): update

This commit is contained in:
Philipp Kunz 2022-08-05 13:38:12 +02:00
parent 97dc286fb5
commit 3cd188be28
5 changed files with 1041 additions and 1873 deletions

2881
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -14,15 +14,15 @@
"buildDocs": "(tsdoc)" "buildDocs": "(tsdoc)"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.25", "@gitzone/tsbuild": "^2.1.65",
"@gitzone/tsbundle": "^2.0.5", "@gitzone/tsbundle": "^2.0.7",
"@gitzone/tsdoc": "^1.1.10", "@gitzone/tsdoc": "^1.1.10",
"@gitzone/tstest": "^1.0.44", "@gitzone/tstest": "^1.0.73",
"@pushrocks/tapbundle": "^5.0.3", "@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^18.6.3" "@types/node": "^18.6.4"
}, },
"dependencies": { "dependencies": {
"@pushrocks/smartclickhouse": "^2.0.11", "@pushrocks/smartclickhouse": "^2.0.14",
"@pushrocks/smartlog-interfaces": "^2.0.23" "@pushrocks/smartlog-interfaces": "^2.0.23"
}, },
"browserslist": [ "browserslist": [
@ -40,4 +40,4 @@
"npmextra.json", "npmextra.json",
"readme.md" "readme.md"
] ]
} }

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@pushrocks/smartlog-destination-clickhouse', name: '@pushrocks/smartlog-destination-clickhouse',
version: '1.0.10', version: '1.0.11',
description: 'a smartlog destination pushing logs to clickhouse' description: 'a smartlog destination pushing logs to clickhouse'
} }

View File

@ -2,12 +2,14 @@ import * as plugins from './slclick.plugins.js';
export class SmartlogDestinationClickhouse implements plugins.smartlogInterfaces.ILogDestination { export class SmartlogDestinationClickhouse implements plugins.smartlogInterfaces.ILogDestination {
// STATIC // STATIC
public static async createAndStart(optionsArg: plugins.smartclickhouse.IClickhouseConstructorOptions) { public static async createAndStart(
optionsArg: plugins.smartclickhouse.IClickhouseConstructorOptions
) {
const destinationClickhouse = new SmartlogDestinationClickhouse(optionsArg); const destinationClickhouse = new SmartlogDestinationClickhouse(optionsArg);
await destinationClickhouse.start(); await destinationClickhouse.start();
return destinationClickhouse; return destinationClickhouse;
} }
// INSTANCE // INSTANCE
private smartclickhouseDb: plugins.smartclickhouse.SmartClickHouseDb; private smartclickhouseDb: plugins.smartclickhouse.SmartClickHouseDb;
private logTable: plugins.smartclickhouse.TimeDataTable; private logTable: plugins.smartclickhouse.TimeDataTable;
@ -19,8 +21,10 @@ export class SmartlogDestinationClickhouse implements plugins.smartlogInterfaces
await this.smartclickhouseDb.start(); await this.smartclickhouseDb.start();
this.logTable = await this.smartclickhouseDb.getTable('logs'); this.logTable = await this.smartclickhouseDb.getTable('logs');
} }
public async handleLog(logPackage: plugins.smartlogInterfaces.ILogPackage<unknown>): Promise<void> { public async handleLog(
logPackage: plugins.smartlogInterfaces.ILogPackage<unknown>
): Promise<void> {
await this.logTable.addData(logPackage); await this.logTable.addData(logPackage);
}; }
} }

View File

@ -2,7 +2,4 @@
import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces'; import * as smartlogInterfaces from '@pushrocks/smartlog-interfaces';
import * as smartclickhouse from '@pushrocks/smartclickhouse'; import * as smartclickhouse from '@pushrocks/smartclickhouse';
export { export { smartlogInterfaces, smartclickhouse };
smartlogInterfaces,
smartclickhouse
}