@rango-dev/logging-types 0.1.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +7 -0
- package/package.json +26 -0
- package/src/index.ts +26 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export declare enum Level {
|
|
2
|
+
Off = 99,
|
|
3
|
+
Trace = 0,
|
|
4
|
+
Debug = 1,
|
|
5
|
+
Info = 2,
|
|
6
|
+
Warn = 3,
|
|
7
|
+
Error = 4
|
|
8
|
+
}
|
|
9
|
+
export declare const EventType = "logger-message-event";
|
|
10
|
+
export interface Layer {
|
|
11
|
+
handler(payload: EventPayload): void;
|
|
12
|
+
}
|
|
13
|
+
export type Message = Error;
|
|
14
|
+
export type Context = Record<string, unknown>;
|
|
15
|
+
export type Tags = Record<string, unknown>;
|
|
16
|
+
export type Data = {
|
|
17
|
+
tags?: Tags;
|
|
18
|
+
context?: Context;
|
|
19
|
+
} & Record<string, unknown>;
|
|
20
|
+
export interface EventPayload {
|
|
21
|
+
level: Level;
|
|
22
|
+
message: Message;
|
|
23
|
+
data?: Data;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,oBAAY,KAAK;IACf,GAAG,KAAK;IACR,KAAK,IAAI;IACT,KAAK,IAAI;IACT,IAAI,IAAI;IACR,IAAI,IAAI;IACR,KAAK,IAAI;CACV;AAED,eAAO,MAAM,SAAS,yBAAyB,CAAC;AAEhD,MAAM,WAAW,KAAK;IACpB,OAAO,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;CACtC;AAED,MAAM,MAAM,OAAO,GAAG,KAAK,CAAC;AAC5B,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC9C,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAC3C,MAAM,MAAM,IAAI,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhF,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-magic-numbers */\nexport enum Level {\n Off = 99,\n Trace = 0,\n Debug = 1,\n Info = 2,\n Warn = 3,\n Error = 4,\n}\n\nexport const EventType = 'logger-message-event';\n\nexport interface Layer {\n handler(payload: EventPayload): void;\n}\n\nexport type Message = Error;\nexport type Context = Record<string, unknown>;\nexport type Tags = Record<string, unknown>;\nexport type Data = { tags?: Tags; context?: Context } & Record<string, unknown>;\n\nexport interface EventPayload {\n level: Level;\n message: Message;\n data?: Data;\n}\n"],
|
|
5
|
+
"mappings": "AACO,IAAKA,OACVA,IAAA,IAAM,IAAN,MACAA,IAAA,MAAQ,GAAR,QACAA,IAAA,MAAQ,GAAR,QACAA,IAAA,KAAO,GAAP,OACAA,IAAA,KAAO,GAAP,OACAA,IAAA,MAAQ,GAAR,QANUA,OAAA,IASCC,EAAY",
|
|
6
|
+
"names": ["Level", "EventType"]
|
|
7
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rango-dev/logging-types",
|
|
3
|
+
"version": "0.1.1-next.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"source": "./src/index.ts",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"typings": "dist/index.d.ts",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"src"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "node ../../scripts/build/command.mjs --path logging/types",
|
|
18
|
+
"ts-check": "tsc --declaration --emitDeclarationOnly -p ./tsconfig.json",
|
|
19
|
+
"clean": "rimraf dist",
|
|
20
|
+
"format": "prettier --write '{.,src}/**/*.{ts,tsx}'",
|
|
21
|
+
"lint": "eslint \"**/*.{ts,tsx}\" --ignore-path ../../.eslintignore"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
}
|
|
26
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-magic-numbers */
|
|
2
|
+
export enum Level {
|
|
3
|
+
Off = 99,
|
|
4
|
+
Trace = 0,
|
|
5
|
+
Debug = 1,
|
|
6
|
+
Info = 2,
|
|
7
|
+
Warn = 3,
|
|
8
|
+
Error = 4,
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const EventType = 'logger-message-event';
|
|
12
|
+
|
|
13
|
+
export interface Layer {
|
|
14
|
+
handler(payload: EventPayload): void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export type Message = Error;
|
|
18
|
+
export type Context = Record<string, unknown>;
|
|
19
|
+
export type Tags = Record<string, unknown>;
|
|
20
|
+
export type Data = { tags?: Tags; context?: Context } & Record<string, unknown>;
|
|
21
|
+
|
|
22
|
+
export interface EventPayload {
|
|
23
|
+
level: Level;
|
|
24
|
+
message: Message;
|
|
25
|
+
data?: Data;
|
|
26
|
+
}
|