@putkoff/abstract-logger 0.0.29 โ†’ 0.0.31

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/cjs/index.js CHANGED
@@ -14470,20 +14470,21 @@ const IS_BROWSER = typeof window !== "undefined" &&
14470
14470
  const IS_NODE = typeof process !== "undefined" &&
14471
14471
  process.release?.name === "node";
14472
14472
 
14473
- function parseList(value) {
14474
- return value
14475
- ? value.split(",").map(s => s.trim()).filter(Boolean)
14476
- : [];
14477
- }
14478
14473
  function getLogConfig() {
14479
14474
  return {
14480
14475
  condensed: process.env.LOG_CONDENSED !== "false",
14481
14476
  expandOnDebug: process.env.LOG_EXPAND_DEBUG !== "false",
14482
14477
  showDetails: process.env.LOG_SHOW_DETAILS !== "false",
14483
14478
  maxDetailsLength: Number(process.env.LOG_DETAILS_MAX ?? 500),
14484
- showDetailslist: parseList(process.env.LOG_DETAILS_ALLOWLIST),
14485
- functionAllowlist: parseList(process.env.LOG_FUNCTION_ALLOWLIST),
14486
- functionBlocklist: parseList(process.env.LOG_FUNCTION_BLOCKLIST),
14479
+ showDetailslist: process.env.LOG_DETAILS_ALLOWLIST
14480
+ ? process.env.LOG_DETAILS_ALLOWLIST.split(",").map(s => s.trim())
14481
+ : [],
14482
+ functionAllowlist: process.env.LOG_FUNCTION_ALLOWLIST
14483
+ ? process.env.LOG_FUNCTION_ALLOWLIST.split(",").map(s => s.trim())
14484
+ : [],
14485
+ functionBlocklist: process.env.LOG_FUNCTION_BLOCKLIST
14486
+ ? process.env.LOG_FUNCTION_BLOCKLIST.split(",").map(s => s.trim())
14487
+ : [],
14487
14488
  };
14488
14489
  }
14489
14490
 
@@ -14513,14 +14514,11 @@ function shouldCondense(logType) {
14513
14514
  return LOG_CONFIG.condensed;
14514
14515
  }
14515
14516
  function shouldShowDetails(logType) {
14516
- const LOG_CONFIG = getLogConfig();
14517
- const allow = LOG_CONFIG.showDetailslist;
14518
- // If allowlist exists, it RESTRICTS
14519
- if (allow.length > 0) {
14520
- return allow.includes(logType);
14517
+ const cfg = getLogConfig();
14518
+ if (cfg.showDetailslist.length > 0) {
14519
+ return cfg.showDetailslist.includes(logType);
14521
14520
  }
14522
- // Otherwise fall back to global flag
14523
- return LOG_CONFIG.showDetails;
14521
+ return cfg.showDetails;
14524
14522
  }
14525
14523
  /** Exported logger */
14526
14524
  const logger = nodeLogger;
@@ -14662,19 +14660,83 @@ function getLogString(messageOrOptions, logType = null, details = null, function
14662
14660
  resolvedFileLocation = resolveValue(file, resolvedFileLocation);
14663
14661
  }
14664
14662
  const emojiMap = {
14663
+ emitting: "๐Ÿ“ค",
14664
+ ingesting: "๐Ÿ“ฅ",
14665
+ streaming: "๐ŸŒŠ",
14666
+ forwarding: "โžก๏ธ",
14667
+ receiving: "๐Ÿ“ก",
14668
+ relaying: "๐Ÿ”",
14669
+ syncing: "๐Ÿ”„",
14670
+ buffering: "โณ",
14671
+ batching: "๐Ÿ“ฆ",
14672
+ dispatching: "๐Ÿš€",
14673
+ settings: "โš™๏ธ",
14674
+ computing: "๐Ÿง ",
14675
+ running: "๐Ÿƒ",
14676
+ working: "๐Ÿ”ง",
14677
+ building: "๐Ÿ—๏ธ",
14678
+ compiling: "๐Ÿงฉ",
14679
+ crunching: "๐Ÿงฎ",
14680
+ optimizing: "๐Ÿ“ˆ",
14681
+ queued: "๐Ÿ•’",
14682
+ waiting: "โณ",
14683
+ active: "โ–ถ๏ธ",
14684
+ paused: "โธ๏ธ",
14685
+ sleeping: "๐Ÿ’ค",
14686
+ resumed: "๐Ÿ”„",
14687
+ completed: "โœ…",
14688
+ cancelled: "โŒ",
14689
+ expired: "โŒ›",
14690
+ warning: "โš ๏ธ",
14691
+ error: "โŒ",
14692
+ critical: "๐Ÿšจ",
14693
+ retrying: "๐Ÿ”",
14694
+ skipped: "โญ๏ธ",
14695
+ fallback: "๐Ÿ›Ÿ",
14696
+ degraded: "๐Ÿ“‰",
14697
+ saved: "๐Ÿ’พ",
14698
+ loading: "๐Ÿ“‚",
14699
+ exporting: "๐Ÿ“ค",
14700
+ importing: "๐Ÿ“ฅ",
14701
+ archived: "๐Ÿ—„๏ธ",
14702
+ deleted: "๐Ÿ—‘๏ธ",
14703
+ cached: "๐ŸงŠ",
14704
+ persisted: "๐Ÿ“Œ",
14705
+ locked: "๐Ÿ”’",
14706
+ unlocked: "๐Ÿ”“",
14707
+ secure: "๐Ÿ›ก๏ธ",
14708
+ insecure: "โš ๏ธ",
14709
+ verified: "โœ”๏ธ",
14710
+ blocked: "โ›”",
14711
+ allowed: "๐ŸŸข",
14712
+ connected: "๐Ÿ”—",
14713
+ disconnected: "โŒ",
14714
+ online: "๐ŸŸข",
14715
+ offline: "๐Ÿ”ด",
14716
+ latency: "๐Ÿ“ถ",
14717
+ proxying: "๐Ÿงญ",
14718
+ broadcasting: "๐Ÿ“ฃ",
14719
+ thinking: "๐Ÿค”",
14720
+ learning: "๐Ÿง ",
14721
+ predicting: "๐Ÿ”ฎ",
14722
+ scanning: "๐Ÿ”",
14723
+ crawling: "๐Ÿ•ท๏ธ",
14724
+ responding: "๐Ÿ’ฌ",
14725
+ generating: "โœจ",
14726
+ debug: "๐Ÿž",
14727
+ trace: "๐Ÿงต",
14728
+ inspect: "๐Ÿ”Ž",
14729
+ test: "๐Ÿงช",
14730
+ mock: "๐ŸŽญ",
14731
+ sandbox: "๐Ÿ–๏ธ",
14732
+ experiment: "โš—๏ธ",
14665
14733
  success: "โœ…",
14666
14734
  processing: "๐Ÿ”„",
14667
14735
  listening: "๐Ÿ“ก",
14668
- computing: "๐Ÿง ",
14669
- waiting: "โณ",
14670
- emitting: "๐Ÿ“ค",
14671
- ingesting: "๐Ÿ“ฅ",
14672
14736
  prune: "๐Ÿงน",
14673
14737
  connect: "๐Ÿ”Œ",
14674
14738
  info: "โ„น๏ธ",
14675
- warn: "โš ๏ธ",
14676
- error: "โŒ",
14677
- debug: "๐Ÿ”",
14739
+ warn: "โš ๏ธ"
14678
14740
  };
14679
14741
  const finalLogType = resolvedLogType ?? "info";
14680
14742
  const emoji = emojiMap[finalLogType] ?? "โ„น๏ธ";