@tumbaland/frontend-core 1.11.0 → 1.13.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.
- package/dist/monitoring/batch.js +12 -9
- package/package.json +5 -5
package/dist/monitoring/batch.js
CHANGED
|
@@ -27,22 +27,25 @@ const sendBatch = async () => {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
// Report the failure without it becoming a log of its own. console.warn is
|
|
31
|
+
// usually the interceptor, which captures and queues whatever passes through
|
|
32
|
+
// it; saving a reference to it and swapping in a no-op did not stop that.
|
|
33
|
+
// Each failure then queued one warning plus, in development, one per dropped
|
|
34
|
+
// log, which refilled the batch past BATCH_SIZE and sent again at once. With
|
|
35
|
+
// the endpoint down that never paused and ran the page out of memory.
|
|
36
|
+
// The interceptor still prints while this flag is set; it just captures nothing.
|
|
37
|
+
const wasIntercepting = window._monitoringInterceptingConsole === true;
|
|
38
|
+
window._monitoringInterceptingConsole = true;
|
|
35
39
|
try {
|
|
36
|
-
|
|
37
|
-
// Optional: log failed batch to console in development
|
|
40
|
+
console.warn('Failed to send log batch, dropping logs:', error);
|
|
38
41
|
if (config.isDevelopment) {
|
|
39
42
|
batchToSend.forEach(log => {
|
|
40
|
-
|
|
43
|
+
console.warn('📝 [DROPPED LOG]:', JSON.stringify(log));
|
|
41
44
|
});
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
finally {
|
|
45
|
-
|
|
48
|
+
window._monitoringInterceptingConsole = wasIntercepting;
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tumbaland/frontend-core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Shared frontend auth/group/API-client logic for Tumbaland frontends",
|
|
5
5
|
"author": "Tumbaland",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
"tagPrefix": "frontend-core-v"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"web-vitals": "^
|
|
25
|
+
"web-vitals": "^6.2.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^26.1
|
|
29
|
-
"@vitest/coverage-v8": "^4.1.
|
|
30
|
-
"commit-and-tag-version": "^13.1
|
|
28
|
+
"@types/node": "^26.5.1",
|
|
29
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
30
|
+
"commit-and-tag-version": "^13.2.1",
|
|
31
31
|
"typescript": "^6.0.3"
|
|
32
32
|
}
|
|
33
33
|
}
|