fix(core): update
This commit is contained in:
parent
c1f67a0151
commit
cbf442f984
@ -2,5 +2,8 @@
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"gitzone": {
|
||||
"projectType": "npm"
|
||||
}
|
||||
}
|
||||
|
4771
package-lock.json
generated
4771
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
18
package.json
18
package.json
@ -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"
|
||||
}
|
||||
}
|
||||
|
29
ts/index.ts
29
ts/index.ts
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user