document-drive 1.0.0-alpha.32 → 1.0.0-alpha.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-drive",
3
- "version": "1.0.0-alpha.32",
3
+ "version": "1.0.0-alpha.33",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "module": "./src/index.ts",
@@ -14,7 +14,8 @@
14
14
  "./storage/memory": "./src/storage/memory.ts",
15
15
  "./storage/prisma": "./src/storage/prisma.ts",
16
16
  "./utils": "./src/utils/index.ts",
17
- "./utils/graphql": "./src/utils/graphql.ts"
17
+ "./utils/graphql": "./src/utils/graphql.ts",
18
+ "./logger": "./src/utils/logger.ts"
18
19
  },
19
20
  "files": [
20
21
  "./src"
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
- export type ILogger = Pick<Console, 'log' | 'info' | 'warn' | 'error'>;
2
+ export type ILogger = Pick<Console, 'log' | 'info' | 'warn' | 'error' | 'debug' | 'trace'>;
3
3
  class Logger implements ILogger {
4
4
  #logger: ILogger = console;
5
5
 
@@ -11,18 +11,31 @@ class Logger implements ILogger {
11
11
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
12
12
  return this.#logger.log(...data);
13
13
  }
14
+
14
15
  info(...data: any[]): void {
15
16
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
16
17
  return this.#logger.info(...data);
17
18
  }
19
+
18
20
  warn(...data: any[]): void {
19
21
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
20
22
  return this.#logger.warn(...data);
21
23
  }
24
+
22
25
  error(...data: any[]): void {
23
26
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
24
27
  return this.#logger.error(...data);
25
28
  }
29
+
30
+ debug(...data: any[]): void {
31
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
32
+ return this.#logger.debug(...data);
33
+ }
34
+
35
+ trace(...data: any[]): void {
36
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
37
+ return this.#logger.trace(...data);
38
+ }
26
39
  }
27
40
 
28
41
  const loggerInstance = new Logger();