@larvit/log 1.0.4 → 1.1.1

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.
Files changed (3) hide show
  1. package/index.d.ts +6 -7
  2. package/index.ts +6 -6
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- declare type Metadata = {
1
+ export declare type Metadata = {
2
2
  [key: string]: string;
3
3
  };
4
- declare type LogShorthand = (msg: string, metadata?: Metadata) => void;
5
- interface LogInt {
4
+ export declare type LogShorthand = (msg: string, metadata?: Metadata) => void;
5
+ export interface LogInt {
6
6
  error: LogShorthand;
7
7
  warn: LogShorthand;
8
8
  info: LogShorthand;
@@ -10,13 +10,13 @@ interface LogInt {
10
10
  debug: LogShorthand;
11
11
  silly: LogShorthand;
12
12
  }
13
- declare type LogLevel = keyof LogInt;
14
- declare type EntryFormatterConf = {
13
+ export declare type LogLevel = keyof LogInt;
14
+ export declare type EntryFormatterConf = {
15
15
  logLevel: LogLevel;
16
16
  metadata?: Metadata;
17
17
  msg: string;
18
18
  };
19
- declare type LogConf = {
19
+ export declare type LogConf = {
20
20
  context?: Metadata;
21
21
  entryFormatter?: (conf: EntryFormatterConf) => string;
22
22
  format?: "text" | "json";
@@ -37,4 +37,3 @@ export declare class Log implements LogInt {
37
37
  debug(msg: string, metadata?: Metadata): void;
38
38
  silly(msg: string, metadata?: Metadata): void;
39
39
  }
40
- export {};
package/index.ts CHANGED
@@ -1,10 +1,10 @@
1
- type Metadata = {
1
+ export type Metadata = {
2
2
  [key: string]: string;
3
3
  }
4
4
 
5
- type LogShorthand = (msg: string, metadata?: Metadata) => void;
5
+ export type LogShorthand = (msg: string, metadata?: Metadata) => void;
6
6
 
7
- interface LogInt {
7
+ export interface LogInt {
8
8
  /* eslint-disable typescript-sort-keys/interface */
9
9
  error: LogShorthand;
10
10
  warn: LogShorthand;
@@ -15,15 +15,15 @@ interface LogInt {
15
15
  /* eslint-enable typescript-sort-keys/interface */
16
16
  }
17
17
 
18
- type LogLevel = keyof LogInt;
18
+ export type LogLevel = keyof LogInt;
19
19
 
20
- type EntryFormatterConf = {
20
+ export type EntryFormatterConf = {
21
21
  logLevel: LogLevel;
22
22
  metadata?: Metadata;
23
23
  msg: string;
24
24
  }
25
25
 
26
- type LogConf = {
26
+ export type LogConf = {
27
27
  context?: Metadata;
28
28
  entryFormatter?: (conf: EntryFormatterConf) => string;
29
29
  format?: "text" | "json";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@larvit/log",
3
- "version": "1.0.4",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "packageManager": "yarn@3.2.4",