@crimsonsunset/jsg-logger 1.7.5 → 1.7.7

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.
@@ -166,7 +166,7 @@ function extractContextData(logData) {
166
166
  function displayContextData(contextData) {
167
167
  Object.entries(contextData).forEach(([key, value]) => {
168
168
  if (typeof value === 'object' && value !== null) {
169
- console.log(` ├─ %c${key}:`, 'color: #00C896; font-weight: bold;', value);
169
+ console.log(` ├─ %c${key}:`, 'color: #00C896; font-weight: bold;', value);
170
170
  } else {
171
171
  console.log(` ├─ %c${key}: %c${value}`, 'color: #00C896; font-weight: bold;', 'color: inherit;');
172
172
  }
package/index.js CHANGED
@@ -27,7 +27,7 @@ if (defaultDevtoolsEnabled) {
27
27
  metaLog('[JSG-LOGGER] DevTools module pre-loading started (default config enabled)');
28
28
  // Start loading immediately but don't await (non-blocking)
29
29
  // Bundlers can still analyze this static import for tree-shaking
30
- devtoolsModulePromise = import('./devtools/dist/panel-entry.js').then(module => {
30
+ devtoolsModulePromise = import('@crimsonsunset/jsg-logger/devtools').then(module => {
31
31
  devtoolsModule = module;
32
32
  metaLog('[JSG-LOGGER] DevTools module pre-loaded successfully');
33
33
  return module;
@@ -140,7 +140,9 @@ class JSGLogger {
140
140
  });
141
141
 
142
142
  // Create legacy compatibility aliases
143
- this.createAliases();
143
+ // Removed: camelCase aliases no longer added to this.loggers
144
+ // Use logger.components.camelCase() or logger.getComponent('kebab-case') instead
145
+ // this.createAliases();
144
146
 
145
147
  // Add utility methods
146
148
  this.addUtilityMethods();
@@ -215,7 +217,9 @@ class JSGLogger {
215
217
  });
216
218
 
217
219
  // Create legacy compatibility aliases
218
- this.createAliases();
220
+ // Removed: camelCase aliases no longer added to this.loggers
221
+ // Use logger.components.camelCase() or logger.getComponent('kebab-case') instead
222
+ // this.createAliases();
219
223
 
220
224
  // Add utility methods
221
225
  this.addUtilityMethods();
@@ -416,7 +420,7 @@ class JSGLogger {
416
420
  },
417
421
 
418
422
  // Component controls
419
- listComponents: () => Object.keys(this.loggers),
423
+ listComponents: () => configManager.getAvailableComponents(),
420
424
  enableDebugMode: () => {
421
425
  Object.keys(this.loggers).forEach(component => {
422
426
  if (this.loggers[component]) {
@@ -527,7 +531,7 @@ class JSGLogger {
527
531
  // Runtime config override: consumer enabled devtools but default was disabled
528
532
  // Load on demand via dynamic import
529
533
  devtoolsLogger.info('Loading DevTools module dynamically (runtime config override)...');
530
- devtoolsModule = await import('./devtools/dist/panel-entry.js');
534
+ devtoolsModule = await import('@crimsonsunset/jsg-logger/devtools');
531
535
  }
532
536
  } else {
533
537
  devtoolsLogger.info('Using pre-loaded DevTools module');
@@ -774,6 +778,15 @@ class JSGLogger {
774
778
  return duration;
775
779
  }
776
780
  }
781
+
782
+ /**
783
+ * Get singleton controls without triggering initialization
784
+ * Returns the controls object from the current singleton instance if it exists
785
+ * @returns {Object|null} Controls object or null if singleton not initialized
786
+ */
787
+ static getControls() {
788
+ return JSGLogger._enhancedLoggers?.controls || null;
789
+ }
777
790
  }
778
791
 
779
792
  // Initialize synchronously with default config for immediate use
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crimsonsunset/jsg-logger",
3
- "version": "1.7.5",
3
+ "version": "1.7.7",
4
4
  "type": "module",
5
5
  "description": "Multi-environment logger with smart detection, file-level overrides, and beautiful console formatting. Test it live: https://logger.joesangiorgio.com/",
6
6
  "main": "index.js",