@tursodatabase/sync-react-native 0.5.0-pre.4

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 (72) hide show
  1. package/README.md +117 -0
  2. package/android/CMakeLists.txt +53 -0
  3. package/android/build.gradle +84 -0
  4. package/android/cpp-adapter.cpp +49 -0
  5. package/android/src/main/AndroidManifest.xml +2 -0
  6. package/android/src/main/java/com/turso/sync/reactnative/TursoBridge.java +44 -0
  7. package/android/src/main/java/com/turso/sync/reactnative/TursoModule.java +82 -0
  8. package/android/src/main/java/com/turso/sync/reactnative/TursoPackage.java +29 -0
  9. package/cpp/TursoConnectionHostObject.cpp +179 -0
  10. package/cpp/TursoConnectionHostObject.h +52 -0
  11. package/cpp/TursoDatabaseHostObject.cpp +98 -0
  12. package/cpp/TursoDatabaseHostObject.h +49 -0
  13. package/cpp/TursoHostObject.cpp +561 -0
  14. package/cpp/TursoHostObject.h +24 -0
  15. package/cpp/TursoStatementHostObject.cpp +414 -0
  16. package/cpp/TursoStatementHostObject.h +65 -0
  17. package/cpp/TursoSyncChangesHostObject.cpp +41 -0
  18. package/cpp/TursoSyncChangesHostObject.h +52 -0
  19. package/cpp/TursoSyncDatabaseHostObject.cpp +328 -0
  20. package/cpp/TursoSyncDatabaseHostObject.h +61 -0
  21. package/cpp/TursoSyncIoItemHostObject.cpp +304 -0
  22. package/cpp/TursoSyncIoItemHostObject.h +52 -0
  23. package/cpp/TursoSyncOperationHostObject.cpp +168 -0
  24. package/cpp/TursoSyncOperationHostObject.h +53 -0
  25. package/ios/TursoModule.h +8 -0
  26. package/ios/TursoModule.mm +95 -0
  27. package/lib/commonjs/Database.js +445 -0
  28. package/lib/commonjs/Database.js.map +1 -0
  29. package/lib/commonjs/Statement.js +339 -0
  30. package/lib/commonjs/Statement.js.map +1 -0
  31. package/lib/commonjs/index.js +229 -0
  32. package/lib/commonjs/index.js.map +1 -0
  33. package/lib/commonjs/internal/asyncOperation.js +124 -0
  34. package/lib/commonjs/internal/asyncOperation.js.map +1 -0
  35. package/lib/commonjs/internal/ioProcessor.js +315 -0
  36. package/lib/commonjs/internal/ioProcessor.js.map +1 -0
  37. package/lib/commonjs/package.json +1 -0
  38. package/lib/commonjs/types.js +133 -0
  39. package/lib/commonjs/types.js.map +1 -0
  40. package/lib/module/Database.js +441 -0
  41. package/lib/module/Database.js.map +1 -0
  42. package/lib/module/Statement.js +335 -0
  43. package/lib/module/Statement.js.map +1 -0
  44. package/lib/module/index.js +205 -0
  45. package/lib/module/index.js.map +1 -0
  46. package/lib/module/internal/asyncOperation.js +116 -0
  47. package/lib/module/internal/asyncOperation.js.map +1 -0
  48. package/lib/module/internal/ioProcessor.js +309 -0
  49. package/lib/module/internal/ioProcessor.js.map +1 -0
  50. package/lib/module/package.json +1 -0
  51. package/lib/module/types.js +163 -0
  52. package/lib/module/types.js.map +1 -0
  53. package/lib/typescript/Database.d.ts +140 -0
  54. package/lib/typescript/Database.d.ts.map +1 -0
  55. package/lib/typescript/Statement.d.ts +105 -0
  56. package/lib/typescript/Statement.d.ts.map +1 -0
  57. package/lib/typescript/index.d.ts +175 -0
  58. package/lib/typescript/index.d.ts.map +1 -0
  59. package/lib/typescript/internal/asyncOperation.d.ts +39 -0
  60. package/lib/typescript/internal/asyncOperation.d.ts.map +1 -0
  61. package/lib/typescript/internal/ioProcessor.d.ts +48 -0
  62. package/lib/typescript/internal/ioProcessor.d.ts.map +1 -0
  63. package/lib/typescript/types.d.ts +316 -0
  64. package/lib/typescript/types.d.ts.map +1 -0
  65. package/package.json +97 -0
  66. package/src/Database.ts +480 -0
  67. package/src/Statement.ts +372 -0
  68. package/src/index.ts +240 -0
  69. package/src/internal/asyncOperation.ts +147 -0
  70. package/src/internal/ioProcessor.ts +328 -0
  71. package/src/types.ts +391 -0
  72. package/turso-sync-react-native.podspec +56 -0
@@ -0,0 +1,316 @@
1
+ /**
2
+ * Turso React Native SDK-KIT Types
3
+ *
4
+ * Clean TypeScript types matching the SDK-KIT C API patterns.
5
+ * All logic lives in TypeScript or Rust - the C++ layer is just a thin bridge.
6
+ */
7
+ /**
8
+ * Native database interface (local-only)
9
+ * Thin wrapper around TursoDatabaseHostObject
10
+ */
11
+ export interface NativeDatabase {
12
+ open(): void;
13
+ connect(): NativeConnection;
14
+ close(): void;
15
+ }
16
+ /**
17
+ * Native connection interface
18
+ * Thin wrapper around TursoConnectionHostObject
19
+ */
20
+ export interface NativeConnection {
21
+ prepareSingle(sql: string): NativeStatement;
22
+ prepareFirst(sql: string): {
23
+ statement: NativeStatement | null;
24
+ tailIdx: number;
25
+ };
26
+ lastInsertRowid(): number;
27
+ getAutocommit(): boolean;
28
+ setBusyTimeout(timeoutMs: number): void;
29
+ close(): void;
30
+ }
31
+ /**
32
+ * Native statement interface
33
+ * Thin wrapper around TursoStatementHostObject
34
+ */
35
+ export interface NativeStatement {
36
+ bindPositionalNull(position: number): number;
37
+ bindPositionalInt(position: number, value: number): number;
38
+ bindPositionalDouble(position: number, value: number): number;
39
+ bindPositionalBlob(position: number, value: ArrayBuffer): number;
40
+ bindPositionalText(position: number, value: string): number;
41
+ execute(): {
42
+ status: number;
43
+ rowsChanged: number;
44
+ };
45
+ step(): number;
46
+ runIo(): number;
47
+ reset(): void;
48
+ finalize(): number;
49
+ nChange(): number;
50
+ columnCount(): number;
51
+ columnName(index: number): string | null;
52
+ rowValueKind(index: number): number;
53
+ rowValueBytesCount(index: number): number;
54
+ rowValueBytesPtr(index: number): ArrayBuffer | null;
55
+ rowValueText(index: number): string;
56
+ rowValueInt(index: number): number;
57
+ rowValueDouble(index: number): number;
58
+ namedPosition(name: string): number;
59
+ parametersCount(): number;
60
+ }
61
+ /**
62
+ * Native sync database interface (embedded replica)
63
+ * Thin wrapper around TursoSyncDatabaseHostObject
64
+ */
65
+ export interface NativeSyncDatabase {
66
+ open(): NativeSyncOperation;
67
+ create(): NativeSyncOperation;
68
+ connect(): NativeSyncOperation;
69
+ stats(): NativeSyncOperation;
70
+ checkpoint(): NativeSyncOperation;
71
+ pushChanges(): NativeSyncOperation;
72
+ waitChanges(): NativeSyncOperation;
73
+ applyChanges(changes: NativeSyncChanges): NativeSyncOperation;
74
+ ioTakeItem(): NativeSyncIoItem | null;
75
+ ioStepCallbacks(): void;
76
+ close(): void;
77
+ }
78
+ /**
79
+ * Native sync operation interface
80
+ * Thin wrapper around TursoSyncOperationHostObject
81
+ * Represents an async operation that must be driven by calling resume()
82
+ */
83
+ export interface NativeSyncOperation {
84
+ resume(): number;
85
+ resultKind(): number;
86
+ extractConnection(): NativeConnection;
87
+ extractChanges(): NativeSyncChanges | null;
88
+ extractStats(): SyncStats;
89
+ }
90
+ /**
91
+ * Native sync IO item interface
92
+ * Thin wrapper around TursoSyncIoItemHostObject
93
+ * Represents an IO request that JavaScript must process using fetch() or fs
94
+ */
95
+ export interface NativeSyncIoItem {
96
+ getKind(): 'HTTP' | 'FULL_READ' | 'FULL_WRITE' | 'NONE';
97
+ getHttpRequest(): HttpRequest;
98
+ getFullReadPath(): string;
99
+ getFullWriteRequest(): FullWriteRequest;
100
+ poison(error: string): void;
101
+ setStatus(statusCode: number): void;
102
+ pushBuffer(data: ArrayBuffer): void;
103
+ done(): void;
104
+ }
105
+ /**
106
+ * Native sync changes interface
107
+ * Thin wrapper around TursoSyncChangesHostObject
108
+ * Represents changes fetched from remote (opaque, passed to applyChanges)
109
+ */
110
+ export interface NativeSyncChanges {
111
+ }
112
+ export declare enum TursoStatus {
113
+ OK = 0,
114
+ DONE = 1,
115
+ ROW = 2,
116
+ IO = 3,
117
+ BUSY = 4,
118
+ INTERRUPT = 5,
119
+ BUSY_SNAPSHOT = 6,
120
+ ERROR = 127,
121
+ MISUSE = 128,
122
+ CONSTRAINT = 129,
123
+ READONLY = 130,
124
+ DATABASE_FULL = 131,
125
+ NOTADB = 132,
126
+ CORRUPT = 133,
127
+ IOERR = 134
128
+ }
129
+ export declare enum TursoType {
130
+ UNKNOWN = 0,
131
+ INTEGER = 1,
132
+ REAL = 2,
133
+ TEXT = 3,
134
+ BLOB = 4,
135
+ NULL = 5
136
+ }
137
+ export declare enum SyncOperationResultType {
138
+ NONE = 0,
139
+ CONNECTION = 1,
140
+ CHANGES = 2,
141
+ STATS = 3
142
+ }
143
+ /**
144
+ * Supported SQLite value types for the public API
145
+ */
146
+ export type SQLiteValue = null | number | string | ArrayBuffer;
147
+ /**
148
+ * Parameters that can be bound to SQL statements
149
+ */
150
+ export type BindParams = SQLiteValue[] | Record<string, SQLiteValue> | SQLiteValue;
151
+ /**
152
+ * Result of a run() or exec() operation
153
+ */
154
+ export interface RunResult {
155
+ /** Number of rows changed by the statement */
156
+ changes: number;
157
+ /** Last inserted row ID */
158
+ lastInsertRowid: number;
159
+ }
160
+ /**
161
+ * A row returned from a query
162
+ */
163
+ export type Row = Record<string, SQLiteValue>;
164
+ /**
165
+ * Encryption options (matches JavaScript bindings)
166
+ */
167
+ export interface EncryptionOpts {
168
+ /** base64 encoded encryption key (must be either 16 or 32 bytes depending on cipher) */
169
+ key: string;
170
+ /**
171
+ * encryption cipher algorithm
172
+ * - aes256gcm, aes128gcm, chacha20poly1305: 28 reserved bytes
173
+ * - aegis128l, aegis128x2, aegis128x4: 32 reserved bytes
174
+ * - aegis256, aegis256x2, aegis256x4: 48 reserved bytes
175
+ */
176
+ cipher: 'aes256gcm' | 'aes128gcm' | 'chacha20poly1305' | 'aegis128l' | 'aegis128x2' | 'aegis128x4' | 'aegis256' | 'aegis256x2' | 'aegis256x4';
177
+ }
178
+ /**
179
+ * Database options (matches JavaScript bindings)
180
+ * Single unified config for both local and sync databases
181
+ */
182
+ export interface DatabaseOpts {
183
+ /**
184
+ * Local path where to store database file (e.g. local.db)
185
+ * Sync database will write several files with that prefix
186
+ * (e.g. local.db-info, local.db-wal, etc)
187
+ */
188
+ path: string;
189
+ /**
190
+ * Optional URL of the remote database (e.g. libsql://db-org.turso.io)
191
+ * If omitted - local-only database will be created
192
+ *
193
+ * You can also provide function which will return URL or null
194
+ * In this case local database will be created and sync will be "switched-on"
195
+ * whenever the url returns non-empty value
196
+ */
197
+ url?: string | (() => string | null);
198
+ /**
199
+ * Auth token for the remote database
200
+ * (can be either static string or function which will provide short-lived credentials)
201
+ */
202
+ authToken?: string | (() => Promise<string>);
203
+ /**
204
+ * Arbitrary client name which can be used to distinguish clients internally
205
+ * The library will guarantee uniqueness of the clientId by appending unique suffix
206
+ */
207
+ clientName?: string;
208
+ /**
209
+ * Optional remote encryption parameters if cloud database was encrypted
210
+ */
211
+ remoteEncryption?: EncryptionOpts;
212
+ /**
213
+ * Optional long-polling timeout for pull operation
214
+ * If not set - no timeout is applied
215
+ */
216
+ longPollTimeoutMs?: number;
217
+ /**
218
+ * Optional parameter to enable internal logging for the database
219
+ */
220
+ tracing?: 'error' | 'warn' | 'info' | 'debug' | 'trace';
221
+ /**
222
+ * Bootstrap database if empty; if set - client will be able to connect
223
+ * to fresh db only when network is online
224
+ */
225
+ bootstrapIfEmpty?: boolean;
226
+ /**
227
+ * Optional parameter to enable partial sync for the database
228
+ * WARNING: This feature is EXPERIMENTAL
229
+ */
230
+ partialSyncExperimental?: {
231
+ /**
232
+ * Bootstrap strategy configuration
233
+ * - prefix strategy loads first N bytes locally at startup
234
+ * - query strategy loads pages touched by the provided SQL statement
235
+ */
236
+ bootstrapStrategy: {
237
+ kind: 'prefix';
238
+ length: number;
239
+ } | {
240
+ kind: 'query';
241
+ query: string;
242
+ };
243
+ /**
244
+ * Optional segment size which makes sync engine load pages in batches
245
+ * (so, if loading page 1 with segment_size=128kb then 32 pages [1..32] will be loaded)
246
+ */
247
+ segmentSize?: number;
248
+ /**
249
+ * Optional parameter which makes sync engine prefetch pages which probably
250
+ * will be accessed soon
251
+ */
252
+ prefetch?: boolean;
253
+ };
254
+ }
255
+ /**
256
+ * Sync stats returned by stats() operation
257
+ */
258
+ export interface SyncStats {
259
+ cdcOperations: number;
260
+ mainWalSize: number;
261
+ revertWalSize: number;
262
+ lastPullUnixTime: number;
263
+ lastPushUnixTime: number;
264
+ networkSentBytes: number;
265
+ networkReceivedBytes: number;
266
+ revision: string | null;
267
+ }
268
+ /**
269
+ * HTTP request from sync engine
270
+ */
271
+ export interface HttpRequest {
272
+ url: string | null;
273
+ method: string;
274
+ path: string;
275
+ headers: Record<string, string>;
276
+ body: ArrayBuffer | null;
277
+ }
278
+ /**
279
+ * Full write request from sync engine
280
+ */
281
+ export interface FullWriteRequest {
282
+ path: string;
283
+ content: ArrayBuffer | null;
284
+ }
285
+ /**
286
+ * Native proxy interface exposed via JSI
287
+ */
288
+ export interface TursoProxy {
289
+ newDatabase(path: string, config?: any): NativeDatabase;
290
+ newSyncDatabase(dbConfig: any, syncConfig: any): NativeSyncDatabase;
291
+ version(): string;
292
+ setup(options: {
293
+ logLevel?: string;
294
+ }): void;
295
+ fsReadFile(path: string): ArrayBuffer | null;
296
+ fsWriteFile(path: string, data: ArrayBuffer): void;
297
+ }
298
+ /**
299
+ * Native module interface (React Native bridge)
300
+ */
301
+ export interface TursoNativeModule {
302
+ install(): boolean;
303
+ ANDROID_DATABASE_PATH?: string;
304
+ ANDROID_FILES_PATH?: string;
305
+ ANDROID_EXTERNAL_FILES_PATH?: string;
306
+ IOS_DOCUMENT_PATH?: string;
307
+ IOS_LIBRARY_PATH?: string;
308
+ }
309
+ /**
310
+ * Global __TursoProxy object injected by native code
311
+ */
312
+ declare global {
313
+ var __TursoProxy: TursoProxy;
314
+ }
315
+ export {};
316
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,IAAI,IAAI,CAAC;IACb,OAAO,IAAI,gBAAgB,CAAC;IAC5B,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG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AAU,CAAC;CAC9B;AAED,OAAO,EAAE,CAAC"}
package/package.json ADDED
@@ -0,0 +1,97 @@
1
+ {
2
+ "name": "@tursodatabase/sync-react-native",
3
+ "version": "0.5.0-pre.4",
4
+ "description": "React Native bindings for TursoDB",
5
+ "main": "lib/commonjs/index.js",
6
+ "module": "lib/module/index.js",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index.ts",
9
+ "source": "src/index.ts",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "libs",
14
+ "cpp",
15
+ "ios",
16
+ "android",
17
+ "node/dist",
18
+ "node/package.json",
19
+ "*.podspec",
20
+ "*.rb",
21
+ "!ios/build",
22
+ "!android/build",
23
+ "!android/gradle",
24
+ "!android/gradlew",
25
+ "!android/gradlew.bat",
26
+ "!android/local.properties",
27
+ "!**/__tests__",
28
+ "!**/__fixtures__",
29
+ "!**/__mocks__",
30
+ "!**/.*"
31
+ ],
32
+ "scripts": {
33
+ "typescript": "tsc --noEmit",
34
+ "lint": "eslint \"src/**/*.{ts,tsx}\"",
35
+ "clean": "del-cli lib",
36
+ "build": "bob build",
37
+ "build:rust:ios": "make ios",
38
+ "build:rust:android": "make android",
39
+ "prepare": "bob build"
40
+ },
41
+ "keywords": [
42
+ "react-native",
43
+ "ios",
44
+ "android",
45
+ "sqlite",
46
+ "database",
47
+ "turso",
48
+ "tursodb"
49
+ ],
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "git+https://github.com/tursodatabase/turso.git",
53
+ "directory": "bindings/react-native"
54
+ },
55
+ "author": "Turso <info@turso.tech> (https://turso.tech)",
56
+ "license": "MIT",
57
+ "bugs": {
58
+ "url": "https://github.com/tursodatabase/turso/issues"
59
+ },
60
+ "homepage": "https://github.com/tursodatabase/turso#readme",
61
+ "publishConfig": {
62
+ "registry": "https://registry.npmjs.org/"
63
+ },
64
+ "devDependencies": {
65
+ "@types/react": "^18.2.0",
66
+ "del-cli": "^5.1.0",
67
+ "eslint": "^8.57.0",
68
+ "react": "^18.2.0",
69
+ "react-native": "^0.76.0",
70
+ "react-native-builder-bob": "^0.30.0",
71
+ "typescript": "^5.3.0"
72
+ },
73
+ "dependencies": {
74
+ "@babel/runtime": "^7.25.0"
75
+ },
76
+ "peerDependencies": {
77
+ "react": ">=18.0.0",
78
+ "react-native": ">=0.76.0"
79
+ },
80
+ "engines": {
81
+ "node": ">=18"
82
+ },
83
+ "react-native-builder-bob": {
84
+ "source": "src",
85
+ "output": "lib",
86
+ "targets": [
87
+ "commonjs",
88
+ "module",
89
+ [
90
+ "typescript",
91
+ {
92
+ "project": "tsconfig.build.json"
93
+ }
94
+ ]
95
+ ]
96
+ }
97
+ }