@powersync/react-native 1.16.3 → 1.18.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AbstractPowerSyncDatabase, AbstractStreamingSyncImplementation, BucketStorageAdapter, DBAdapter, PowerSyncBackendConnector, PowerSyncDatabaseOptionsWithSettings } from '@powersync/common';
|
|
1
|
+
import { AbstractPowerSyncDatabase, AbstractStreamingSyncImplementation, BucketStorageAdapter, DBAdapter, PowerSyncBackendConnector, PowerSyncDatabaseOptionsWithSettings, type RequiredAdditionalConnectionOptions } from '@powersync/common';
|
|
2
2
|
/**
|
|
3
3
|
* A PowerSync database which provides SQLite functionality
|
|
4
4
|
* which is automatically synced.
|
|
@@ -21,7 +21,7 @@ export declare class PowerSyncDatabase extends AbstractPowerSyncDatabase {
|
|
|
21
21
|
*/
|
|
22
22
|
protected openDBAdapter(options: PowerSyncDatabaseOptionsWithSettings): DBAdapter;
|
|
23
23
|
protected generateBucketStorageAdapter(): BucketStorageAdapter;
|
|
24
|
-
protected generateSyncStreamImplementation(connector: PowerSyncBackendConnector): AbstractStreamingSyncImplementation;
|
|
24
|
+
protected generateSyncStreamImplementation(connector: PowerSyncBackendConnector, options: RequiredAdditionalConnectionOptions): AbstractStreamingSyncImplementation;
|
|
25
25
|
readLock<T>(callback: (db: DBAdapter) => Promise<T>): Promise<T>;
|
|
26
26
|
writeLock<T>(callback: (db: DBAdapter) => Promise<T>): Promise<T>;
|
|
27
27
|
}
|
|
@@ -29,7 +29,7 @@ export class PowerSyncDatabase extends AbstractPowerSyncDatabase {
|
|
|
29
29
|
generateBucketStorageAdapter() {
|
|
30
30
|
return new SqliteBucketStorage(this.database, AbstractPowerSyncDatabase.transactionMutex);
|
|
31
31
|
}
|
|
32
|
-
generateSyncStreamImplementation(connector) {
|
|
32
|
+
generateSyncStreamImplementation(connector, options) {
|
|
33
33
|
const remote = new ReactNativeRemote(connector);
|
|
34
34
|
return new ReactNativeStreamingSyncImplementation({
|
|
35
35
|
adapter: this.bucketStorageAdapter,
|
|
@@ -38,8 +38,8 @@ export class PowerSyncDatabase extends AbstractPowerSyncDatabase {
|
|
|
38
38
|
await this.waitForReady();
|
|
39
39
|
await connector.uploadData(this);
|
|
40
40
|
},
|
|
41
|
-
retryDelayMs:
|
|
42
|
-
crudUploadThrottleMs:
|
|
41
|
+
retryDelayMs: options.retryDelayMs,
|
|
42
|
+
crudUploadThrottleMs: options.crudUploadThrottleMs,
|
|
43
43
|
identifier: this.database.name
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ILogger } from 'js-logger';
|
|
2
|
-
import { AbstractRemote, AbstractRemoteOptions, BSONImplementation, DataStream, RemoteConnector, StreamingSyncLine, SyncStreamOptions } from '@powersync/common';
|
|
2
|
+
import { AbstractRemote, AbstractRemoteOptions, BSONImplementation, DataStream, RemoteConnector, SocketSyncStreamOptions, StreamingSyncLine, SyncStreamOptions } from '@powersync/common';
|
|
3
3
|
export declare const STREAMING_POST_TIMEOUT_MS = 30000;
|
|
4
4
|
export declare class ReactNativeRemote extends AbstractRemote {
|
|
5
5
|
protected connector: RemoteConnector;
|
|
@@ -7,6 +7,6 @@ export declare class ReactNativeRemote extends AbstractRemote {
|
|
|
7
7
|
constructor(connector: RemoteConnector, logger?: ILogger, options?: Partial<AbstractRemoteOptions>);
|
|
8
8
|
getUserAgent(): string;
|
|
9
9
|
getBSON(): Promise<BSONImplementation>;
|
|
10
|
-
socketStream(options:
|
|
10
|
+
socketStream(options: SocketSyncStreamOptions): Promise<DataStream<StreamingSyncLine>>;
|
|
11
11
|
postStream(options: SyncStreamOptions): Promise<DataStream<StreamingSyncLine>>;
|
|
12
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powersync/react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"homepage": "https://docs.powersync.com/",
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@journeyapps/react-native-quick-sqlite": "^2.3.0",
|
|
28
|
-
"@powersync/common": "^1.
|
|
28
|
+
"@powersync/common": "^1.24.0",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-native": "*"
|
|
31
31
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@powersync/common": "1.
|
|
38
|
+
"@powersync/common": "1.24.0",
|
|
39
39
|
"@powersync/react": "1.5.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|