@djangocfg/devtools 2.1.483 → 2.1.484
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/package.json +4 -4
- package/src/ingest.ts +8 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/devtools",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.484",
|
|
4
4
|
"description": "Frontend devtools for django-cfg apps: error/console capture with backend ingest, plus a floating debug panel. One package, one event stream.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"django",
|
|
@@ -48,15 +48,15 @@
|
|
|
48
48
|
"lint": "eslint ."
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@djangocfg/ui-core": "^2.1.
|
|
51
|
+
"@djangocfg/ui-core": "^2.1.484",
|
|
52
52
|
"lucide-react": ">=0.400.0",
|
|
53
53
|
"react": "^19.2.4",
|
|
54
54
|
"react-dom": "^19.2.4",
|
|
55
55
|
"zustand": "^5.0.0"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
59
|
-
"@djangocfg/ui-core": "^2.1.
|
|
58
|
+
"@djangocfg/typescript-config": "^2.1.484",
|
|
59
|
+
"@djangocfg/ui-core": "^2.1.484",
|
|
60
60
|
"@types/node": "^25.9.5",
|
|
61
61
|
"@types/react": "19.2.15",
|
|
62
62
|
"lucide-react": "^0.545.0",
|
package/src/ingest.ts
CHANGED
|
@@ -42,6 +42,14 @@ export async function sendBatch(
|
|
|
42
42
|
): Promise<void> {
|
|
43
43
|
if (events.length === 0) return
|
|
44
44
|
|
|
45
|
+
// No API origin configured → drop the batch instead of posting to a relative
|
|
46
|
+
// path. A relative URL resolves against the CURRENT page, so on an
|
|
47
|
+
// i18n-prefixed route this would POST to `/<locale>/cfg/monitor/ingest/` on
|
|
48
|
+
// the site's own origin: a guaranteed 404, and — because a failed send trips
|
|
49
|
+
// the circuit breaker in `store.ts` — a retry loop from every open tab.
|
|
50
|
+
// Returning cleanly keeps the breaker closed and the app silent.
|
|
51
|
+
if (!baseUrl) return
|
|
52
|
+
|
|
45
53
|
const res = await fetch(`${baseUrl}${INGEST_PATH}`, {
|
|
46
54
|
method: 'POST',
|
|
47
55
|
headers: {
|