@logtape/pretty 2.2.10 → 2.2.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/dist/mod.d.cts CHANGED
@@ -1,2 +1,2 @@
1
1
  import { PrettyFormatterOptions, getPrettyFormatter, prettyFormatter } from "./formatter.cjs";
2
- export { PrettyFormatterOptions, getPrettyFormatter, prettyFormatter };
2
+ export { type PrettyFormatterOptions, getPrettyFormatter, prettyFormatter };
package/dist/mod.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import { PrettyFormatterOptions, getPrettyFormatter, prettyFormatter } from "./formatter.js";
2
- export { PrettyFormatterOptions, getPrettyFormatter, prettyFormatter };
2
+ export { type PrettyFormatterOptions, getPrettyFormatter, prettyFormatter };
@@ -5,43 +5,6 @@
5
5
  * @since 1.0.0
6
6
  */
7
7
  type TruncationStrategy = "middle" | "end" | false;
8
- /**
9
- * Truncates a category array to fit within a maximum width using the specified strategy.
10
- *
11
- * This function intelligently shortens long hierarchical category names while
12
- * preserving important context. The truncation behavior depends on the chosen
13
- * strategy:
14
- *
15
- * - `"middle"`: Keeps the first and last segments with "…" in between
16
- * - `"end"`: Truncates at the end with "…" suffix
17
- * - `false`: No truncation (returns full category string)
18
- *
19
- * When the category is too long even for middle truncation (first + "…" + last
20
- * exceeds maxWidth), it falls back to end truncation.
21
- *
22
- * @param category The category segments to truncate.
23
- * @param maxWidth Maximum width for the category string.
24
- * @param separator Category separator (default: ".").
25
- * @param strategy Truncation strategy to use (default: "middle").
26
- * @returns The truncated category string.
27
- *
28
- * @example
29
- * ```typescript
30
- * // Middle truncation
31
- * truncateCategory(["app", "server", "http", "auth"], 15, ".", "middle");
32
- * // Returns: "app…auth"
33
- *
34
- * // End truncation
35
- * truncateCategory(["app", "server", "http", "auth"], 15, ".", "end");
36
- * // Returns: "app.server.h…"
37
- *
38
- * // No truncation
39
- * truncateCategory(["app", "auth"], 20, ".", false);
40
- * // Returns: "app.auth"
41
- * ```
42
- *
43
- * @since 1.0.0
44
- */
45
8
  //#endregion
46
9
  export { TruncationStrategy };
47
10
  //# sourceMappingURL=truncate.d.cts.map
@@ -5,43 +5,6 @@
5
5
  * @since 1.0.0
6
6
  */
7
7
  type TruncationStrategy = "middle" | "end" | false;
8
- /**
9
- * Truncates a category array to fit within a maximum width using the specified strategy.
10
- *
11
- * This function intelligently shortens long hierarchical category names while
12
- * preserving important context. The truncation behavior depends on the chosen
13
- * strategy:
14
- *
15
- * - `"middle"`: Keeps the first and last segments with "…" in between
16
- * - `"end"`: Truncates at the end with "…" suffix
17
- * - `false`: No truncation (returns full category string)
18
- *
19
- * When the category is too long even for middle truncation (first + "…" + last
20
- * exceeds maxWidth), it falls back to end truncation.
21
- *
22
- * @param category The category segments to truncate.
23
- * @param maxWidth Maximum width for the category string.
24
- * @param separator Category separator (default: ".").
25
- * @param strategy Truncation strategy to use (default: "middle").
26
- * @returns The truncated category string.
27
- *
28
- * @example
29
- * ```typescript
30
- * // Middle truncation
31
- * truncateCategory(["app", "server", "http", "auth"], 15, ".", "middle");
32
- * // Returns: "app…auth"
33
- *
34
- * // End truncation
35
- * truncateCategory(["app", "server", "http", "auth"], 15, ".", "end");
36
- * // Returns: "app.server.h…"
37
- *
38
- * // No truncation
39
- * truncateCategory(["app", "auth"], 20, ".", false);
40
- * // Returns: "app.auth"
41
- * ```
42
- *
43
- * @since 1.0.0
44
- */
45
8
  //#endregion
46
9
  export { TruncationStrategy };
47
10
  //# sourceMappingURL=truncate.d.ts.map
package/dist/util.d.cts CHANGED
@@ -8,7 +8,6 @@ interface InspectOptions {
8
8
  [key: string]: unknown;
9
9
  }
10
10
  declare function inspect(obj: unknown, options?: InspectOptions): string;
11
- //# sourceMappingURL=util.d.ts.map
12
11
  //#endregion
13
12
  export { InspectOptions, inspect };
14
13
  //# sourceMappingURL=util.d.cts.map
package/dist/util.d.ts CHANGED
@@ -8,7 +8,6 @@ interface InspectOptions {
8
8
  [key: string]: unknown;
9
9
  }
10
10
  declare function inspect(obj: unknown, options?: InspectOptions): string;
11
- //# sourceMappingURL=util.d.ts.map
12
11
  //#endregion
13
12
  export { InspectOptions, inspect };
14
13
  //# sourceMappingURL=util.d.ts.map
@@ -8,7 +8,6 @@ interface InspectOptions {
8
8
  [key: string]: unknown;
9
9
  }
10
10
  declare function inspect(obj: unknown, options?: InspectOptions): string;
11
- //# sourceMappingURL=util.deno.d.ts.map
12
11
  //#endregion
13
12
  export { InspectOptions, inspect };
14
13
  //# sourceMappingURL=util.deno.d.cts.map
@@ -8,7 +8,6 @@ interface InspectOptions {
8
8
  [key: string]: unknown;
9
9
  }
10
10
  declare function inspect(obj: unknown, options?: InspectOptions): string;
11
- //# sourceMappingURL=util.deno.d.ts.map
12
11
  //#endregion
13
12
  export { InspectOptions, inspect };
14
13
  //# sourceMappingURL=util.deno.d.ts.map
@@ -8,7 +8,6 @@ interface InspectOptions {
8
8
  [key: string]: unknown;
9
9
  }
10
10
  declare function inspect(obj: unknown, options?: InspectOptions): string;
11
- //# sourceMappingURL=util.node.d.ts.map
12
11
  //#endregion
13
12
  export { InspectOptions, inspect };
14
13
  //# sourceMappingURL=util.node.d.cts.map
@@ -8,7 +8,6 @@ interface InspectOptions {
8
8
  [key: string]: unknown;
9
9
  }
10
10
  declare function inspect(obj: unknown, options?: InspectOptions): string;
11
- //# sourceMappingURL=util.node.d.ts.map
12
11
  //#endregion
13
12
  export { InspectOptions, inspect };
14
13
  //# sourceMappingURL=util.node.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logtape/pretty",
3
- "version": "2.2.10",
3
+ "version": "2.2.12",
4
4
  "description": "Beautiful text formatter for LogTape—perfect for local development",
5
5
  "keywords": [
6
6
  "logging",
@@ -78,7 +78,7 @@
78
78
  "dist/"
79
79
  ],
80
80
  "peerDependencies": {
81
- "@logtape/logtape": "^2.2.10"
81
+ "@logtape/logtape": "^2.2.12"
82
82
  },
83
83
  "devDependencies": {
84
84
  "@alinea/suite": "^0.6.3",