@powersync/react-native 1.5.1 → 1.6.1
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,6 +1,7 @@
|
|
|
1
|
-
import { AbstractRemote, DataStream, StreamingSyncLine, SyncStreamOptions } from '@powersync/common';
|
|
1
|
+
import { AbstractRemote, BSONImplementation, DataStream, StreamingSyncLine, SyncStreamOptions } from '@powersync/common';
|
|
2
2
|
export declare const STREAMING_POST_TIMEOUT_MS = 30000;
|
|
3
3
|
export declare class ReactNativeRemote extends AbstractRemote {
|
|
4
|
+
getBSON(): Promise<BSONImplementation>;
|
|
4
5
|
socketStream(options: SyncStreamOptions): Promise<DataStream<StreamingSyncLine>>;
|
|
5
6
|
postStream(options: SyncStreamOptions): Promise<DataStream<StreamingSyncLine>>;
|
|
6
7
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { AbstractRemote } from '@powersync/common';
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
|
+
// Note docs for React Native https://github.com/mongodb/js-bson?tab=readme-ov-file#react-native
|
|
4
|
+
import { BSON } from 'bson';
|
|
3
5
|
export const STREAMING_POST_TIMEOUT_MS = 30_000;
|
|
4
6
|
const CommonPolyfills = [
|
|
5
7
|
{
|
|
@@ -40,6 +42,9 @@ ${missingPolyfills.join('\n')}`);
|
|
|
40
42
|
}
|
|
41
43
|
};
|
|
42
44
|
export class ReactNativeRemote extends AbstractRemote {
|
|
45
|
+
async getBSON() {
|
|
46
|
+
return BSON;
|
|
47
|
+
}
|
|
43
48
|
async socketStream(options) {
|
|
44
49
|
validatePolyfills(SocketPolyfillTests);
|
|
45
50
|
return super.socketStream(options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powersync/react-native",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -25,12 +25,14 @@
|
|
|
25
25
|
"@journeyapps/react-native-quick-sqlite": "^1.1.6",
|
|
26
26
|
"react": "*",
|
|
27
27
|
"react-native": "*",
|
|
28
|
-
"react-native-polyfill-globals": "^3.1.0"
|
|
28
|
+
"react-native-polyfill-globals": "^3.1.0",
|
|
29
|
+
"@powersync/common": "^1.9.0"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"async-lock": "^1.4.0",
|
|
32
|
-
"
|
|
33
|
-
"@powersync/
|
|
33
|
+
"bson": "^6.6.0",
|
|
34
|
+
"@powersync/react": "1.3.5",
|
|
35
|
+
"@powersync/common": "1.9.0"
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"@journeyapps/react-native-quick-sqlite": "^1.1.6",
|