@leftium/gg 0.0.18 → 0.0.19
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/gg.js +10 -0
- package/package.json +1 -1
package/dist/gg.js
CHANGED
|
@@ -82,6 +82,13 @@ const srcRootRegex = new RegExp(ggConfig.srcRootPattern, 'i');
|
|
|
82
82
|
// - Cache and reuse the same log function for a given callpoint.
|
|
83
83
|
const namespaceToLogFunction = new Map();
|
|
84
84
|
let maxCallpointLength = 0;
|
|
85
|
+
/**
|
|
86
|
+
* Reset the namespace width tracking.
|
|
87
|
+
* Useful after configuration checks that may have long callpoint paths.
|
|
88
|
+
*/
|
|
89
|
+
function resetNamespaceWidth() {
|
|
90
|
+
maxCallpointLength = 0;
|
|
91
|
+
}
|
|
85
92
|
function openInEditorUrl(fileName) {
|
|
86
93
|
return ggConfig.openInEditorUrlTemplate.replace('$FILENAME', encodeURIComponent(fileName).replaceAll('%2F', '/'));
|
|
87
94
|
}
|
|
@@ -179,4 +186,7 @@ if (ggConfig.showHints && !isCloudflareWorker()) {
|
|
|
179
186
|
message(`${checkbox(ggLogTest.enabled)} DEBUG env variable: ${process?.env?.DEBUG}${hint}`);
|
|
180
187
|
}
|
|
181
188
|
console.log(ggMessage);
|
|
189
|
+
// Reset namespace width after configuration check
|
|
190
|
+
// This prevents the long callpoint from the config check from affecting subsequent logs
|
|
191
|
+
resetNamespaceWidth();
|
|
182
192
|
}
|