ReviewOS

also looking at this

stacks/stx

chore: wip stx improvements

#1649
Merged fingersandmind wants to merge feat/stx-improvements into main
241 files +19022 -1323
packages/analytics/src/storage/sqlite.tsadded+44-0
Changes to packages/analytics/src/storage/sqlite.ts
@@ -0,0 +1,44 @@
1import type { AnalyticsEvent, AnalyticsQuery, AnalyticsResult, AnalyticsStorage, PageView } from '../types'
2
3/**
4 * SQLite-based analytics storage.
5 *
6 * This is an interface-only implementation placeholder for production use.
7 * To use SQLite storage, provide a configured Bun SQLite database instance.
8 */
9export class SqliteAnalyticsStorage implements AnalyticsStorage {
10 private db: unknown
11
12 constructor(db: unknown) {
13 this.db = db
14 void this.db
15 }
16
17 async savePageView(_view: PageView): Promise<void> {
18 throw new Error('SqliteAnalyticsStorage is not yet implemented. Use MemoryAnalyticsStorage for development.')
19 }
20
21 async saveEvent(_event: AnalyticsEvent): Promise<void> {
22 throw new Error('SqliteAnalyticsStorage is not yet implemented. Use MemoryAnalyticsStorage for development.')
23 }
24
25 async getPageViews(_query?: AnalyticsQuery): Promise<PageView[]> {
26 throw new Error('SqliteAnalyticsStorage is not yet implemented. Use MemoryAnalyticsStorage for development.')
27 }
28
29 async getEvents(_query?: AnalyticsQuery): Promise<AnalyticsEvent[]> {
30 throw new Error('SqliteAnalyticsStorage is not yet implemented. Use MemoryAnalyticsStorage for development.')
31 }
32
33 async getStats(_query?: AnalyticsQuery): Promise<AnalyticsResult> {
34 throw new Error('SqliteAnalyticsStorage is not yet implemented. Use MemoryAnalyticsStorage for development.')
35 }
36
37 async clear(): Promise<void> {
38 throw new Error('SqliteAnalyticsStorage is not yet implemented. Use MemoryAnalyticsStorage for development.')
39 }
40
41 async count(): Promise<number> {
42 throw new Error('SqliteAnalyticsStorage is not yet implemented. Use MemoryAnalyticsStorage for development.')
43 }
44}