@likec4/log 1.50.0 → 1.52.0

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.
@@ -0,0 +1,11 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __exportAll = (all, no_symbols) => {
3
+ let target = {};
4
+ for (var name in all) __defProp(target, name, {
5
+ get: all[name],
6
+ enumerable: true
7
+ });
8
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
9
+ return target;
10
+ };
11
+ export { __exportAll as t };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,4 @@
1
- import * as _logtape_logtape0 from "@logtape/logtape";
2
- import { AnsiColorFormatterOptions, Config, ConsoleFormatter, ConsoleSinkOptions, Filter, LogLevel, LogRecord, LogRecord as LogRecord$1, Logger, Sink, Sink as Sink$1, TextFormatter, TextFormatter as TextFormatter$1, TextFormatterOptions, withFilter } from "@logtape/logtape";
1
+ import { a as withFilter, c as TextFormatter, d as LogRecord, f as LogLevel, i as Sink, l as TextFormatterOptions, n as Config, o as AnsiColorFormatterOptions, r as ConsoleSinkOptions, s as ConsoleFormatter, t as Logger, u as Filter } from "./_chunks/libs/@logtape/logtape.mjs";
3
2
 
4
3
  //#region src/formatters.d.ts
5
4
  /**
@@ -7,24 +6,24 @@ import { AnsiColorFormatterOptions, Config, ConsoleFormatter, ConsoleSinkOptions
7
6
  * @param record - Log record that may contain error in properties or rawMessage
8
7
  * @returns Merged/wrapped Error or null if none found
9
8
  */
10
- declare function errorFromLogRecord(record: LogRecord$1): Error | null;
9
+ declare function errorFromLogRecord(record: LogRecord): Error | null;
11
10
  /**
12
11
  * Formatter that outputs only the log message (no timestamp/level/category).
13
12
  * @returns TextFormatter that returns just the message string
14
13
  */
15
- declare function getMessageOnlyFormatter(): TextFormatter$1;
14
+ declare function getMessageOnlyFormatter(): TextFormatter;
16
15
  /**
17
16
  * Build a text formatter with optional custom format; appends error from record.
18
17
  * @param options - Optional format and logtape options
19
18
  * @returns TextFormatter
20
19
  */
21
- declare function getTextFormatter(options?: TextFormatterOptions): TextFormatter$1;
20
+ declare function getTextFormatter(options?: TextFormatterOptions): TextFormatter;
22
21
  /**
23
22
  * Build an ANSI-colored text formatter (level/category colors); appends error in red.
24
23
  * @param options - Optional format and logtape ANSI options
25
24
  * @returns TextFormatter with ANSI colors
26
25
  */
27
- declare function getAnsiColorFormatter(options?: AnsiColorFormatterOptions): TextFormatter$1;
26
+ declare function getAnsiColorFormatter(options?: AnsiColorFormatterOptions): TextFormatter;
28
27
  /**
29
28
  * The formatter returns an array where:
30
29
  * - First element is the formatted message string
@@ -33,7 +32,7 @@ declare function getAnsiColorFormatter(options?: AnsiColorFormatterOptions): Tex
33
32
  * @returns ConsoleFormatter for console.log/error
34
33
  */
35
34
  declare function getConsoleFormatter(options?: {
36
- messageFormatter?: TextFormatter$1;
35
+ messageFormatter?: TextFormatter;
37
36
  }): ConsoleFormatter;
38
37
  //#endregion
39
38
  //#region src/sink.d.ts
@@ -42,14 +41,14 @@ declare function getConsoleFormatter(options?: {
42
41
  * @param options - Optional console sink options (e.g. custom formatter)
43
42
  * @returns Sink that writes to stdout
44
43
  */
45
- declare function getConsoleSink(options?: ConsoleSinkOptions): Sink$1;
44
+ declare function getConsoleSink(options?: ConsoleSinkOptions): Sink;
46
45
  /**
47
46
  * Creates a console sink that writes to stderr.
48
47
  * (MCP protocol requires stderr to be used for logging)
49
48
  * @param options - Optional console sink options (e.g. custom formatter)
50
49
  * @returns Sink that writes to stderr
51
50
  */
52
- declare function getConsoleStderrSink(options?: ConsoleSinkOptions): Sink$1;
51
+ declare function getConsoleStderrSink(options?: ConsoleSinkOptions): Sink;
53
52
  //#endregion
54
53
  //#region src/utils.d.ts
55
54
  /**
@@ -95,14 +94,14 @@ type NormalizeError<ErrorArg> = ErrorArg extends Error ? ErrorArg : Error;
95
94
  declare function wrapError<ErrorArg>(error: ErrorArg, newMessage: string): NormalizeError<ErrorArg>;
96
95
  //#endregion
97
96
  //#region src/index.d.ts
98
- declare const logger: _logtape_logtape0.Logger;
97
+ declare const logger: Logger;
99
98
  /**
100
99
  * Get a child logger with the given subcategory.
101
100
  *
102
101
  * @param subcategory The subcategory.
103
102
  * @returns The child logger.
104
103
  */
105
- declare function createLogger(subcategory: string | readonly [string] | readonly [string, ...string[]]): _logtape_logtape0.Logger;
104
+ declare function createLogger(subcategory: string | readonly [string] | readonly [string, ...string[]]): Logger;
106
105
  /**
107
106
  * Configure the global logger: sinks, loggers, and lowest level per category.
108
107
  * @param config - Optional partial config (sinks, loggers). Merged with defaults.
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
+ import { a as getTextFormatter$1, i as getAnsiColorFormatter$1, n as getConsoleSink$1, o as getLogger, r as withFilter, t as configureSync } from "./_chunks/libs/@logtape/logtape.mjs";
1
2
  import { n as wrapErrorMessage, t as mergeErrorCause } from "./_chunks/libs/merge-error-cause.mjs";
2
3
  import "./_chunks/libs/is-error-instance.mjs";
3
4
  import "./_chunks/libs/is-plain-obj.mjs";
4
5
  import { t as safeStringify } from "./_chunks/libs/safe-stringify.mjs";
5
- import { configureSync, getAnsiColorFormatter as getAnsiColorFormatter$1, getConsoleSink as getConsoleSink$1, getLogger, getTextFormatter as getTextFormatter$1, withFilter } from "@logtape/logtape";
6
6
  /**
7
7
  * Split stack string into lines and normalize (e.g. strip file://).
8
8
  * @param stack - Error stack string
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@likec4/log",
3
3
  "description": "Shared interface for logging",
4
4
  "license": "MIT",
5
- "version": "1.50.0",
5
+ "version": "1.52.0",
6
6
  "bugs": "https://github.com/likec4/likec4/issues",
7
7
  "homepage": "https://likec4.dev",
8
8
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -31,17 +31,15 @@
31
31
  "registry": "https://registry.npmjs.org",
32
32
  "access": "public"
33
33
  },
34
- "dependencies": {
35
- "@logtape/logtape": "^1.3.7"
36
- },
37
34
  "devDependencies": {
35
+ "@logtape/logtape": "^1.3.7",
38
36
  "@types/node": "~22.19.11",
39
37
  "merge-error-cause": "^5.0.2",
40
38
  "safe-stringify": "^1.3.0",
41
39
  "typescript": "5.9.3",
42
40
  "obuild": "^0.4.31",
43
41
  "wrap-error-message": "^3.0.1",
44
- "@likec4/tsconfig": "1.50.0",
42
+ "@likec4/tsconfig": "1.52.0",
45
43
  "@likec4/devops": "1.42.0"
46
44
  },
47
45
  "scripts": {