fix(core): update
This commit is contained in:
parent
c1f67a0151
commit
cbf442f984
@ -2,5 +2,8 @@
|
|||||||
"npmci": {
|
"npmci": {
|
||||||
"npmGlobalTools": [],
|
"npmGlobalTools": [],
|
||||||
"npmAccessLevel": "public"
|
"npmAccessLevel": "public"
|
||||||
|
},
|
||||||
|
"gitzone": {
|
||||||
|
"projectType": "npm"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4797
package-lock.json
generated
4797
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)"
|
"format": "(gitzone format)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.0.22",
|
"@gitzone/tsbuild": "^2.1.24",
|
||||||
"@gitzone/tsrun": "^1.1.13",
|
"@gitzone/tsrun": "^1.2.12",
|
||||||
"@gitzone/tstest": "^1.0.15",
|
"@gitzone/tstest": "^1.0.33",
|
||||||
"@pushrocks/tapbundle": "^3.0.7",
|
"@pushrocks/tapbundle": "^3.2.1",
|
||||||
"@types/node": "^10.12.1",
|
"@types/node": "^14.0.10",
|
||||||
"tslint": "^5.11.0",
|
"tslint": "^6.1.2",
|
||||||
"tslint-config-prettier": "^1.15.0"
|
"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
|
* 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 {
|
export interface ILogContext {
|
||||||
company?: string;
|
company?: string;
|
||||||
companyunit?: string;
|
companyunit?: string;
|
||||||
@ -44,13 +47,30 @@ export interface ILogContext {
|
|||||||
zone: string;
|
zone: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ILogPackage {
|
/**
|
||||||
|
* the main logpackage
|
||||||
|
*/
|
||||||
|
export interface ILogPackage<T = unknown> {
|
||||||
|
/**
|
||||||
|
* a unix timestamp in milliseconds
|
||||||
|
*/
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
type: TLogType;
|
type: TLogType;
|
||||||
context: ILogContext;
|
context: ILogContext;
|
||||||
level: TLogLevel;
|
level: TLogLevel;
|
||||||
|
/**
|
||||||
|
* allows grouping of log messages
|
||||||
|
*/
|
||||||
|
correlationId: string;
|
||||||
message: string;
|
message: string;
|
||||||
data?: any;
|
data?: T;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ILogPackageDataRequest {
|
||||||
|
url: string;
|
||||||
|
pathname: string;
|
||||||
|
method: string;
|
||||||
|
status: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ILogPackageAuthenticated {
|
export interface ILogPackageAuthenticated {
|
||||||
@ -58,6 +78,9 @@ export interface ILogPackageAuthenticated {
|
|||||||
logPackage: ILogPackage;
|
logPackage: ILogPackage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* a destination interface for extending smartlog modules
|
||||||
|
*/
|
||||||
export interface ILogDestination {
|
export interface ILogDestination {
|
||||||
handleLog: (logPackage: ILogPackage) => void;
|
handleLog: (logPackage: ILogPackage) => void;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user