@djangocfg/layouts 2.1.54 → 2.1.55
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/layouts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.55",
|
|
4
4
|
"description": "Simple, straightforward layout components for Next.js - import and use with props",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"layouts",
|
|
@@ -92,9 +92,9 @@
|
|
|
92
92
|
"check": "tsc --noEmit"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@djangocfg/api": "^2.1.
|
|
96
|
-
"@djangocfg/centrifugo": "^2.1.
|
|
97
|
-
"@djangocfg/ui-nextjs": "^2.1.
|
|
95
|
+
"@djangocfg/api": "^2.1.55",
|
|
96
|
+
"@djangocfg/centrifugo": "^2.1.55",
|
|
97
|
+
"@djangocfg/ui-nextjs": "^2.1.55",
|
|
98
98
|
"@hookform/resolvers": "^5.2.0",
|
|
99
99
|
"consola": "^3.4.2",
|
|
100
100
|
"lucide-react": "^0.545.0",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"uuid": "^11.1.0"
|
|
117
117
|
},
|
|
118
118
|
"devDependencies": {
|
|
119
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
119
|
+
"@djangocfg/typescript-config": "^2.1.55",
|
|
120
120
|
"@types/node": "^24.7.2",
|
|
121
121
|
"@types/react": "^19.1.0",
|
|
122
122
|
"@types/react-dom": "^19.1.0",
|
|
@@ -214,13 +214,19 @@ export function ErrorTrackingProvider({
|
|
|
214
214
|
handlers.push({ event: ERROR_EVENTS.NETWORK, handler });
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
// Centrifugo errors
|
|
217
|
+
// Centrifugo errors (unified event with type discriminator)
|
|
218
218
|
if (centrifugoConfig.enabled) {
|
|
219
219
|
const handler = (event: Event) => {
|
|
220
220
|
if (!(event instanceof CustomEvent)) return;
|
|
221
|
+
// Filter: only handle 'error' type from unified centrifugo event
|
|
222
|
+
if (event.detail?.type !== 'error') return;
|
|
221
223
|
const detail: CentrifugoErrorDetail = {
|
|
222
|
-
...event.detail,
|
|
223
224
|
type: 'centrifugo' as const,
|
|
225
|
+
method: event.detail.data?.method || 'unknown',
|
|
226
|
+
error: event.detail.data?.error || 'Unknown error',
|
|
227
|
+
code: event.detail.data?.code,
|
|
228
|
+
data: event.detail.data?.data,
|
|
229
|
+
timestamp: event.detail.timestamp || new Date(),
|
|
224
230
|
};
|
|
225
231
|
handleError(detail, centrifugoConfig);
|
|
226
232
|
};
|
|
@@ -283,7 +283,8 @@ export const ERROR_EVENTS = {
|
|
|
283
283
|
VALIDATION: 'zod-validation-error',
|
|
284
284
|
CORS: 'cors-error',
|
|
285
285
|
NETWORK: 'network-error',
|
|
286
|
-
|
|
286
|
+
/** Unified Centrifugo event - filter by detail.type === 'error' */
|
|
287
|
+
CENTRIFUGO: 'centrifugo',
|
|
287
288
|
} as const;
|
|
288
289
|
|
|
289
290
|
/**
|