@visulima/pail 4.0.0-alpha.10 → 4.0.0-alpha.12

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 (106) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/LICENSE.md +143 -931
  3. package/dist/error.d.ts +95 -96
  4. package/dist/index.browser.d.ts +557 -47
  5. package/dist/index.browser.js +2 -2
  6. package/dist/index.server.d.ts +722 -65
  7. package/dist/index.server.js +27 -410
  8. package/dist/middleware/elysia.d.ts +65 -63
  9. package/dist/middleware/elysia.js +2 -2
  10. package/dist/middleware/express.d.ts +73 -71
  11. package/dist/middleware/express.js +1 -1
  12. package/dist/middleware/fastify.d.ts +69 -67
  13. package/dist/middleware/fastify.js +2 -2
  14. package/dist/middleware/hono.d.ts +74 -72
  15. package/dist/middleware/next/handler.d.ts +101 -34
  16. package/dist/middleware/sveltekit.d.ts +100 -98
  17. package/dist/object-tree.d.ts +67 -70
  18. package/dist/packem_shared/{AbstractJsonReporter-DlugSJpY.js → AbstractJsonReporter-BO8Calb4.js} +1 -5
  19. package/dist/packem_shared/{AbstractJsonReporter-CjtVgHbU.js → AbstractJsonReporter-nOj0Ft1F.js} +1 -5
  20. package/dist/packem_shared/{JsonReporter-Dbw82ewj.js → JsonReporter-CCmj7oYL.js} +1 -1
  21. package/dist/packem_shared/{JsonReporter-BgPvIyC2.js → JsonReporter-Ck2PIAEw.js} +2 -2
  22. package/dist/packem_shared/{PrettyReporter-C2dCzIaf.js → PrettyReporter-CIbrmjUV.js} +2 -4
  23. package/dist/packem_shared/{PrettyReporter-gMqa7j_m.js → PrettyReporter-CNJEO9g7.js} +1250 -15
  24. package/dist/packem_shared/abstract-json-reporter.d-BAgznjyU.d.ts +61 -0
  25. package/dist/packem_shared/{abstract-pretty-reporter-szQO-IgK.js → abstract-pretty-reporter-CkqCt5hg.js} +2300 -2298
  26. package/dist/packem_shared/create-middleware-logger.d-DheMh8q4.d.ts +47 -0
  27. package/dist/packem_shared/{index-Bx3-C0j9.js → index-6cG1Kp0t.js} +2 -2
  28. package/dist/packem_shared/types.d-BeLumqgD.d.ts +246 -0
  29. package/dist/packem_shared/types.d-C51XNfQz.d.ts +194 -0
  30. package/dist/packem_shared/types.d-CM5ie2qm.d.ts +236 -0
  31. package/dist/packem_shared/wide-event.d-B-t8ZnhI.d.ts +704 -0
  32. package/dist/packem_shared/{write-stream-BuFtjATz.js → write-stream-MDqyXmc_.js} +1 -1
  33. package/dist/processor/caller/caller-processor.d.ts +49 -47
  34. package/dist/processor/caller/caller-processor.js +1 -1
  35. package/dist/processor/environment-processor.d.ts +113 -113
  36. package/dist/processor/message-formatter-processor.d.ts +51 -49
  37. package/dist/processor/message-formatter-processor.js +2 -2
  38. package/dist/processor/opentelemetry-processor.d.ts +69 -66
  39. package/dist/processor/redact-processor.d.ts +60 -41
  40. package/dist/processor/sampling-processor.d.ts +102 -101
  41. package/dist/reporter/file/json-file-reporter.d.ts +91 -42
  42. package/dist/reporter/file/json-file-reporter.js +1 -1
  43. package/dist/reporter/http/abstract-http-reporter.d.ts +213 -211
  44. package/dist/reporter/http/abstract-http-reporter.js +1 -1
  45. package/dist/reporter/http/http-reporter.d.ts +40 -36
  46. package/dist/reporter/http/http-reporter.edge-light.d.ts +430 -38
  47. package/dist/reporter/http/http-reporter.edge-light.js +1 -5
  48. package/dist/reporter/json/index.browser.d.ts +99 -3
  49. package/dist/reporter/json/index.browser.js +2 -2
  50. package/dist/reporter/json/index.d.ts +51 -3
  51. package/dist/reporter/json/index.js +2 -2
  52. package/dist/reporter/pretty/index.browser.d.ts +106 -2
  53. package/dist/reporter/pretty/index.browser.js +1 -1
  54. package/dist/reporter/pretty/index.d.ts +219 -2
  55. package/dist/reporter/pretty/index.js +1 -1
  56. package/dist/reporter/simple/simple-reporter.server.d.ts +168 -18
  57. package/dist/reporter/simple/simple-reporter.server.js +3 -2
  58. package/dist/wide-event.d.ts +5 -300
  59. package/dist/wide-event.js +3 -2
  60. package/package.json +9 -21
  61. package/dist/constants.d.ts +0 -37
  62. package/dist/interactive/index.d.ts +0 -2
  63. package/dist/interactive/index.js +0 -2
  64. package/dist/interactive/interactive-manager.d.ts +0 -108
  65. package/dist/interactive/interactive-stream-hook.d.ts +0 -68
  66. package/dist/middleware/next/middleware.d.ts +0 -59
  67. package/dist/middleware/next/storage.d.ts +0 -14
  68. package/dist/middleware/shared/create-middleware-logger.d.ts +0 -82
  69. package/dist/middleware/shared/headers.d.ts +0 -14
  70. package/dist/middleware/shared/routes.d.ts +0 -30
  71. package/dist/middleware/shared/storage.d.ts +0 -29
  72. package/dist/packem_shared/InteractiveManager-CowYA3Hx.js +0 -178
  73. package/dist/packem_shared/InteractiveStreamHook-BypRlYTX.js +0 -133
  74. package/dist/packem_shared/Spinner-Cokext9b.js +0 -2183
  75. package/dist/packem_shared/getBarChar-D7JfmdTr.js +0 -459
  76. package/dist/packem_shared/index-BEfVUy9P.js +0 -1256
  77. package/dist/pail.browser.d.ts +0 -412
  78. package/dist/pail.server.d.ts +0 -233
  79. package/dist/processor/caller/get-caller-filename.d.ts +0 -23
  80. package/dist/progress-bar.d.ts +0 -145
  81. package/dist/progress-bar.js +0 -459
  82. package/dist/reporter/file/utils/rotating-file-stream.d.ts +0 -48
  83. package/dist/reporter/http/utils/compression.d.ts +0 -7
  84. package/dist/reporter/http/utils/log-size-error.d.ts +0 -30
  85. package/dist/reporter/http/utils/retry.d.ts +0 -27
  86. package/dist/reporter/json/abstract-json-reporter.d.ts +0 -61
  87. package/dist/reporter/json/json-reporter.browser.d.ts +0 -40
  88. package/dist/reporter/json/json-reporter.server.d.ts +0 -50
  89. package/dist/reporter/pretty/abstract-pretty-reporter.d.ts +0 -83
  90. package/dist/reporter/pretty/pretty-reporter.browser.d.ts +0 -36
  91. package/dist/reporter/pretty/pretty-reporter.server.d.ts +0 -70
  92. package/dist/reporter/raw/raw-reporter.browser.d.ts +0 -5
  93. package/dist/reporter/raw/raw-reporter.server.d.ts +0 -13
  94. package/dist/reporter/utils/default-inspector-config.d.ts +0 -3
  95. package/dist/reporter/utils/format-label.d.ts +0 -3
  96. package/dist/spinner.d.ts +0 -220
  97. package/dist/spinner.js +0 -2183
  98. package/dist/types.d.ts +0 -241
  99. package/dist/utils/ansi-escapes.d.ts +0 -4
  100. package/dist/utils/arrayify.d.ts +0 -2
  101. package/dist/utils/get-longest-badge.d.ts +0 -4
  102. package/dist/utils/get-longest-label.d.ts +0 -4
  103. package/dist/utils/merge-types.d.ts +0 -4
  104. package/dist/utils/stream/safe-stream-handler.d.ts +0 -21
  105. package/dist/utils/write-console-log-based-on-level.d.ts +0 -4
  106. package/dist/utils/write-stream.d.ts +0 -2
@@ -1,123 +1,125 @@
1
- import type { WideEvent } from "../wide-event.d.ts";
2
- import type { PailMiddlewareOptions } from "./shared/create-middleware-logger.d.ts";
1
+ import { W as WideEvent } from "../packem_shared/wide-event.d-B-t8ZnhI.js";
2
+ import { P as PailMiddlewareOptions } from "../packem_shared/create-middleware-logger.d-DheMh8q4.js";
3
+ import 'safe-stable-stringify';
4
+ import "../packem_shared/types.d-BeLumqgD.js";
5
+ import '@visulima/colorize';
6
+ import '@visulima/interactive-manager';
3
7
  /**
4
- * A SvelteKit-like event object with access to the pail logger via `locals.log`.
5
- * @example
6
- * ```typescript
7
- * // In a SvelteKit load function or action:
8
- * import type { PailSvelteKitEvent } from "@visulima/pail/middleware/sveltekit";
9
- *
10
- * export const load = async (event: PailSvelteKitEvent) => {
11
- * event.locals.log?.set({ user: { id: 1 } });
12
- * };
13
- * ```
14
- */
8
+ * A SvelteKit-like event object with access to the pail logger via `locals.log`.
9
+ * @example
10
+ * ```typescript
11
+ * // In a SvelteKit load function or action:
12
+ * import type { PailSvelteKitEvent } from "@visulima/pail/middleware/sveltekit";
13
+ *
14
+ * export const load = async (event: PailSvelteKitEvent) => {
15
+ * event.locals.log?.set({ user: { id: 1 } });
16
+ * };
17
+ * ```
18
+ */
15
19
  interface PailSvelteKitEvent {
16
- [key: string]: unknown;
17
- locals: Record<string, unknown> & {
18
- log?: WideEvent;
19
- };
20
- request: Request;
21
- url: URL;
20
+ [key: string]: unknown;
21
+ locals: Record<string, unknown> & {
22
+ log?: WideEvent;
23
+ };
24
+ request: Request;
25
+ url: URL;
22
26
  }
23
27
  /**
24
- * Options passed to SvelteKit's resolve function.
25
- */
28
+ * Options passed to SvelteKit's resolve function.
29
+ */
26
30
  interface PailSvelteKitResolveOptions {
27
- filterSerializedResponseHeaders?: (name: string) => boolean;
28
- preload?: (input: {
29
- type: string;
30
- }) => boolean;
31
- transformPageChunk?: (input: {
32
- html: string;
33
- }) => string;
31
+ filterSerializedResponseHeaders?: (name: string) => boolean;
32
+ preload?: (input: {
33
+ type: string;
34
+ }) => boolean;
35
+ transformPageChunk?: (input: {
36
+ html: string;
37
+ }) => string;
34
38
  }
35
39
  /**
36
- * SvelteKit resolve function type.
37
- */
40
+ * SvelteKit resolve function type.
41
+ */
38
42
  type PailSvelteKitResolve = (event: PailSvelteKitEvent, options?: PailSvelteKitResolveOptions) => Promise<Response>;
39
43
  /**
40
- * Input for the SvelteKit handle hook.
41
- */
44
+ * Input for the SvelteKit handle hook.
45
+ */
42
46
  interface PailSvelteKitHandleInput {
43
- event: PailSvelteKitEvent;
44
- resolve: PailSvelteKitResolve;
47
+ event: PailSvelteKitEvent;
48
+ resolve: PailSvelteKitResolve;
45
49
  }
46
50
  /**
47
- * SvelteKit handle hook function type returned by `pailHandle()`.
48
- */
51
+ * SvelteKit handle hook function type returned by `pailHandle()`.
52
+ */
49
53
  type PailSvelteKitHandle = (input: PailSvelteKitHandleInput) => Promise<Response>;
50
54
  /**
51
- * Input for the SvelteKit handleError hook.
52
- */
55
+ * Input for the SvelteKit handleError hook.
56
+ */
53
57
  interface PailSvelteKitHandleErrorInput {
54
- error: unknown;
55
- event: PailSvelteKitEvent;
56
- message: string;
57
- status: number;
58
+ error: unknown;
59
+ event: PailSvelteKitEvent;
60
+ message: string;
61
+ status: number;
58
62
  }
59
63
  /**
60
- * SvelteKit handleError hook function type returned by `pailHandleError()`.
61
- */
64
+ * SvelteKit handleError hook function type returned by `pailHandleError()`.
65
+ */
62
66
  type PailSvelteKitHandleError = (input: PailSvelteKitHandleErrorInput) => void;
63
67
  /**
64
- * Retrieve the request-scoped WideEvent logger from AsyncLocalStorage.
65
- * Must be called within a request handled by the pail SvelteKit handle hook.
66
- * @returns The request-scoped WideEvent logger
67
- * @throws Error if called outside of the hook context
68
- */
68
+ * Retrieve the request-scoped WideEvent logger from AsyncLocalStorage.
69
+ * Must be called within a request handled by the pail SvelteKit handle hook.
70
+ * @returns The request-scoped WideEvent logger
71
+ * @throws Error if called outside of the hook context
72
+ */
69
73
  declare const useLogger: () => WideEvent;
70
74
  type SvelteKitHandleOptions<T extends string = string> = PailMiddlewareOptions<T>;
71
75
  /**
72
- * Create a SvelteKit `handle` hook that attaches a WideEvent logger to each request.
73
- *
74
- * The logger is available via:
75
- * - `event.locals.log` in server load functions and actions
76
- * - `useLogger()` from anywhere in the async call stack
77
- *
78
- * The wide event is automatically emitted when the response is sent or an error occurs.
79
- * @param options Hook configuration
80
- * @returns SvelteKit handle hook function
81
- * @example
82
- * ```typescript
83
- * // src/hooks.server.ts
84
- * import { createPail } from "@visulima/pail";
85
- * import { pailHandle, pailHandleError } from "@visulima/pail/middleware/sveltekit";
86
- *
87
- * const logger = createPail();
88
- *
89
- * export const handle = pailHandle({ pail: logger });
90
- * export const handleError = pailHandleError();
91
- * ```
92
- */
93
- export declare const pailHandle: <T extends string = string>(options: SvelteKitHandleOptions<T>) => PailSvelteKitHandle;
76
+ * Create a SvelteKit `handle` hook that attaches a WideEvent logger to each request.
77
+ *
78
+ * The logger is available via:
79
+ * - `event.locals.log` in server load functions and actions
80
+ * - `useLogger()` from anywhere in the async call stack
81
+ *
82
+ * The wide event is automatically emitted when the response is sent or an error occurs.
83
+ * @param options Hook configuration
84
+ * @returns SvelteKit handle hook function
85
+ * @example
86
+ * ```typescript
87
+ * // src/hooks.server.ts
88
+ * import { createPail } from "@visulima/pail";
89
+ * import { pailHandle, pailHandleError } from "@visulima/pail/middleware/sveltekit";
90
+ *
91
+ * const logger = createPail();
92
+ *
93
+ * export const handle = pailHandle({ pail: logger });
94
+ * export const handleError = pailHandleError();
95
+ * ```
96
+ */
97
+ declare const pailHandle: <T extends string = string>(options: SvelteKitHandleOptions<T>) => PailSvelteKitHandle;
94
98
  /**
95
- * Create a SvelteKit `handleError` hook that captures errors into the WideEvent logger.
96
- *
97
- * Should be used alongside `pailHandle` to ensure errors are recorded in the wide event.
98
- * @returns SvelteKit handleError hook function
99
- */
100
- export declare const pailHandleError: () => PailSvelteKitHandleError;
99
+ * Create a SvelteKit `handleError` hook that captures errors into the WideEvent logger.
100
+ *
101
+ * Should be used alongside `pailHandle` to ensure errors are recorded in the wide event.
102
+ * @returns SvelteKit handleError hook function
103
+ */
104
+ declare const pailHandleError: () => PailSvelteKitHandleError;
101
105
  /**
102
- * Convenience function that returns both handle and handleError hooks.
103
- * @param options Hook configuration
104
- * @returns Object with `handle` and `handleError` hooks
105
- * @example
106
- * ```typescript
107
- * // src/hooks.server.ts
108
- * import { createPail } from "@visulima/pail";
109
- * import { createPailHooks } from "@visulima/pail/middleware/sveltekit";
110
- *
111
- * const logger = createPail();
112
- * const { handle, handleError } = createPailHooks({ pail: logger });
113
- *
114
- * export { handle, handleError };
115
- * ```
116
- */
117
- export declare const createPailHooks: <T extends string = string>(options: SvelteKitHandleOptions<T>) => {
118
- handle: PailSvelteKitHandle;
119
- handleError: PailSvelteKitHandleError;
106
+ * Convenience function that returns both handle and handleError hooks.
107
+ * @param options Hook configuration
108
+ * @returns Object with `handle` and `handleError` hooks
109
+ * @example
110
+ * ```typescript
111
+ * // src/hooks.server.ts
112
+ * import { createPail } from "@visulima/pail";
113
+ * import { createPailHooks } from "@visulima/pail/middleware/sveltekit";
114
+ *
115
+ * const logger = createPail();
116
+ * const { handle, handleError } = createPailHooks({ pail: logger });
117
+ *
118
+ * export { handle, handleError };
119
+ * ```
120
+ */
121
+ declare const createPailHooks: <T extends string = string>(options: SvelteKitHandleOptions<T>) => {
122
+ handle: PailSvelteKitHandle;
123
+ handleError: PailSvelteKitHandleError;
120
124
  };
121
- export { useLogger };
122
- export type { PailSvelteKitEvent, PailSvelteKitHandle, PailSvelteKitHandleError, PailSvelteKitHandleErrorInput, PailSvelteKitHandleInput, PailSvelteKitResolve, PailSvelteKitResolveOptions, SvelteKitHandleOptions, };
123
- export type { WideEvent } from "../wide-event.d.ts";
125
+ export { type PailSvelteKitEvent, type PailSvelteKitHandle, type PailSvelteKitHandleError, type PailSvelteKitHandleErrorInput, type PailSvelteKitHandleInput, type PailSvelteKitResolve, type PailSvelteKitResolveOptions, type SvelteKitHandleOptions, type WideEvent, createPailHooks, pailHandle, pailHandleError, useLogger };
@@ -1,75 +1,72 @@
1
1
  /**
2
- * Function to render a node value for display
3
- * @param node The node to render
4
- * @returns A string representation or undefined if should not render
5
- */
6
- export type TreeRenderFunction = (node: unknown) => string | undefined;
2
+ * Function to render a node value for display
3
+ * @param node The node to render
4
+ * @returns A string representation or undefined if should not render
5
+ */
6
+ type TreeRenderFunction = (node: unknown) => string | undefined;
7
7
  /**
8
- * Function to sort keys during tree traversal
9
- * @param a First key for comparison
10
- * @param b Second key for comparison
11
- * @returns Negative if a < b, positive if a > b, 0 if equal
12
- */
13
- export type TreeSortFunction = (a: string, b: string) => number;
8
+ * Function to sort keys during tree traversal
9
+ * @param a First key for comparison
10
+ * @param b Second key for comparison
11
+ * @returns Negative if a < b, positive if a > b, 0 if equal
12
+ */
13
+ type TreeSortFunction = (a: string, b: string) => number;
14
14
  /**
15
- * Configuration options for object tree rendering
16
- */
17
- export interface ObjectTreeOptions {
18
- /** Text to display for circular references (default: " (circular ref.)") */
19
- breakCircularWith?: string | null;
20
- /** Whether to return as single string or array of lines (default: true) */
21
- joined?: boolean;
22
- /** Connector for neighbor keys (default: "├─ ") */
23
- keyNeighbour?: string;
24
- /** Connector for non-neighbor keys (default: "└─ ") */
25
- keyNoNeighbour?: string;
26
- /** Function to render node values (default: renders primitives) */
27
- renderFn?: TreeRenderFunction;
28
- /** Separator between key and value (default: ": ") */
29
- separator?: string;
30
- /** Function to sort object keys (default: natural order) */
31
- sortFn?: TreeSortFunction;
32
- /** Spacer for neighbor branches (default: "│ ") */
33
- spacerNeighbour?: string;
34
- /** Spacer for non-neighbor branches (default: " ") */
35
- spacerNoNeighbour?: string;
15
+ * Configuration options for object tree rendering
16
+ */
17
+ interface ObjectTreeOptions {
18
+ /** Text to display for circular references (default: " (circular ref.)") */
19
+ breakCircularWith?: string | null;
20
+ /** Whether to return as single string or array of lines (default: true) */
21
+ joined?: boolean;
22
+ /** Connector for neighbor keys (default: "├─ ") */
23
+ keyNeighbour?: string;
24
+ /** Connector for non-neighbor keys (default: "└─ ") */
25
+ keyNoNeighbour?: string;
26
+ /** Function to render node values (default: renders primitives) */
27
+ renderFn?: TreeRenderFunction;
28
+ /** Separator between key and value (default: ": ") */
29
+ separator?: string;
30
+ /** Function to sort object keys (default: natural order) */
31
+ sortFn?: TreeSortFunction;
32
+ /** Spacer for neighbor branches (default: "│ ") */
33
+ spacerNeighbour?: string;
34
+ /** Spacer for non-neighbor branches (default: " ") */
35
+ spacerNoNeighbour?: string;
36
36
  }
37
37
  /**
38
- * Renders an object as an ASCII tree structure.
39
- * @param tree The object to render as a tree
40
- * @param options Configuration options for tree rendering
41
- * @returns Formatted tree as string or array of lines
42
- * @example
43
- * ```typescript
44
- * const obj = {
45
- * name: "John",
46
- * age: 30,
47
- * address: {
48
- * street: "Main St",
49
- * city: "New York"
50
- * }
51
- * };
52
- *
53
- * // Default output as string
54
- * console.log(renderObjectTree(obj));
55
- *
56
- * // Custom rendering
57
- * console.log(renderObjectTree(obj, {
58
- * sortFn: (a, b) => a.localeCompare(b),
59
- * renderFn: (node) => {
60
- * if (typeof node === 'string') return node.toUpperCase();
61
- * return ['boolean', 'string', 'number'].includes(typeof node)
62
- * ? String(node)
63
- * : undefined;
64
- * }
65
- * }));
66
- *
67
- * // Get as array of lines
68
- * const lines = renderObjectTree(obj, { joined: false });
69
- * ```
70
- */
71
- export declare const renderObjectTree: (tree: Record<string, unknown> | unknown[], options?: ObjectTreeOptions) => string | string[];
72
- /**
73
- * Default export for CommonJS compatibility
74
- */
75
- export default renderObjectTree;
38
+ * Renders an object as an ASCII tree structure.
39
+ * @param tree The object to render as a tree
40
+ * @param options Configuration options for tree rendering
41
+ * @returns Formatted tree as string or array of lines
42
+ * @example
43
+ * ```typescript
44
+ * const obj = {
45
+ * name: "John",
46
+ * age: 30,
47
+ * address: {
48
+ * street: "Main St",
49
+ * city: "New York"
50
+ * }
51
+ * };
52
+ *
53
+ * // Default output as string
54
+ * console.log(renderObjectTree(obj));
55
+ *
56
+ * // Custom rendering
57
+ * console.log(renderObjectTree(obj, {
58
+ * sortFn: (a, b) => a.localeCompare(b),
59
+ * renderFn: (node) => {
60
+ * if (typeof node === 'string') return node.toUpperCase();
61
+ * return ['boolean', 'string', 'number'].includes(typeof node)
62
+ * ? String(node)
63
+ * : undefined;
64
+ * }
65
+ * }));
66
+ *
67
+ * // Get as array of lines
68
+ * const lines = renderObjectTree(obj, { joined: false });
69
+ * ```
70
+ */
71
+ declare const renderObjectTree: (tree: Record<string, unknown> | unknown[], options?: ObjectTreeOptions) => string | string[];
72
+ export { ObjectTreeOptions, TreeRenderFunction, TreeSortFunction, renderObjectTree as default, renderObjectTree };
@@ -258,11 +258,7 @@ class AbstractJsonReporter {
258
258
  if (file) {
259
259
  rest.file = `${file.name ?? ""}:${String(file.line)}${file.column ? `:${String(file.column)}` : ""}`;
260
260
  }
261
- if (message === EMPTY_SYMBOL) {
262
- rest.message = void 0;
263
- } else {
264
- rest.message = message;
265
- }
261
+ rest.message = message === EMPTY_SYMBOL ? void 0 : message;
266
262
  if (error) {
267
263
  rest.error = serialize(error, this.errorOptions);
268
264
  }
@@ -258,11 +258,7 @@ class AbstractJsonReporter {
258
258
  if (file) {
259
259
  rest.file = `${file.name ?? ""}:${String(file.line)}${file.column ? `:${String(file.column)}` : ""}`;
260
260
  }
261
- if (message === EMPTY_SYMBOL) {
262
- rest.message = void 0;
263
- } else {
264
- rest.message = message;
265
- }
261
+ rest.message = message === EMPTY_SYMBOL ? void 0 : message;
266
262
  if (error) {
267
263
  rest.error = serialize(error, this.errorOptions);
268
264
  }
@@ -1,4 +1,4 @@
1
- import { AbstractJsonReporter } from './AbstractJsonReporter-DlugSJpY.js';
1
+ import { AbstractJsonReporter } from './AbstractJsonReporter-BO8Calb4.js';
2
2
  import { w as writeConsoleLogBasedOnLevel } from './write-console-log-based-on-level-ree2lDPw.js';
3
3
 
4
4
  class JsonReporter extends AbstractJsonReporter {
@@ -8,8 +8,8 @@ const {
8
8
  stdout,
9
9
  stderr
10
10
  } = __cjs_getProcess;
11
- import { w as writeStream } from './write-stream-BuFtjATz.js';
12
- import { AbstractJsonReporter } from './AbstractJsonReporter-CjtVgHbU.js';
11
+ import { w as writeStream } from './write-stream-MDqyXmc_.js';
12
+ import { AbstractJsonReporter } from './AbstractJsonReporter-nOj0Ft1F.js';
13
13
 
14
14
  class JsonReporter extends AbstractJsonReporter {
15
15
  /** Standard output stream */
@@ -1,5 +1,5 @@
1
1
  import colorize, { grey, white, underline, bold } from '@visulima/colorize/browser';
2
- import { f as format, g as getLongestLabel } from './index-Bx3-C0j9.js';
2
+ import { f as format, g as getLongestLabel } from './index-6cG1Kp0t.js';
3
3
  import { L as LOG_TYPES, E as EMPTY_SYMBOL } from './constants-omsTHUWB.js';
4
4
  import { w as writeConsoleLogBasedOnLevel } from './write-console-log-based-on-level-ree2lDPw.js';
5
5
 
@@ -150,9 +150,7 @@ class PrettyReporter extends AbstractPrettyReporter {
150
150
  }
151
151
  }
152
152
  if (prefix) {
153
- const cPrefix = grey(
154
- `${Array.isArray(scope) && scope.length > 0 ? ". " : " "}[${this.styles.underline.prefix ? underline(prefix) : prefix}] `
155
- );
153
+ const cPrefix = grey(`${Array.isArray(scope) && scope.length > 0 ? ". " : " "}[${this.styles.underline.prefix ? underline(prefix) : prefix}] `);
156
154
  if (isNotBrowser) {
157
155
  items.push(format(cPrefix[0], cPrefix.slice(1)));
158
156
  } else {