@sigil-dev/grimoire 0.9.4 → 0.9.5

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 (78) hide show
  1. package/index.ts +37 -37
  2. package/package.json +3 -3
  3. package/preload.js +3 -3
  4. package/server.ts +19 -19
  5. package/src/client/deps.ts +36 -36
  6. package/src/client/enhance.ts +102 -102
  7. package/src/client/head.ts +30 -30
  8. package/src/client/index.ts +5 -5
  9. package/src/client/router.ts +42 -20
  10. package/src/client/scope.ts +22 -22
  11. package/src/dev/compile-module.ts +215 -163
  12. package/src/dev/effect-registry.ts +23 -23
  13. package/src/dev/graph.ts +109 -114
  14. package/src/dev/hmr-client.ts +202 -185
  15. package/src/dev/hmr-server.ts +261 -187
  16. package/src/dev/loader.ts +120 -47
  17. package/src/dev/paths.ts +14 -14
  18. package/src/dev/resolve.ts +70 -0
  19. package/src/dev/runtime-bundle.ts +52 -52
  20. package/src/dev/scan.ts +78 -0
  21. package/src/dev/watcher.ts +69 -47
  22. package/src/env/dynamic-private.ts +19 -19
  23. package/src/env/dynamic-public.ts +22 -22
  24. package/src/env/index.ts +25 -25
  25. package/src/env/plugin.ts +19 -19
  26. package/src/env/private.ts +5 -5
  27. package/src/env/public.ts +7 -7
  28. package/src/env/typegen.ts +61 -61
  29. package/src/headers.ts +114 -114
  30. package/src/integrations/vite.ts +73 -73
  31. package/src/logger/index.ts +4 -4
  32. package/src/logger/instance.ts +6 -6
  33. package/src/logger/logger.ts +113 -113
  34. package/src/logger/request-middleware.ts +24 -24
  35. package/src/logger/transports.ts +117 -117
  36. package/src/logger/types.ts +39 -39
  37. package/src/rendering/head.ts +52 -47
  38. package/src/rendering/hydrate.ts +16 -3
  39. package/src/rendering/index.ts +10 -6
  40. package/src/rendering/ssrPlugin.ts +78 -69
  41. package/src/routing/manifest-gen.ts +55 -55
  42. package/src/routing/router.ts +135 -135
  43. package/src/routing/scanner.ts +196 -187
  44. package/src/routing/transform-routes.ts +102 -102
  45. package/src/sentinels/error.ts +52 -52
  46. package/src/sentinels/fail.ts +41 -41
  47. package/src/sentinels/redirect.ts +35 -35
  48. package/src/server/build.ts +250 -255
  49. package/src/server/context.ts +10 -10
  50. package/src/server/cookie-utils.ts +66 -66
  51. package/src/server/coordinator.ts +364 -364
  52. package/src/server/hooks.ts +114 -114
  53. package/src/server/index.ts +711 -677
  54. package/src/server/interactive.ts +56 -56
  55. package/src/server/plugins.ts +121 -121
  56. package/src/server/worker.ts +58 -58
  57. package/src/typegen/index.ts +389 -389
  58. package/src/types.ts +286 -286
  59. package/test/client-router.test.ts +295 -298
  60. package/test/context.test.ts +52 -52
  61. package/test/env.test.ts +90 -90
  62. package/test/exports.test.ts +37 -37
  63. package/test/fail.test.ts +46 -46
  64. package/test/headers.test.ts +100 -100
  65. package/test/hmr.test.ts +426 -0
  66. package/test/hydration.test.ts +119 -119
  67. package/test/middleware.test.ts +223 -223
  68. package/test/preload.ts +5 -5
  69. package/test/redirect-error.test.ts +112 -112
  70. package/test/rendering.test.ts +719 -728
  71. package/test/routing.test.ts +197 -194
  72. package/test/scanning.test.ts +314 -254
  73. package/test/scope.test.ts +195 -195
  74. package/test/server.test.ts +360 -354
  75. package/test/streaming.test.ts +242 -242
  76. package/test/transform-routes.test.ts +87 -87
  77. package/test/typegen.test.ts +697 -697
  78. package/tsconfig.json +10 -10
@@ -1,113 +1,113 @@
1
- // packages/grimoire/src/logger/logger.ts
2
-
3
- import type {
4
- LogEntry,
5
- LoggerOptions,
6
- LogLevel,
7
- LogTransport,
8
- ScopedLogger,
9
- } from "./types.ts";
10
- import { LOG_LEVELS } from "./types.ts";
11
-
12
- export class Logger implements ScopedLogger {
13
- private transports: LogTransport[];
14
- private minLevel: number;
15
- private filter?: (entry: LogEntry) => boolean;
16
- private _scope: string;
17
- private _worker?: string;
18
- private _requestId?: string;
19
-
20
- constructor(scope: string, options: LoggerOptions = {}, worker?: string) {
21
- this._scope = scope;
22
- this._worker = worker;
23
- this.transports = options.transports ?? [];
24
- this.minLevel =
25
- LOG_LEVELS[
26
- options.level ??
27
- (process.env.LOG_LEVEL as LogLevel | undefined) ??
28
- "info"
29
- ] ?? LOG_LEVELS.info;
30
- this.filter = options.filter;
31
- }
32
-
33
- // called by loom coordinator after forking workers
34
- setWorker(name: string) {
35
- this._worker = name;
36
- }
37
-
38
- private write(level: LogLevel, message: string, ...args: unknown[]) {
39
- if (LOG_LEVELS[level] < this.minLevel) return;
40
-
41
- const data =
42
- args.length === 0 ? undefined : args.length === 1 ? args[0] : args;
43
-
44
- const entry: LogEntry = {
45
- level,
46
- scope: this._scope,
47
- message,
48
- data,
49
- timestamp: Date.now(),
50
- worker: this._worker,
51
- requestId: this._requestId,
52
- };
53
-
54
- if (this.filter && !this.filter(entry)) return;
55
- for (const t of this.transports) {
56
- try {
57
- t.write(entry);
58
- } catch {}
59
- }
60
- }
61
-
62
- debug(message: string, ...args: unknown[]) {
63
- this.write("debug", message, ...args);
64
- }
65
- info(message: string, ...args: unknown[]) {
66
- this.write("info", message, ...args);
67
- }
68
- warn(message: string, ...args: unknown[]) {
69
- this.write("warn", message, ...args);
70
- }
71
- error(message: string, ...args: unknown[]) {
72
- this.write("error", message, ...args);
73
- }
74
- fatal(message: string, ...args: unknown[]) {
75
- this.write("fatal", message, ...args);
76
- }
77
-
78
- scope(name: string): ScopedLogger {
79
- const child = new Logger(
80
- `${this._scope}:${name}`,
81
- {
82
- transports: this.transports,
83
- level: Object.keys(LOG_LEVELS).find(
84
- (k) => LOG_LEVELS[k as LogLevel] === this.minLevel,
85
- ) as LogLevel,
86
- filter: this.filter,
87
- },
88
- this._worker,
89
- );
90
- child._requestId = this._requestId;
91
- return child;
92
- }
93
-
94
- withRequest(requestId: string): ScopedLogger {
95
- const child = new Logger(
96
- this._scope,
97
- {
98
- transports: this.transports,
99
- level: Object.keys(LOG_LEVELS).find(
100
- (k) => LOG_LEVELS[k as LogLevel] === this.minLevel,
101
- ) as LogLevel,
102
- filter: this.filter,
103
- },
104
- this._worker,
105
- );
106
- child._requestId = requestId;
107
- return child;
108
- }
109
-
110
- addTransport(t: LogTransport) {
111
- this.transports.push(t);
112
- }
113
- }
1
+ // packages/grimoire/src/logger/logger.ts
2
+
3
+ import type {
4
+ LogEntry,
5
+ LoggerOptions,
6
+ LogLevel,
7
+ LogTransport,
8
+ ScopedLogger,
9
+ } from "./types.ts";
10
+ import { LOG_LEVELS } from "./types.ts";
11
+
12
+ export class Logger implements ScopedLogger {
13
+ private transports: LogTransport[];
14
+ private minLevel: number;
15
+ private filter?: (entry: LogEntry) => boolean;
16
+ private _scope: string;
17
+ private _worker?: string;
18
+ private _requestId?: string;
19
+
20
+ constructor(scope: string, options: LoggerOptions = {}, worker?: string) {
21
+ this._scope = scope;
22
+ this._worker = worker;
23
+ this.transports = options.transports ?? [];
24
+ this.minLevel =
25
+ LOG_LEVELS[
26
+ options.level ??
27
+ (process.env.LOG_LEVEL as LogLevel | undefined) ??
28
+ "info"
29
+ ] ?? LOG_LEVELS.info;
30
+ this.filter = options.filter;
31
+ }
32
+
33
+ // called by loom coordinator after forking workers
34
+ setWorker(name: string) {
35
+ this._worker = name;
36
+ }
37
+
38
+ private write(level: LogLevel, message: string, ...args: unknown[]) {
39
+ if (LOG_LEVELS[level] < this.minLevel) return;
40
+
41
+ const data =
42
+ args.length === 0 ? undefined : args.length === 1 ? args[0] : args;
43
+
44
+ const entry: LogEntry = {
45
+ level,
46
+ scope: this._scope,
47
+ message,
48
+ data,
49
+ timestamp: Date.now(),
50
+ worker: this._worker,
51
+ requestId: this._requestId,
52
+ };
53
+
54
+ if (this.filter && !this.filter(entry)) return;
55
+ for (const t of this.transports) {
56
+ try {
57
+ t.write(entry);
58
+ } catch {}
59
+ }
60
+ }
61
+
62
+ debug(message: string, ...args: unknown[]) {
63
+ this.write("debug", message, ...args);
64
+ }
65
+ info(message: string, ...args: unknown[]) {
66
+ this.write("info", message, ...args);
67
+ }
68
+ warn(message: string, ...args: unknown[]) {
69
+ this.write("warn", message, ...args);
70
+ }
71
+ error(message: string, ...args: unknown[]) {
72
+ this.write("error", message, ...args);
73
+ }
74
+ fatal(message: string, ...args: unknown[]) {
75
+ this.write("fatal", message, ...args);
76
+ }
77
+
78
+ scope(name: string): ScopedLogger {
79
+ const child = new Logger(
80
+ `${this._scope}:${name}`,
81
+ {
82
+ transports: this.transports,
83
+ level: Object.keys(LOG_LEVELS).find(
84
+ (k) => LOG_LEVELS[k as LogLevel] === this.minLevel,
85
+ ) as LogLevel,
86
+ filter: this.filter,
87
+ },
88
+ this._worker,
89
+ );
90
+ child._requestId = this._requestId;
91
+ return child;
92
+ }
93
+
94
+ withRequest(requestId: string): ScopedLogger {
95
+ const child = new Logger(
96
+ this._scope,
97
+ {
98
+ transports: this.transports,
99
+ level: Object.keys(LOG_LEVELS).find(
100
+ (k) => LOG_LEVELS[k as LogLevel] === this.minLevel,
101
+ ) as LogLevel,
102
+ filter: this.filter,
103
+ },
104
+ this._worker,
105
+ );
106
+ child._requestId = requestId;
107
+ return child;
108
+ }
109
+
110
+ addTransport(t: LogTransport) {
111
+ this.transports.push(t);
112
+ }
113
+ }
@@ -1,24 +1,24 @@
1
- // packages/grimoire/src/logger/request-middleware.ts
2
- // Injected automatically by Grimoire before hooks.server.ts runs.
3
-
4
- import crypto from "node:crypto";
5
- import type { Logger } from "./logger.ts";
6
- import type { ScopedLogger } from "./types.ts";
7
-
8
- declare module "@sigil-dev/grimoire" {
9
- interface RequestLocals {
10
- log: ScopedLogger;
11
- }
12
- }
13
-
14
- export function createRequestMiddleware(root: Logger) {
15
- return function requestMiddleware(
16
- _req: Request,
17
- locals: Record<string, unknown>,
18
- ) {
19
- // 8-char hex ID — short enough to read in a terminal
20
- const requestId = crypto.randomUUID().slice(0, 8);
21
- locals.log = root.withRequest(requestId);
22
- (locals.log as any)._requestId = requestId;
23
- };
24
- }
1
+ // packages/grimoire/src/logger/request-middleware.ts
2
+ // Injected automatically by Grimoire before hooks.server.ts runs.
3
+
4
+ import crypto from "node:crypto";
5
+ import type { Logger } from "./logger.ts";
6
+ import type { ScopedLogger } from "./types.ts";
7
+
8
+ declare module "@sigil-dev/grimoire" {
9
+ interface RequestLocals {
10
+ log: ScopedLogger;
11
+ }
12
+ }
13
+
14
+ export function createRequestMiddleware(root: Logger) {
15
+ return function requestMiddleware(
16
+ _req: Request,
17
+ locals: Record<string, unknown>,
18
+ ) {
19
+ // 8-char hex ID — short enough to read in a terminal
20
+ const requestId = crypto.randomUUID().slice(0, 8);
21
+ locals.log = root.withRequest(requestId);
22
+ (locals.log as any)._requestId = requestId;
23
+ };
24
+ }
@@ -1,117 +1,117 @@
1
- // packages/grimoire/src/logger/transports.ts
2
-
3
- import { appendFileSync } from "node:fs";
4
- import type { LogEntry, LogTransport } from "./types.ts";
5
-
6
- // ── colours (only applied when stdout is a TTY) ──────────────────────────────
7
-
8
- const isTTY = process.stdout.isTTY;
9
- const c = isTTY
10
- ? {
11
- reset: "\x1b[0m",
12
- dim: "\x1b[2m",
13
- bold: "\x1b[1m",
14
- debug: "\x1b[90m", // grey
15
- info: "\x1b[36m", // cyan
16
- warn: "\x1b[33m", // yellow
17
- error: "\x1b[31m", // red
18
- fatal: "\x1b[35m", // magenta
19
- scope: "\x1b[34m", // blue
20
- req: "\x1b[32m", // green
21
- }
22
- : (Object.fromEntries(
23
- [
24
- "reset",
25
- "dim",
26
- "bold",
27
- "debug",
28
- "info",
29
- "warn",
30
- "error",
31
- "fatal",
32
- "scope",
33
- "req",
34
- ].map((k) => [k, ""]),
35
- ) as Record<string, string>);
36
-
37
- const LEVEL_LABEL: Record<string, string> = {
38
- debug: "DBG",
39
- info: "INF",
40
- warn: "WRN",
41
- error: "ERR",
42
- fatal: "FTL",
43
- };
44
-
45
- function ts(timestamp: number): string {
46
- return new Date(timestamp).toISOString().slice(11, 23); // HH:mm:ss.ms
47
- }
48
-
49
- function formatData(data: unknown): string {
50
- if (data === undefined) return "";
51
- if (data instanceof Error) return `\n ${data.stack ?? data.message}`;
52
- if (typeof data !== "object" || data === null) return ` ${String(data)}`;
53
-
54
- // flat key=value for simple objects, JSON block only for nested/complex
55
- const entries = Object.entries(data as Record<string, unknown>);
56
- const isFlat = entries.every(([, v]) => typeof v !== "object" || v === null);
57
- if (isFlat) {
58
- return ` ${entries.map(([k, v]) => `${colors.dim(`${k}=`)}${v}`).join(" ")}`;
59
- }
60
- // nested — indent but don't pretty-print the whole thing
61
- return `\n ${JSON.stringify(data).replace(/,/g, ", ")}`;
62
- }
63
-
64
- // ── ConsoleTransport ─────────────────────────────────────────────────────────
65
-
66
- export class ConsoleTransport implements LogTransport {
67
- write(entry: LogEntry) {
68
- const levelColor = c[entry.level] ?? c.info;
69
- const label = LEVEL_LABEL[entry.level] ?? entry.level.toUpperCase();
70
-
71
- const worker = entry.worker ? `${c.dim}[${entry.worker}]${c.reset} ` : "";
72
- const requestId = entry.requestId
73
- ? `${c.req}#${entry.requestId.slice(0, 8)}${c.reset} `
74
- : "";
75
- const scope = `${c.scope}${entry.scope}${c.reset}`;
76
- const time = `${c.dim}${ts(entry.timestamp)}${c.reset}`;
77
- const lvl = `${levelColor}${c.bold}${label}${c.reset}`;
78
- const msg = entry.message;
79
- const data = formatData(entry.data);
80
-
81
- const line = `${time} ${lvl} ${worker}${requestId}${scope} ${msg}${data}`;
82
-
83
- if (entry.level === "error" || entry.level === "fatal") {
84
- process.stderr.write(`${line}\n`);
85
- } else {
86
- process.stdout.write(`${line}\n`);
87
- }
88
- }
89
- }
90
-
91
- // ── FileTransport ────────────────────────────────────────────────────────────
92
- // Writes newline-delimited JSON for ingestion by log collectors.
93
-
94
- export class FileTransport implements LogTransport {
95
- constructor(private path: string) {}
96
-
97
- write(entry: LogEntry) {
98
- try {
99
- appendFileSync(this.path, `${JSON.stringify(entry)}\n`);
100
- } catch {
101
- // if the file write fails we can't really do anything useful
102
- }
103
- }
104
- }
105
-
106
- // ── NullTransport ────────────────────────────────────────────────────────────
107
- // For tests — captures entries instead of printing them.
108
-
109
- export class NullTransport implements LogTransport {
110
- readonly entries: LogEntry[] = [];
111
- write(entry: LogEntry) {
112
- this.entries.push(entry);
113
- }
114
- clear() {
115
- this.entries.length = 0;
116
- }
117
- }
1
+ // packages/grimoire/src/logger/transports.ts
2
+
3
+ import { appendFileSync } from "node:fs";
4
+ import type { LogEntry, LogTransport } from "./types.ts";
5
+
6
+ // ── colours (only applied when stdout is a TTY) ──────────────────────────────
7
+
8
+ const isTTY = process.stdout.isTTY;
9
+ const c = isTTY
10
+ ? {
11
+ reset: "\x1b[0m",
12
+ dim: "\x1b[2m",
13
+ bold: "\x1b[1m",
14
+ debug: "\x1b[90m", // grey
15
+ info: "\x1b[36m", // cyan
16
+ warn: "\x1b[33m", // yellow
17
+ error: "\x1b[31m", // red
18
+ fatal: "\x1b[35m", // magenta
19
+ scope: "\x1b[34m", // blue
20
+ req: "\x1b[32m", // green
21
+ }
22
+ : (Object.fromEntries(
23
+ [
24
+ "reset",
25
+ "dim",
26
+ "bold",
27
+ "debug",
28
+ "info",
29
+ "warn",
30
+ "error",
31
+ "fatal",
32
+ "scope",
33
+ "req",
34
+ ].map((k) => [k, ""]),
35
+ ) as Record<string, string>);
36
+
37
+ const LEVEL_LABEL: Record<string, string> = {
38
+ debug: "DBG",
39
+ info: "INF",
40
+ warn: "WRN",
41
+ error: "ERR",
42
+ fatal: "FTL",
43
+ };
44
+
45
+ function ts(timestamp: number): string {
46
+ return new Date(timestamp).toISOString().slice(11, 23); // HH:mm:ss.ms
47
+ }
48
+
49
+ function formatData(data: unknown): string {
50
+ if (data === undefined) return "";
51
+ if (data instanceof Error) return `\n ${data.stack ?? data.message}`;
52
+ if (typeof data !== "object" || data === null) return ` ${String(data)}`;
53
+
54
+ // flat key=value for simple objects, JSON block only for nested/complex
55
+ const entries = Object.entries(data as Record<string, unknown>);
56
+ const isFlat = entries.every(([, v]) => typeof v !== "object" || v === null);
57
+ if (isFlat) {
58
+ return ` ${entries.map(([k, v]) => `${colors.dim(`${k}=`)}${v}`).join(" ")}`;
59
+ }
60
+ // nested — indent but don't pretty-print the whole thing
61
+ return `\n ${JSON.stringify(data).replace(/,/g, ", ")}`;
62
+ }
63
+
64
+ // ── ConsoleTransport ─────────────────────────────────────────────────────────
65
+
66
+ export class ConsoleTransport implements LogTransport {
67
+ write(entry: LogEntry) {
68
+ const levelColor = c[entry.level] ?? c.info;
69
+ const label = LEVEL_LABEL[entry.level] ?? entry.level.toUpperCase();
70
+
71
+ const worker = entry.worker ? `${c.dim}[${entry.worker}]${c.reset} ` : "";
72
+ const requestId = entry.requestId
73
+ ? `${c.req}#${entry.requestId.slice(0, 8)}${c.reset} `
74
+ : "";
75
+ const scope = `${c.scope}${entry.scope}${c.reset}`;
76
+ const time = `${c.dim}${ts(entry.timestamp)}${c.reset}`;
77
+ const lvl = `${levelColor}${c.bold}${label}${c.reset}`;
78
+ const msg = entry.message;
79
+ const data = formatData(entry.data);
80
+
81
+ const line = `${time} ${lvl} ${worker}${requestId}${scope} ${msg}${data}`;
82
+
83
+ if (entry.level === "error" || entry.level === "fatal") {
84
+ process.stderr.write(`${line}\n`);
85
+ } else {
86
+ process.stdout.write(`${line}\n`);
87
+ }
88
+ }
89
+ }
90
+
91
+ // ── FileTransport ────────────────────────────────────────────────────────────
92
+ // Writes newline-delimited JSON for ingestion by log collectors.
93
+
94
+ export class FileTransport implements LogTransport {
95
+ constructor(private path: string) {}
96
+
97
+ write(entry: LogEntry) {
98
+ try {
99
+ appendFileSync(this.path, `${JSON.stringify(entry)}\n`);
100
+ } catch {
101
+ // if the file write fails we can't really do anything useful
102
+ }
103
+ }
104
+ }
105
+
106
+ // ── NullTransport ────────────────────────────────────────────────────────────
107
+ // For tests — captures entries instead of printing them.
108
+
109
+ export class NullTransport implements LogTransport {
110
+ readonly entries: LogEntry[] = [];
111
+ write(entry: LogEntry) {
112
+ this.entries.push(entry);
113
+ }
114
+ clear() {
115
+ this.entries.length = 0;
116
+ }
117
+ }
@@ -1,39 +1,39 @@
1
- export type LogLevel = "debug" | "info" | "warn" | "error" | "fatal";
2
-
3
- export const LOG_LEVELS: Record<LogLevel, number> = {
4
- debug: 0,
5
- info: 1,
6
- warn: 2,
7
- error: 3,
8
- fatal: 4,
9
- };
10
-
11
- export interface LogEntry {
12
- level: LogLevel;
13
- scope: string;
14
- message: string;
15
- data?: unknown;
16
- timestamp: number;
17
- worker?: string; // injected by loom, e.g. "violet"
18
- requestId?: string; // injected per-request by middleware
19
- }
20
-
21
- export interface LogTransport {
22
- write(entry: LogEntry): void | Promise<void>;
23
- }
24
-
25
- export interface ScopedLogger {
26
- debug(message: string, ...args: unknown[]): void;
27
- info(message: string, ...args: unknown[]): void;
28
- warn(message: string, ...args: unknown[]): void;
29
- error(message: string, ...args: unknown[]): void;
30
- fatal(message: string, ...args: unknown[]): void;
31
- scope(name: string): ScopedLogger;
32
- withRequest(requestId: string): ScopedLogger;
33
- }
34
-
35
- export interface LoggerOptions {
36
- transports?: LogTransport[];
37
- level?: LogLevel;
38
- filter?: (entry: LogEntry) => boolean;
39
- }
1
+ export type LogLevel = "debug" | "info" | "warn" | "error" | "fatal";
2
+
3
+ export const LOG_LEVELS: Record<LogLevel, number> = {
4
+ debug: 0,
5
+ info: 1,
6
+ warn: 2,
7
+ error: 3,
8
+ fatal: 4,
9
+ };
10
+
11
+ export interface LogEntry {
12
+ level: LogLevel;
13
+ scope: string;
14
+ message: string;
15
+ data?: unknown;
16
+ timestamp: number;
17
+ worker?: string; // injected by loom, e.g. "violet"
18
+ requestId?: string; // injected per-request by middleware
19
+ }
20
+
21
+ export interface LogTransport {
22
+ write(entry: LogEntry): void | Promise<void>;
23
+ }
24
+
25
+ export interface ScopedLogger {
26
+ debug(message: string, ...args: unknown[]): void;
27
+ info(message: string, ...args: unknown[]): void;
28
+ warn(message: string, ...args: unknown[]): void;
29
+ error(message: string, ...args: unknown[]): void;
30
+ fatal(message: string, ...args: unknown[]): void;
31
+ scope(name: string): ScopedLogger;
32
+ withRequest(requestId: string): ScopedLogger;
33
+ }
34
+
35
+ export interface LoggerOptions {
36
+ transports?: LogTransport[];
37
+ level?: LogLevel;
38
+ filter?: (entry: LogEntry) => boolean;
39
+ }