@framers/sql-storage-adapter 0.1.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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +363 -0
  3. package/dist/adapters/baseStorageAdapter.d.ts +204 -0
  4. package/dist/adapters/baseStorageAdapter.d.ts.map +1 -0
  5. package/dist/adapters/baseStorageAdapter.js +364 -0
  6. package/dist/adapters/baseStorageAdapter.js.map +1 -0
  7. package/dist/adapters/betterSqliteAdapter.d.ts +64 -0
  8. package/dist/adapters/betterSqliteAdapter.d.ts.map +1 -0
  9. package/dist/adapters/betterSqliteAdapter.js +206 -0
  10. package/dist/adapters/betterSqliteAdapter.js.map +1 -0
  11. package/dist/adapters/capacitorSqliteAdapter.d.ts +33 -0
  12. package/dist/adapters/capacitorSqliteAdapter.d.ts.map +1 -0
  13. package/dist/adapters/capacitorSqliteAdapter.js +95 -0
  14. package/dist/adapters/capacitorSqliteAdapter.js.map +1 -0
  15. package/dist/adapters/postgresAdapter.d.ts +180 -0
  16. package/dist/adapters/postgresAdapter.d.ts.map +1 -0
  17. package/dist/adapters/postgresAdapter.js +271 -0
  18. package/dist/adapters/postgresAdapter.js.map +1 -0
  19. package/dist/adapters/sqlJsAdapter.d.ts +28 -0
  20. package/dist/adapters/sqlJsAdapter.d.ts.map +1 -0
  21. package/dist/adapters/sqlJsAdapter.js +136 -0
  22. package/dist/adapters/sqlJsAdapter.js.map +1 -0
  23. package/dist/adapters/supabase.d.ts +58 -0
  24. package/dist/adapters/supabase.d.ts.map +1 -0
  25. package/dist/adapters/supabase.js +385 -0
  26. package/dist/adapters/supabase.js.map +1 -0
  27. package/dist/database.d.ts +124 -0
  28. package/dist/database.d.ts.map +1 -0
  29. package/dist/database.js +136 -0
  30. package/dist/database.js.map +1 -0
  31. package/dist/index.d.ts +17 -0
  32. package/dist/index.d.ts.map +1 -0
  33. package/dist/index.js +25 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/resolver.d.ts +24 -0
  36. package/dist/resolver.d.ts.map +1 -0
  37. package/dist/resolver.js +91 -0
  38. package/dist/resolver.js.map +1 -0
  39. package/dist/types/context.d.ts +221 -0
  40. package/dist/types/context.d.ts.map +1 -0
  41. package/dist/types/context.js +9 -0
  42. package/dist/types/context.js.map +1 -0
  43. package/dist/types/events.d.ts +225 -0
  44. package/dist/types/events.d.ts.map +1 -0
  45. package/dist/types/events.js +8 -0
  46. package/dist/types/events.js.map +1 -0
  47. package/dist/types/extensions.d.ts +73 -0
  48. package/dist/types/extensions.d.ts.map +1 -0
  49. package/dist/types/extensions.js +7 -0
  50. package/dist/types/extensions.js.map +1 -0
  51. package/dist/types/limitations.d.ts +46 -0
  52. package/dist/types/limitations.d.ts.map +1 -0
  53. package/dist/types/limitations.js +154 -0
  54. package/dist/types/limitations.js.map +1 -0
  55. package/dist/types.d.ts +235 -0
  56. package/dist/types.d.ts.map +1 -0
  57. package/dist/types.js +18 -0
  58. package/dist/types.js.map +1 -0
  59. package/dist/utils/cloudBackup.d.ts +219 -0
  60. package/dist/utils/cloudBackup.d.ts.map +1 -0
  61. package/dist/utils/cloudBackup.js +289 -0
  62. package/dist/utils/cloudBackup.js.map +1 -0
  63. package/dist/utils/dataExport.d.ts +77 -0
  64. package/dist/utils/dataExport.d.ts.map +1 -0
  65. package/dist/utils/dataExport.js +212 -0
  66. package/dist/utils/dataExport.js.map +1 -0
  67. package/dist/utils/dataImport.d.ts +54 -0
  68. package/dist/utils/dataImport.d.ts.map +1 -0
  69. package/dist/utils/dataImport.js +324 -0
  70. package/dist/utils/dataImport.js.map +1 -0
  71. package/dist/utils/migration.d.ts +89 -0
  72. package/dist/utils/migration.d.ts.map +1 -0
  73. package/dist/utils/migration.js +184 -0
  74. package/dist/utils/migration.js.map +1 -0
  75. package/dist/utils/parameterUtils.d.ts +9 -0
  76. package/dist/utils/parameterUtils.d.ts.map +1 -0
  77. package/dist/utils/parameterUtils.js +17 -0
  78. package/dist/utils/parameterUtils.js.map +1 -0
  79. package/dist/utils/syncManager.d.ts +342 -0
  80. package/dist/utils/syncManager.d.ts.map +1 -0
  81. package/dist/utils/syncManager.js +533 -0
  82. package/dist/utils/syncManager.js.map +1 -0
  83. package/package.json +108 -0
@@ -0,0 +1,342 @@
1
+ /**
2
+ * Sync Manager for hybrid local/cloud database synchronization.
3
+ *
4
+ * Supports both online-first and offline-first patterns with automatic
5
+ * conflict resolution and intelligent sync strategies.
6
+ *
7
+ * @example Online-first with fallback
8
+ * ```typescript
9
+ * const manager = await createSyncManager({
10
+ * primary: { url: process.env.DATABASE_URL, fallback: './local.db' },
11
+ * sync: { mode: 'auto', interval: 30000 }
12
+ * });
13
+ * ```
14
+ *
15
+ * @example Offline-first with cloud sync
16
+ * ```typescript
17
+ * const manager = await createSyncManager({
18
+ * primary: { file: './local.db' },
19
+ * remote: { url: process.env.DATABASE_URL },
20
+ * sync: { mode: 'periodic', interval: 60000 }
21
+ * });
22
+ * ```
23
+ *
24
+ * @example Manual sync control
25
+ * ```typescript
26
+ * const manager = await createSyncManager({
27
+ * primary: './local.db',
28
+ * remote: process.env.DATABASE_URL,
29
+ * sync: { mode: 'manual' }
30
+ * });
31
+ *
32
+ * // Trigger sync when you want
33
+ * await manager.sync();
34
+ * ```
35
+ */
36
+ import type { StorageAdapter } from '../types';
37
+ /**
38
+ * Sync mode determines when synchronization occurs.
39
+ */
40
+ export type SyncMode = 'manual' | 'auto' | 'periodic' | 'realtime' | 'on-reconnect';
41
+ /**
42
+ * Conflict resolution strategy when same record modified offline and online.
43
+ */
44
+ export type ConflictStrategy = 'last-write-wins' | 'local-wins' | 'remote-wins' | 'merge' | 'keep-both';
45
+ /**
46
+ * Sync direction - which way data flows.
47
+ */
48
+ export type SyncDirection = 'bidirectional' | 'push-only' | 'pull-only';
49
+ /**
50
+ * Storage limit action for mobile devices.
51
+ */
52
+ export type StorageLimitAction = 'warn' | 'error' | 'prune';
53
+ /**
54
+ * Table sync priority.
55
+ */
56
+ export type SyncPriority = 'critical' | 'high' | 'medium' | 'low';
57
+ /**
58
+ * Per-table sync configuration.
59
+ */
60
+ export interface TableSyncConfig {
61
+ /** Priority level (critical syncs first) */
62
+ priority?: SyncPriority;
63
+ /** Sync in realtime regardless of global mode */
64
+ realtime?: boolean;
65
+ /** Skip this table in sync */
66
+ skip?: boolean;
67
+ /** Custom conflict resolution for this table */
68
+ conflictStrategy?: ConflictStrategy;
69
+ /** Max records to keep locally (mobile optimization) */
70
+ maxRecords?: number;
71
+ /** Custom merge function for 'merge' conflict strategy */
72
+ mergeFn?: (local: any, remote: any) => any;
73
+ }
74
+ /**
75
+ * Sync configuration options.
76
+ */
77
+ export interface SyncConfig {
78
+ /** Sync mode - when synchronization occurs */
79
+ mode?: SyncMode;
80
+ /** Sync direction - which way data flows */
81
+ direction?: SyncDirection;
82
+ /** Conflict resolution strategy */
83
+ conflictStrategy?: ConflictStrategy;
84
+ /** Interval in ms for periodic sync (default: 30000 = 30s) */
85
+ interval?: number;
86
+ /** Debounce delay in ms for auto sync (default: 500ms) */
87
+ debounce?: number;
88
+ /** Batch size - sync N records at a time (default: 100) */
89
+ batchSize?: number;
90
+ /** Retry failed syncs automatically */
91
+ retryOnError?: boolean;
92
+ /** Max retry attempts (default: 3) */
93
+ maxRetries?: number;
94
+ /** Retry delay in ms (default: 1000) */
95
+ retryDelay?: number;
96
+ /** Per-table sync configuration */
97
+ tables?: Record<string, TableSyncConfig>;
98
+ /** Mobile storage limit in MB (default: 50MB) */
99
+ mobileStorageLimit?: number;
100
+ /** Action when storage limit reached */
101
+ storageLimitAction?: StorageLimitAction;
102
+ /** Only sync specific tables (undefined = all) */
103
+ includeTables?: string[];
104
+ /** Exclude specific tables from sync */
105
+ excludeTables?: string[];
106
+ }
107
+ /**
108
+ * Database connection configuration.
109
+ */
110
+ export interface DatabaseConfig {
111
+ /** Database URL (PostgreSQL) */
112
+ url?: string;
113
+ /** File path (SQLite) */
114
+ file?: string;
115
+ /** Fallback database path if primary fails */
116
+ fallback?: string;
117
+ /** PostgreSQL-specific options */
118
+ postgres?: {
119
+ max?: number;
120
+ min?: number;
121
+ ssl?: boolean | object;
122
+ statement_timeout?: number;
123
+ };
124
+ }
125
+ /**
126
+ * Sync manager configuration.
127
+ */
128
+ export interface SyncManagerConfig {
129
+ /** Primary database (writes go here) */
130
+ primary: DatabaseConfig | string;
131
+ /** Remote database for sync (optional for offline-only) */
132
+ remote?: DatabaseConfig | string;
133
+ /** Sync configuration */
134
+ sync?: SyncConfig;
135
+ /** Called after successful sync */
136
+ onSync?: (result: SyncResult) => void;
137
+ /** Called when conflict detected */
138
+ onConflict?: (conflict: SyncConflict) => void;
139
+ /** Called when going offline */
140
+ onOffline?: () => void;
141
+ /** Called when coming online */
142
+ onOnline?: () => void;
143
+ /** Called on sync error */
144
+ onError?: (error: Error) => void;
145
+ /** Called on sync progress */
146
+ onProgress?: (progress: SyncProgress) => void;
147
+ }
148
+ /**
149
+ * Sync result after synchronization completes.
150
+ */
151
+ export interface SyncResult {
152
+ /** Sync completed successfully */
153
+ success: boolean;
154
+ /** Direction of sync */
155
+ direction: SyncDirection;
156
+ /** Number of records synced */
157
+ recordsSynced: number;
158
+ /** Number of conflicts encountered */
159
+ conflicts: number;
160
+ /** Duration in milliseconds */
161
+ duration: number;
162
+ /** Timestamp of sync */
163
+ timestamp: string;
164
+ /** Tables synced */
165
+ tables: string[];
166
+ /** Errors encountered */
167
+ errors?: Error[];
168
+ /** Detailed per-table results */
169
+ details?: Record<string, {
170
+ pushed: number;
171
+ pulled: number;
172
+ conflicts: number;
173
+ }>;
174
+ }
175
+ /**
176
+ * Conflict information.
177
+ */
178
+ export interface SyncConflict {
179
+ /** Table name */
180
+ table: string;
181
+ /** Record identifier */
182
+ id: any;
183
+ /** Local version */
184
+ local: any;
185
+ /** Remote version */
186
+ remote: any;
187
+ /** Local last modified timestamp */
188
+ localTimestamp?: string;
189
+ /** Remote last modified timestamp */
190
+ remoteTimestamp?: string;
191
+ }
192
+ /**
193
+ * Sync progress information.
194
+ */
195
+ export interface SyncProgress {
196
+ /** Current phase */
197
+ phase: 'connecting' | 'pulling' | 'pushing' | 'resolving' | 'complete';
198
+ /** Progress percentage (0-100) */
199
+ percent: number;
200
+ /** Current table being synced */
201
+ currentTable?: string;
202
+ /** Records processed */
203
+ recordsProcessed: number;
204
+ /** Total records to process */
205
+ totalRecords: number;
206
+ }
207
+ /**
208
+ * Internal resolved sync config with all required fields.
209
+ */
210
+ type ResolvedSyncConfig = Required<Omit<SyncConfig, 'includeTables' | 'excludeTables'>> & {
211
+ includeTables?: string[];
212
+ excludeTables?: string[];
213
+ };
214
+ /**
215
+ * Sync manager for hybrid local/cloud databases.
216
+ * Handles automatic synchronization, conflict resolution, and offline support.
217
+ */
218
+ export declare class SyncManager {
219
+ private readonly callbacks;
220
+ private primaryDb;
221
+ private remoteDb;
222
+ readonly config: ResolvedSyncConfig;
223
+ private syncTimer;
224
+ private debounceTimer;
225
+ private syncQueue;
226
+ private isSyncing;
227
+ private isOnline;
228
+ private lastSyncTime;
229
+ private pendingWrites;
230
+ private constructor();
231
+ /**
232
+ * Get the primary database adapter.
233
+ * Use this for all database operations.
234
+ */
235
+ get db(): StorageAdapter;
236
+ /**
237
+ * Check if manager is currently syncing.
238
+ */
239
+ get syncing(): boolean;
240
+ /**
241
+ * Check if currently online.
242
+ */
243
+ get online(): boolean;
244
+ /**
245
+ * Get last successful sync time.
246
+ */
247
+ get lastSync(): Date | null;
248
+ /**
249
+ * Trigger manual sync.
250
+ * Safe to call multiple times - queues if already syncing.
251
+ */
252
+ sync(): Promise<SyncResult>;
253
+ /**
254
+ * Perform the actual sync operation.
255
+ */
256
+ private performSync;
257
+ /**
258
+ * Sync a single table.
259
+ */
260
+ private syncTable;
261
+ /**
262
+ * Pull table data from remote to local.
263
+ */
264
+ private pullTable;
265
+ /**
266
+ * Push table data from local to remote.
267
+ */
268
+ private pushTable;
269
+ /**
270
+ * Resolve conflicts between local and remote data.
271
+ */
272
+ private resolveConflicts;
273
+ /**
274
+ * Get list of tables to sync.
275
+ */
276
+ private getTablesToSync;
277
+ /**
278
+ * Sort tables by priority.
279
+ */
280
+ private sortTablesByPriority;
281
+ /**
282
+ * Check network connection.
283
+ */
284
+ private checkConnection;
285
+ /**
286
+ * Start automatic sync based on mode.
287
+ */
288
+ private startAutoSync;
289
+ /**
290
+ * Stop automatic sync.
291
+ */
292
+ stop(): void;
293
+ /**
294
+ * Close all database connections.
295
+ */
296
+ close(): Promise<void>;
297
+ /**
298
+ * Create a sync manager instance.
299
+ */
300
+ static create(config: SyncManagerConfig): Promise<SyncManager>;
301
+ }
302
+ /**
303
+ * Create a sync manager for hybrid local/cloud databases.
304
+ *
305
+ * @example Online-first with automatic fallback
306
+ * ```typescript
307
+ * const manager = await createSyncManager({
308
+ * primary: {
309
+ * url: process.env.DATABASE_URL,
310
+ * fallback: './offline.db'
311
+ * },
312
+ * sync: {
313
+ * mode: 'periodic',
314
+ * interval: 30000
315
+ * }
316
+ * });
317
+ *
318
+ * // Use like normal database
319
+ * await manager.db.run('INSERT INTO users (name) VALUES (?)', ['Alice']);
320
+ * // Syncs automatically every 30s
321
+ * ```
322
+ *
323
+ * @example Offline-first with cloud sync
324
+ * ```typescript
325
+ * const manager = await createSyncManager({
326
+ * primary: './local.db',
327
+ * remote: process.env.DATABASE_URL,
328
+ * sync: {
329
+ * mode: 'manual' // Sync only when you call manager.sync()
330
+ * }
331
+ * });
332
+ *
333
+ * // Work offline
334
+ * await manager.db.run('INSERT INTO ...');
335
+ *
336
+ * // Sync when ready
337
+ * await manager.sync();
338
+ * ```
339
+ */
340
+ export declare function createSyncManager(config: SyncManagerConfig): Promise<SyncManager>;
341
+ export {};
342
+ //# sourceMappingURL=syncManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syncManager.d.ts","sourceRoot":"","sources":["../../src/utils/syncManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAk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