@reliverse/relinka 1.4.2 → 1.4.3

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/bin/impl.d.ts CHANGED
@@ -34,7 +34,7 @@ export type LogLevelConfig = {
34
34
  /** Configuration for all log levels. */
35
35
  export type LogLevelsConfig = Partial<Record<LogLevel, LogLevelConfig>>;
36
36
  /** Log level types used by the logger. */
37
- export type LogLevel = "error" | "fatal" | "info" | "success" | "verbose" | "warn" | "log";
37
+ export type LogLevel = "error" | "fatal" | "info" | "success" | "verbose" | "warn" | "log" | "null";
38
38
  /**
39
39
  * Configuration options for the Relinka logger.
40
40
  * All properties are optional to allow for partial configuration.
package/bin/impl.js CHANGED
@@ -67,7 +67,8 @@ const DEFAULT_RELINKA_CONFIG = {
67
67
  color: "gray",
68
68
  spacing: 3
69
69
  },
70
- log: { symbol: "\u2502", fallbackSymbol: "|", color: "dim", spacing: 3 }
70
+ log: { symbol: "\u2502", fallbackSymbol: "|", color: "dim", spacing: 3 },
71
+ null: { symbol: "", fallbackSymbol: "", color: "dim", spacing: 0 }
71
72
  }
72
73
  };
73
74
  function isUnicodeSupported() {
@@ -230,6 +231,13 @@ function getLevelStyle(config, level) {
230
231
  spacing: 3
231
232
  };
232
233
  }
234
+ if (level === "null") {
235
+ return {
236
+ symbol: "",
237
+ color: levelConfig.color,
238
+ spacing: 0
239
+ };
240
+ }
233
241
  const { symbol, fallbackSymbol, color, spacing } = levelConfig;
234
242
  const effectiveSymbol = isUnicodeSupported() ? symbol : fallbackSymbol || `[${level.toUpperCase()}]`;
235
243
  return {
@@ -268,7 +276,8 @@ const consoleMethodMap = {
268
276
  info: console.info,
269
277
  success: console.log,
270
278
  verbose: console.log,
271
- log: console.log
279
+ log: console.log,
280
+ null: console.log
272
281
  };
273
282
  function logToConsole(config, level, formattedMessage) {
274
283
  if (!isColorEnabled(config)) {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "license": "MIT",
16
16
  "name": "@reliverse/relinka",
17
17
  "type": "module",
18
- "version": "1.4.2",
18
+ "version": "1.4.3",
19
19
  "keywords": [
20
20
  "logger",
21
21
  "consola",