@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.
- package/CHANGELOG.md +57 -0
- package/LICENSE.md +143 -931
- package/dist/error.d.ts +95 -96
- package/dist/index.browser.d.ts +557 -47
- package/dist/index.browser.js +2 -2
- package/dist/index.server.d.ts +722 -65
- package/dist/index.server.js +27 -410
- package/dist/middleware/elysia.d.ts +65 -63
- package/dist/middleware/elysia.js +2 -2
- package/dist/middleware/express.d.ts +73 -71
- package/dist/middleware/express.js +1 -1
- package/dist/middleware/fastify.d.ts +69 -67
- package/dist/middleware/fastify.js +2 -2
- package/dist/middleware/hono.d.ts +74 -72
- package/dist/middleware/next/handler.d.ts +101 -34
- package/dist/middleware/sveltekit.d.ts +100 -98
- package/dist/object-tree.d.ts +67 -70
- package/dist/packem_shared/{AbstractJsonReporter-DlugSJpY.js → AbstractJsonReporter-BO8Calb4.js} +1 -5
- package/dist/packem_shared/{AbstractJsonReporter-CjtVgHbU.js → AbstractJsonReporter-nOj0Ft1F.js} +1 -5
- package/dist/packem_shared/{JsonReporter-Dbw82ewj.js → JsonReporter-CCmj7oYL.js} +1 -1
- package/dist/packem_shared/{JsonReporter-BgPvIyC2.js → JsonReporter-Ck2PIAEw.js} +2 -2
- package/dist/packem_shared/{PrettyReporter-C2dCzIaf.js → PrettyReporter-CIbrmjUV.js} +2 -4
- package/dist/packem_shared/{PrettyReporter-gMqa7j_m.js → PrettyReporter-CNJEO9g7.js} +1250 -15
- package/dist/packem_shared/abstract-json-reporter.d-BAgznjyU.d.ts +61 -0
- package/dist/packem_shared/{abstract-pretty-reporter-szQO-IgK.js → abstract-pretty-reporter-CkqCt5hg.js} +2300 -2298
- package/dist/packem_shared/create-middleware-logger.d-DheMh8q4.d.ts +47 -0
- package/dist/packem_shared/{index-Bx3-C0j9.js → index-6cG1Kp0t.js} +2 -2
- package/dist/packem_shared/types.d-BeLumqgD.d.ts +246 -0
- package/dist/packem_shared/types.d-C51XNfQz.d.ts +194 -0
- package/dist/packem_shared/types.d-CM5ie2qm.d.ts +236 -0
- package/dist/packem_shared/wide-event.d-B-t8ZnhI.d.ts +704 -0
- package/dist/packem_shared/{write-stream-BuFtjATz.js → write-stream-MDqyXmc_.js} +1 -1
- package/dist/processor/caller/caller-processor.d.ts +49 -47
- package/dist/processor/caller/caller-processor.js +1 -1
- package/dist/processor/environment-processor.d.ts +113 -113
- package/dist/processor/message-formatter-processor.d.ts +51 -49
- package/dist/processor/message-formatter-processor.js +2 -2
- package/dist/processor/opentelemetry-processor.d.ts +69 -66
- package/dist/processor/redact-processor.d.ts +60 -41
- package/dist/processor/sampling-processor.d.ts +102 -101
- package/dist/reporter/file/json-file-reporter.d.ts +91 -42
- package/dist/reporter/file/json-file-reporter.js +1 -1
- package/dist/reporter/http/abstract-http-reporter.d.ts +213 -211
- package/dist/reporter/http/abstract-http-reporter.js +1 -1
- package/dist/reporter/http/http-reporter.d.ts +40 -36
- package/dist/reporter/http/http-reporter.edge-light.d.ts +430 -38
- package/dist/reporter/http/http-reporter.edge-light.js +1 -5
- package/dist/reporter/json/index.browser.d.ts +99 -3
- package/dist/reporter/json/index.browser.js +2 -2
- package/dist/reporter/json/index.d.ts +51 -3
- package/dist/reporter/json/index.js +2 -2
- package/dist/reporter/pretty/index.browser.d.ts +106 -2
- package/dist/reporter/pretty/index.browser.js +1 -1
- package/dist/reporter/pretty/index.d.ts +219 -2
- package/dist/reporter/pretty/index.js +1 -1
- package/dist/reporter/simple/simple-reporter.server.d.ts +168 -18
- package/dist/reporter/simple/simple-reporter.server.js +3 -2
- package/dist/wide-event.d.ts +5 -300
- package/dist/wide-event.js +3 -2
- package/package.json +9 -21
- package/dist/constants.d.ts +0 -37
- package/dist/interactive/index.d.ts +0 -2
- package/dist/interactive/index.js +0 -2
- package/dist/interactive/interactive-manager.d.ts +0 -108
- package/dist/interactive/interactive-stream-hook.d.ts +0 -68
- package/dist/middleware/next/middleware.d.ts +0 -59
- package/dist/middleware/next/storage.d.ts +0 -14
- package/dist/middleware/shared/create-middleware-logger.d.ts +0 -82
- package/dist/middleware/shared/headers.d.ts +0 -14
- package/dist/middleware/shared/routes.d.ts +0 -30
- package/dist/middleware/shared/storage.d.ts +0 -29
- package/dist/packem_shared/InteractiveManager-CowYA3Hx.js +0 -178
- package/dist/packem_shared/InteractiveStreamHook-BypRlYTX.js +0 -133
- package/dist/packem_shared/Spinner-Cokext9b.js +0 -2183
- package/dist/packem_shared/getBarChar-D7JfmdTr.js +0 -459
- package/dist/packem_shared/index-BEfVUy9P.js +0 -1256
- package/dist/pail.browser.d.ts +0 -412
- package/dist/pail.server.d.ts +0 -233
- package/dist/processor/caller/get-caller-filename.d.ts +0 -23
- package/dist/progress-bar.d.ts +0 -145
- package/dist/progress-bar.js +0 -459
- package/dist/reporter/file/utils/rotating-file-stream.d.ts +0 -48
- package/dist/reporter/http/utils/compression.d.ts +0 -7
- package/dist/reporter/http/utils/log-size-error.d.ts +0 -30
- package/dist/reporter/http/utils/retry.d.ts +0 -27
- package/dist/reporter/json/abstract-json-reporter.d.ts +0 -61
- package/dist/reporter/json/json-reporter.browser.d.ts +0 -40
- package/dist/reporter/json/json-reporter.server.d.ts +0 -50
- package/dist/reporter/pretty/abstract-pretty-reporter.d.ts +0 -83
- package/dist/reporter/pretty/pretty-reporter.browser.d.ts +0 -36
- package/dist/reporter/pretty/pretty-reporter.server.d.ts +0 -70
- package/dist/reporter/raw/raw-reporter.browser.d.ts +0 -5
- package/dist/reporter/raw/raw-reporter.server.d.ts +0 -13
- package/dist/reporter/utils/default-inspector-config.d.ts +0 -3
- package/dist/reporter/utils/format-label.d.ts +0 -3
- package/dist/spinner.d.ts +0 -220
- package/dist/spinner.js +0 -2183
- package/dist/types.d.ts +0 -241
- package/dist/utils/ansi-escapes.d.ts +0 -4
- package/dist/utils/arrayify.d.ts +0 -2
- package/dist/utils/get-longest-badge.d.ts +0 -4
- package/dist/utils/get-longest-label.d.ts +0 -4
- package/dist/utils/merge-types.d.ts +0 -4
- package/dist/utils/stream/safe-stream-handler.d.ts +0 -21
- package/dist/utils/write-console-log-based-on-level.d.ts +0 -4
- package/dist/utils/write-stream.d.ts +0 -2
|
@@ -1,123 +1,125 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
[key: string]: unknown;
|
|
21
|
+
locals: Record<string, unknown> & {
|
|
22
|
+
log?: WideEvent;
|
|
23
|
+
};
|
|
24
|
+
request: Request;
|
|
25
|
+
url: URL;
|
|
22
26
|
}
|
|
23
27
|
/**
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
* Options passed to SvelteKit's resolve function.
|
|
29
|
+
*/
|
|
26
30
|
interface PailSvelteKitResolveOptions {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
37
|
-
|
|
40
|
+
* SvelteKit resolve function type.
|
|
41
|
+
*/
|
|
38
42
|
type PailSvelteKitResolve = (event: PailSvelteKitEvent, options?: PailSvelteKitResolveOptions) => Promise<Response>;
|
|
39
43
|
/**
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
* Input for the SvelteKit handle hook.
|
|
45
|
+
*/
|
|
42
46
|
interface PailSvelteKitHandleInput {
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
event: PailSvelteKitEvent;
|
|
48
|
+
resolve: PailSvelteKitResolve;
|
|
45
49
|
}
|
|
46
50
|
/**
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
* SvelteKit handle hook function type returned by `pailHandle()`.
|
|
52
|
+
*/
|
|
49
53
|
type PailSvelteKitHandle = (input: PailSvelteKitHandleInput) => Promise<Response>;
|
|
50
54
|
/**
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
* Input for the SvelteKit handleError hook.
|
|
56
|
+
*/
|
|
53
57
|
interface PailSvelteKitHandleErrorInput {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
+
error: unknown;
|
|
59
|
+
event: PailSvelteKitEvent;
|
|
60
|
+
message: string;
|
|
61
|
+
status: number;
|
|
58
62
|
}
|
|
59
63
|
/**
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
* SvelteKit handleError hook function type returned by `pailHandleError()`.
|
|
65
|
+
*/
|
|
62
66
|
type PailSvelteKitHandleError = (input: PailSvelteKitHandleErrorInput) => void;
|
|
63
67
|
/**
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
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 };
|
package/dist/object-tree.d.ts
CHANGED
|
@@ -1,75 +1,72 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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 };
|
package/dist/packem_shared/{AbstractJsonReporter-DlugSJpY.js → AbstractJsonReporter-BO8Calb4.js}
RENAMED
|
@@ -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
|
-
|
|
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
|
}
|
package/dist/packem_shared/{AbstractJsonReporter-CjtVgHbU.js → AbstractJsonReporter-nOj0Ft1F.js}
RENAMED
|
@@ -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
|
-
|
|
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-
|
|
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-
|
|
12
|
-
import { AbstractJsonReporter } from './AbstractJsonReporter-
|
|
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-
|
|
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 {
|