@nu-art/logger 0.401.8 → 0.500.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.
@@ -20,7 +20,6 @@ class LogClient_BrowserGroups_Class extends LogClient {
20
20
  super();
21
21
  this.setComposer(this.newComposer);
22
22
  }
23
- // ################## Class Methods - Logging ##################
24
23
  newComposer(tag, level) {
25
24
  _logger_finalDate.setTime(Date.now() - _logger_timezoneOffset);
26
25
  const date = _logger_finalDate.toISOString().replace(/T/, '_').replace(/Z/, '').substring(0, 23);
@@ -62,7 +61,6 @@ class LogClient_BrowserGroups_Class extends LogClient {
62
61
  toLog.forEach(logParam => console.log(logParam));
63
62
  console.groupEnd();
64
63
  };
65
- // ################## Class Methods - Styling ##################
66
64
  getLogLevelColor = (logLevel) => {
67
65
  switch (logLevel) {
68
66
  case LogLevel.Verbose:
@@ -1,5 +1,5 @@
1
- import { LogLevel, LogParam } from "./types.js";
2
- import { LogClient } from "./LogClient.js";
1
+ import { LogLevel, LogParam } from './types.js';
2
+ import { LogClient } from './LogClient.js';
3
3
  /**
4
4
  * Log client that outputs to console with special handling for different value types.
5
5
  *
@@ -3,8 +3,8 @@
3
3
  * Copyright (C) 2026 Adam van der Kruk aka TacB0sS
4
4
  * Licensed under the Apache License, Version 2.0
5
5
  */
6
- import { LogClient } from "./LogClient.js";
7
- import { _logger_logException } from "./utils.js";
6
+ import { LogClient } from './LogClient.js';
7
+ import { _logger_logException } from './utils.js';
8
8
  /**
9
9
  * Log client that outputs to console with special handling for different value types.
10
10
  *
@@ -42,18 +42,18 @@ class LogClient_Function_class extends LogClient {
42
42
  continue;
43
43
  }
44
44
  switch (typeof logParam) {
45
- case "undefined":
46
- case "function":
47
- case "symbol":
48
- case "bigint":
45
+ case 'undefined':
46
+ case 'function':
47
+ case 'symbol':
48
+ case 'bigint':
49
49
  console.log(`${prefix}${typeof logParam}`);
50
50
  continue;
51
- case "boolean":
52
- case "number":
53
- case "string":
51
+ case 'boolean':
52
+ case 'number':
53
+ case 'string':
54
54
  console.log(`${prefix}${logParam}`);
55
55
  continue;
56
- case "object":
56
+ case 'object':
57
57
  console.log(`${prefix}${JSON.stringify(logParam)}`);
58
58
  continue;
59
59
  }
package/browser.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ export * from './index.js';
2
+ export * from './LogClient_Browser.js';
3
+ export * from './LogClient_BrowserGroups.js';
package/browser.js ADDED
@@ -0,0 +1,8 @@
1
+ /*
2
+ * @nu-art/logger/browser - Shared API + browser-only clients (LogClient_Browser, LogClient_BrowserGroups).
3
+ * Copyright (C) 2026 Adam van der Kruk aka TacB0sS
4
+ * Licensed under the Apache License, Version 2.0
5
+ */
6
+ export * from './index.js';
7
+ export * from './LogClient_Browser.js';
8
+ export * from './LogClient_BrowserGroups.js';
package/index.d.ts CHANGED
@@ -4,9 +4,6 @@ export * from './LogClient.js';
4
4
  export * from './types.js';
5
5
  export * from './debug-flags.js';
6
6
  export * from './LogClient_Terminal.js';
7
- export * from './LogClient_Browser.js';
8
- export * from './LogClient_BrowserGroups.js';
9
- export * from './LogClient_File.js';
10
7
  export * from './LogClient_MemBuffer.js';
11
8
  export * from './LogClient_Function.js';
12
9
  export * from './LogClient_ConsoleProxy.js';
package/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  /*
2
- * @nu-art/logger - Flexible logging infrastructure with multiple output targets
2
+ * @nu-art/logger - Shared/core API (works in Node and browser).
3
+ * For Node-only: use @nu-art/logger/node (adds LogClient_File).
4
+ * For browser-only: use @nu-art/logger/browser (adds LogClient_Browser, LogClient_BrowserGroups).
3
5
  * Copyright (C) 2026 Adam van der Kruk aka TacB0sS
4
6
  * Licensed under the Apache License, Version 2.0
5
7
  */
@@ -9,9 +11,6 @@ export * from './LogClient.js';
9
11
  export * from './types.js';
10
12
  export * from './debug-flags.js';
11
13
  export * from './LogClient_Terminal.js';
12
- export * from './LogClient_Browser.js';
13
- export * from './LogClient_BrowserGroups.js';
14
- export * from './LogClient_File.js';
15
14
  export * from './LogClient_MemBuffer.js';
16
15
  export * from './LogClient_Function.js';
17
16
  export * from './LogClient_ConsoleProxy.js';
package/node.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './index.js';
2
+ export * from './LogClient_File.js';
package/node.js ADDED
@@ -0,0 +1,7 @@
1
+ /*
2
+ * @nu-art/logger/node - Shared API + Node-only clients (e.g. LogClient_File).
3
+ * Copyright (C) 2026 Adam van der Kruk aka TacB0sS
4
+ * Licensed under the Apache License, Version 2.0
5
+ */
6
+ export * from './index.js';
7
+ export * from './LogClient_File.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nu-art/logger",
3
- "version": "0.401.8",
3
+ "version": "0.500.0",
4
4
  "description": "Flexible logging infrastructure with multiple output targets, debug flags, and log rotation support",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {},
34
34
  "devDependencies": {
35
- "@nu-art/testalot": "0.401.8"
35
+ "@nu-art/testalot": "0.500.0"
36
36
  },
37
37
  "unitConfig": {
38
38
  "type": "typescript-lib"
@@ -41,6 +41,14 @@
41
41
  ".": {
42
42
  "types": "./index.d.ts",
43
43
  "import": "./index.js"
44
+ },
45
+ "./node": {
46
+ "types": "./node.d.ts",
47
+ "import": "./node.js"
48
+ },
49
+ "./browser": {
50
+ "types": "./browser.d.ts",
51
+ "import": "./browser.js"
44
52
  }
45
53
  }
46
54
  }