mirror of
https://github.com/hanzoai/ui.git
synced 2026-11-21 00:18:41 +00:00
Rename the capture SDK to @hanzo/event and fold error tracking into it, so ONE client emits every kind of event — pageview/event/identify/group AND errors — on one batched stream. The server lenses that one stream into product analytics, web analytics, and error tracking (insights/analytics/sentry.hanzo.ai). Subsumes @sentry: no second SDK, no second pipe. - New 'error' EventKind + Exception type; WireEvent carries the exception. - Analytics.captureError()/captureException(): normalize any throwable, emit a type:'error' event, flush at once (a crash may unload the page). Never throws back into the app. - Auto-capture (config captureErrors, default on, browser-only): window.onerror + unhandledrejection → error events. The drop-in @sentry replacement. - React ErrorBoundary (./react): reports render errors React swallows before window.onerror sees them — the React half of the replacement. - 0.1.1 → 0.2.0. 28/28 tests pass (6 new error-capture specs), tsup build green. Consumers (app/chat/console/hanzo.ai/operator) migrate @hanzo/capture → @hanzo/event next; @hanzo/capture stops shipping new versions.
9 lines
154 B
TypeScript
9 lines
154 B
TypeScript
import { defineConfig } from 'vitest/config'
|
|
|
|
export default defineConfig({
|
|
test: {
|
|
environment: 'node',
|
|
include: ['src/**/*.test.ts'],
|
|
},
|
|
})
|