@oconde/radar 0.0.0-stage → 0.2.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/CHANGELOG.md +28 -0
- package/LICENSE +21 -0
- package/PROTOCOL.md +185 -0
- package/README.md +119 -2
- package/dist/bin/radar-sourcemaps.js +244 -0
- package/dist/browser/index.cjs +173 -0
- package/dist/browser/index.cjs.map +1 -0
- package/dist/browser/index.d.cts +30 -0
- package/dist/browser/index.d.ts +30 -0
- package/dist/browser/index.js +152 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/client-CZHtsQAd.d.cts +130 -0
- package/dist/client-DbBsXgpj.d.ts +130 -0
- package/dist/index.cjs +1335 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +1307 -0
- package/dist/index.js.map +1 -0
- package/dist/nest/index.cjs +1495 -0
- package/dist/nest/index.cjs.map +1 -0
- package/dist/nest/index.d.cts +41 -0
- package/dist/nest/index.d.ts +41 -0
- package/dist/nest/index.js +1470 -0
- package/dist/nest/index.js.map +1 -0
- package/dist/protocol/index.cjs +66 -0
- package/dist/protocol/index.cjs.map +1 -0
- package/dist/protocol/index.d.cts +136 -0
- package/dist/protocol/index.d.ts +136 -0
- package/dist/protocol/index.js +35 -0
- package/dist/protocol/index.js.map +1 -0
- package/dist/sveltekit/index.cjs +1840 -0
- package/dist/sveltekit/index.cjs.map +1 -0
- package/dist/sveltekit/index.d.cts +28 -0
- package/dist/sveltekit/index.d.ts +28 -0
- package/dist/sveltekit/index.js +1810 -0
- package/dist/sveltekit/index.js.map +1 -0
- package/package.json +142 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/protocol/index.ts"],"sourcesContent":["export const PROTOCOL_VERSION = 1;\n\nexport const INGEST_PATH = '/api/v1/events';\n\nexport const CHECKIN_PATH = '/api/v1/checkins/';\n\nexport const RELEASES_PATH = '/api/v1/releases/';\n\nexport const CHECKIN_SLUG = /^[a-z0-9][a-z0-9-]{0,63}$/;\n\nexport const CHECKIN_STATUSES = ['in_progress', 'ok', 'error'] as const;\n\nexport const LIMITS = {\n batchBytes: 1_000_000,\n batchEvents: 500,\n messageLength: 2000,\n stringLength: 2000,\n attrsBytes: 16_384,\n bodyBytes: 16_384,\n headers: 50,\n frames: 50,\n contextFrames: 10,\n contextLines: 5,\n contextLineLength: 300,\n causeDepth: 5,\n depth: 6,\n arrayItems: 50,\n requestIdLength: 128,\n checkInIdLength: 64,\n} as const;\n\nexport type LogLevel = 'debug' | 'info' | 'warn' | 'error';\n\nexport type EventBatch = {\n v: 1;\n sdk: { name: string; version: string };\n environment?: string;\n release?: string;\n dropped?: number;\n events: RadarEvent[];\n};\n\nexport type RadarEvent = LogEvent | ErrorEvent;\n\nexport type LogEvent = {\n type: 'log';\n ts: number;\n level: LogLevel;\n message: string;\n requestId?: string;\n attrs?: Record<string, unknown>;\n request?: RequestInfo;\n user?: UserInfo;\n};\n\nexport type ErrorEvent = {\n type: 'error';\n ts: number;\n level: 'error' | 'fatal';\n handled: boolean;\n requestId?: string;\n exception: ExceptionInfo;\n request?: RequestInfo;\n user?: UserInfo;\n runtime?: RuntimeInfo;\n attrs?: Record<string, unknown>;\n};\n\nexport type ExceptionInfo = {\n type: string;\n message: string;\n frames: StackFrame[];\n cause?: ExceptionInfo;\n};\n\nexport type StackFrame = {\n fn?: string;\n file: string;\n line?: number;\n col?: number;\n inApp: boolean;\n context?: { pre: string[]; line: string; post: string[] };\n};\n\nexport type RequestInfo = {\n method: string;\n url: string;\n route?: string;\n params?: Record<string, string>;\n query?: Record<string, unknown>;\n headers?: Record<string, string>;\n body?: unknown;\n ip?: string;\n userAgent?: string;\n status?: number;\n durationMs?: number;\n};\n\nexport type UserInfo = { id?: string; email?: string; name?: string };\n\nexport type RuntimeInfo = {\n name: 'node';\n version: string;\n host?: string;\n pid?: number;\n memoryMb?: number;\n uptimeS?: number;\n};\n\nexport type IngestResponse = { accepted: number; dropped: number };\n\nexport type IngestErrorCode =\n | 'invalid_key'\n | 'account_disabled'\n | 'payload_too_large'\n | 'invalid_batch'\n | 'quota_exceeded'\n | 'rate_limited'\n | 'unknown_monitor'\n | 'invalid_checkin';\n\nexport type IngestError = { error: { code: IngestErrorCode; message: string } };\n\nexport type CheckInStatus = (typeof CHECKIN_STATUSES)[number];\n\nexport type CheckInPayload = {\n status: CheckInStatus;\n checkInId?: string;\n durationMs?: number;\n environment?: string;\n release?: string;\n};\n\nexport type ReleaseSummary = {\n release: string;\n firstSeen: string | null;\n newIssues: number;\n events: number;\n issues: { title: string; culprit: string | null; count: number; url: string }[];\n};\n"],"mappings":";AAAO,IAAM,mBAAmB;AAEzB,IAAM,cAAc;AAEpB,IAAM,eAAe;AAErB,IAAM,gBAAgB;AAEtB,IAAM,eAAe;AAErB,IAAM,mBAAmB,CAAC,eAAe,MAAM,OAAO;AAEtD,IAAM,SAAS;AAAA,EACpB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,eAAe;AAAA,EACf,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,cAAc;AAAA,EACd,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,iBAAiB;AACnB;","names":[]}
|