@crimsonsunset/jsg-logger 1.7.6 → 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.
- package/CHANGELOG.md +23 -0
- package/devtools/dist/__vite-browser-external-2Ng8QIWW-2Ng8QIWW-2Ng8QIWW.js +5 -0
- package/devtools/dist/__vite-browser-external-2Ng8QIWW-2Ng8QIWW-2Ng8QIWW.js.map +1 -0
- package/devtools/dist/{panel-entry-BZ56bT66.js → panel-entry-BZ56bT66-BMyD75mc.js} +4 -4
- package/devtools/dist/panel-entry-BZ56bT66-BMyD75mc.js.map +1 -0
- package/devtools/dist/panel-entry-Da9n85v7.js +13631 -0
- package/devtools/dist/panel-entry-Da9n85v7.js.map +1 -0
- package/devtools/dist/{panel-entry-DzGsV7s--DzGsV7s-.js → panel-entry-DzGsV7s--DzGsV7s--DzGsV7s-.js} +1 -1
- package/devtools/dist/panel-entry-DzGsV7s--DzGsV7s--DzGsV7s-.js.map +1 -0
- package/devtools/dist/panel-entry.js +3003 -2906
- package/devtools/dist/panel-entry.js.map +1 -1
- package/formatters/browser-formatter.js +0 -13
- package/index.js +2 -2
- package/package.json +1 -1
- package/devtools/dist/panel-entry-BZ56bT66.js.map +0 -1
- package/devtools/dist/panel-entry-DzGsV7s--DzGsV7s-.js.map +0 -1
|
@@ -166,20 +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
|
-
// Check for circular references before logging
|
|
170
|
-
try {
|
|
171
|
-
// Try to stringify to detect circular references
|
|
172
|
-
JSON.stringify(value);
|
|
173
|
-
console.log(` ├─ %c${key}:`, 'color: #00C896; font-weight: bold;', value);
|
|
174
|
-
} catch (error) {
|
|
175
|
-
// Circular reference detected - log a safe representation
|
|
176
|
-
if (error.message.includes('circular')) {
|
|
177
|
-
console.log(` ├─ %c${key}:`, 'color: #00C896; font-weight: bold;', '[Circular Reference]', value);
|
|
178
|
-
} else {
|
|
179
|
-
// Other error - log the object directly (browser console can handle it)
|
|
180
169
|
console.log(` ├─ %c${key}:`, 'color: #00C896; font-weight: bold;', value);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
170
|
} else {
|
|
184
171
|
console.log(` ├─ %c${key}: %c${value}`, 'color: #00C896; font-weight: bold;', 'color: inherit;');
|
|
185
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('
|
|
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;
|
|
@@ -531,7 +531,7 @@ class JSGLogger {
|
|
|
531
531
|
// Runtime config override: consumer enabled devtools but default was disabled
|
|
532
532
|
// Load on demand via dynamic import
|
|
533
533
|
devtoolsLogger.info('Loading DevTools module dynamically (runtime config override)...');
|
|
534
|
-
devtoolsModule = await import('
|
|
534
|
+
devtoolsModule = await import('@crimsonsunset/jsg-logger/devtools');
|
|
535
535
|
}
|
|
536
536
|
} else {
|
|
537
537
|
devtoolsLogger.info('Using pre-loaded DevTools module');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crimsonsunset/jsg-logger",
|
|
3
|
-
"version": "1.7.
|
|
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",
|