@likec4/log 1.52.0 → 1.54.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.
@@ -5,35 +5,6 @@ MIT
5
5
 
6
6
  # Bundled Dependencies
7
7
 
8
- ## @logtape/logtape
9
-
10
- License: MIT
11
- By: Hong Minhee
12
- Repository: https://github.com/dahlia/logtape
13
-
14
- > MIT License
15
- >
16
- > Copyright 2024–2025 Hong Minhee
17
- >
18
- > Permission is hereby granted, free of charge, to any person obtaining a copy of
19
- > this software and associated documentation files (the "Software"), to deal in
20
- > the Software without restriction, including without limitation the rights to
21
- > use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
22
- > the Software, and to permit persons to whom the Software is furnished to do so,
23
- > subject to the following conditions:
24
- >
25
- > The above copyright notice and this permission notice shall be included in all
26
- > copies or substantial portions of the Software.
27
- >
28
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
30
- > FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
31
- > COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
32
- > IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
33
- > CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
34
-
35
- ---------------------------------------
36
-
37
8
  ## is-error-instance
38
9
 
39
10
  License: MIT
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
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";
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";
2
3
 
3
4
  //#region src/formatters.d.ts
4
5
  /**
@@ -6,24 +7,24 @@ import { a as withFilter, c as TextFormatter, d as LogRecord, f as LogLevel, i a
6
7
  * @param record - Log record that may contain error in properties or rawMessage
7
8
  * @returns Merged/wrapped Error or null if none found
8
9
  */
9
- declare function errorFromLogRecord(record: LogRecord): Error | null;
10
+ declare function errorFromLogRecord(record: LogRecord$1): Error | null;
10
11
  /**
11
12
  * Formatter that outputs only the log message (no timestamp/level/category).
12
13
  * @returns TextFormatter that returns just the message string
13
14
  */
14
- declare function getMessageOnlyFormatter(): TextFormatter;
15
+ declare function getMessageOnlyFormatter(): TextFormatter$1;
15
16
  /**
16
17
  * Build a text formatter with optional custom format; appends error from record.
17
18
  * @param options - Optional format and logtape options
18
19
  * @returns TextFormatter
19
20
  */
20
- declare function getTextFormatter(options?: TextFormatterOptions): TextFormatter;
21
+ declare function getTextFormatter(options?: TextFormatterOptions): TextFormatter$1;
21
22
  /**
22
23
  * Build an ANSI-colored text formatter (level/category colors); appends error in red.
23
24
  * @param options - Optional format and logtape ANSI options
24
25
  * @returns TextFormatter with ANSI colors
25
26
  */
26
- declare function getAnsiColorFormatter(options?: AnsiColorFormatterOptions): TextFormatter;
27
+ declare function getAnsiColorFormatter(options?: AnsiColorFormatterOptions): TextFormatter$1;
27
28
  /**
28
29
  * The formatter returns an array where:
29
30
  * - First element is the formatted message string
@@ -32,7 +33,7 @@ declare function getAnsiColorFormatter(options?: AnsiColorFormatterOptions): Tex
32
33
  * @returns ConsoleFormatter for console.log/error
33
34
  */
34
35
  declare function getConsoleFormatter(options?: {
35
- messageFormatter?: TextFormatter;
36
+ messageFormatter?: TextFormatter$1;
36
37
  }): ConsoleFormatter;
37
38
  //#endregion
38
39
  //#region src/sink.d.ts
@@ -41,14 +42,14 @@ declare function getConsoleFormatter(options?: {
41
42
  * @param options - Optional console sink options (e.g. custom formatter)
42
43
  * @returns Sink that writes to stdout
43
44
  */
44
- declare function getConsoleSink(options?: ConsoleSinkOptions): Sink;
45
+ declare function getConsoleSink(options?: ConsoleSinkOptions): Sink$1;
45
46
  /**
46
47
  * Creates a console sink that writes to stderr.
47
48
  * (MCP protocol requires stderr to be used for logging)
48
49
  * @param options - Optional console sink options (e.g. custom formatter)
49
50
  * @returns Sink that writes to stderr
50
51
  */
51
- declare function getConsoleStderrSink(options?: ConsoleSinkOptions): Sink;
52
+ declare function getConsoleStderrSink(options?: ConsoleSinkOptions): Sink$1;
52
53
  //#endregion
53
54
  //#region src/utils.d.ts
54
55
  /**
@@ -94,14 +95,14 @@ type NormalizeError<ErrorArg> = ErrorArg extends Error ? ErrorArg : Error;
94
95
  declare function wrapError<ErrorArg>(error: ErrorArg, newMessage: string): NormalizeError<ErrorArg>;
95
96
  //#endregion
96
97
  //#region src/index.d.ts
97
- declare const logger: Logger;
98
+ declare const logger: _logtape_logtape0.Logger;
98
99
  /**
99
100
  * Get a child logger with the given subcategory.
100
101
  *
101
102
  * @param subcategory The subcategory.
102
103
  * @returns The child logger.
103
104
  */
104
- declare function createLogger(subcategory: string | readonly [string] | readonly [string, ...string[]]): Logger;
105
+ declare function createLogger(subcategory: string | readonly [string] | readonly [string, ...string[]]): _logtape_logtape0.Logger;
105
106
  /**
106
107
  * Configure the global logger: sinks, loggers, and lowest level per category.
107
108
  * @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";
2
1
  import { n as wrapErrorMessage, t as mergeErrorCause } from "./_chunks/libs/merge-error-cause.mjs";
3
2
  import "./_chunks/libs/is-error-instance.mjs";
4
3
  import "./_chunks/libs/is-plain-obj.mjs";
5
4
  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.52.0",
5
+ "version": "1.54.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,15 +31,17 @@
31
31
  "registry": "https://registry.npmjs.org",
32
32
  "access": "public"
33
33
  },
34
+ "dependencies": {
35
+ "@logtape/logtape": "^2.0.5"
36
+ },
34
37
  "devDependencies": {
35
- "@logtape/logtape": "^1.3.7",
36
- "@types/node": "~22.19.11",
38
+ "@types/node": "~22.19.15",
37
39
  "merge-error-cause": "^5.0.2",
38
40
  "safe-stringify": "^1.3.0",
39
41
  "typescript": "5.9.3",
40
- "obuild": "^0.4.31",
42
+ "obuild": "0.4.31",
41
43
  "wrap-error-message": "^3.0.1",
42
- "@likec4/tsconfig": "1.52.0",
44
+ "@likec4/tsconfig": "1.54.0",
43
45
  "@likec4/devops": "1.42.0"
44
46
  },
45
47
  "scripts": {