fix(core): update

This commit is contained in:
Philipp Kunz 2020-06-04 15:04:44 +00:00
parent c1f67a0151
commit cbf442f984
4 changed files with 4384 additions and 463 deletions

View File

@ -2,5 +2,8 @@
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"gitzone": {
"projectType": "npm"
}
}

4797
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -13,13 +13,15 @@
"format": "(gitzone format)"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.0.22",
"@gitzone/tsrun": "^1.1.13",
"@gitzone/tstest": "^1.0.15",
"@pushrocks/tapbundle": "^3.0.7",
"@types/node": "^10.12.1",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0"
"@gitzone/tsbuild": "^2.1.24",
"@gitzone/tsrun": "^1.2.12",
"@gitzone/tstest": "^1.0.33",
"@pushrocks/tapbundle": "^3.2.1",
"@types/node": "^14.0.10",
"tslint": "^6.1.2",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {}
"dependencies": {
"@apiglobal/typedrequest-interfaces": "^1.0.13"
}
}

View File

@ -33,8 +33,11 @@ export type TEnvironment = 'local' | 'test' | 'staging' | 'production';
/**
* the available runtimes
*/
export type TRuntime = 'node' | 'chrome' | 'rust';
export type TRuntime = 'node' | 'chrome' | 'rust' | 'deno';
/**
* the log context e.g. what app in what version on what server
*/
export interface ILogContext {
company?: string;
companyunit?: string;
@ -44,13 +47,30 @@ export interface ILogContext {
zone: string;
}
export interface ILogPackage {
/**
* the main logpackage
*/
export interface ILogPackage<T = unknown> {
/**
* a unix timestamp in milliseconds
*/
timestamp: number;
type: TLogType;
context: ILogContext;
level: TLogLevel;
/**
* allows grouping of log messages
*/
correlationId: string;
message: string;
data?: any;
data?: T;
}
export interface ILogPackageDataRequest {
url: string;
pathname: string;
method: string;
status: string;
}
export interface ILogPackageAuthenticated {
@ -58,6 +78,9 @@ export interface ILogPackageAuthenticated {
logPackage: ILogPackage;
}
/**
* a destination interface for extending smartlog modules
*/
export interface ILogDestination {
handleLog: (logPackage: ILogPackage) => void;
}