@powersync/react-native 0.0.0-dev-20250710154318 → 0.0.0-dev-20250711131120
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,5 +1,5 @@
|
|
|
1
1
|
import { ILogger } from 'js-logger';
|
|
2
|
-
import { AbstractRemote, AbstractRemoteOptions, BSONImplementation, DataStream, RemoteConnector,
|
|
2
|
+
import { AbstractRemote, AbstractRemoteOptions, BSONImplementation, DataStream, RemoteConnector, 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,5 @@ 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
|
-
|
|
11
|
-
postStream(options: SyncStreamOptions): Promise<DataStream<StreamingSyncLine>>;
|
|
10
|
+
postStreamRaw<T>(options: SyncStreamOptions, mapLine: (line: string) => T): Promise<DataStream<T>>;
|
|
12
11
|
}
|
|
@@ -36,17 +36,14 @@ export class ReactNativeRemote extends AbstractRemote {
|
|
|
36
36
|
async getBSON() {
|
|
37
37
|
return BSON;
|
|
38
38
|
}
|
|
39
|
-
async
|
|
40
|
-
return super.socketStream(options);
|
|
41
|
-
}
|
|
42
|
-
async postStream(options) {
|
|
39
|
+
async postStreamRaw(options, mapLine) {
|
|
43
40
|
const timeout = Platform.OS == 'android'
|
|
44
41
|
? setTimeout(() => {
|
|
45
42
|
this.logger.warn(`HTTP Streaming POST is taking longer than ${Math.ceil(STREAMING_POST_TIMEOUT_MS / 1000)} seconds to resolve. If using a debug build, please ensure Flipper Network plugin is disabled.`);
|
|
46
43
|
}, STREAMING_POST_TIMEOUT_MS)
|
|
47
44
|
: null;
|
|
48
45
|
try {
|
|
49
|
-
return await super.
|
|
46
|
+
return await super.postStreamRaw({
|
|
50
47
|
...options,
|
|
51
48
|
fetchOptions: {
|
|
52
49
|
...options.fetchOptions,
|
|
@@ -58,7 +55,7 @@ export class ReactNativeRemote extends AbstractRemote {
|
|
|
58
55
|
// @ts-expect-error https://github.com/react-native-community/fetch#enable-text-streaming
|
|
59
56
|
reactNative: { textStreaming: true }
|
|
60
57
|
}
|
|
61
|
-
});
|
|
58
|
+
}, mapLine);
|
|
62
59
|
}
|
|
63
60
|
finally {
|
|
64
61
|
if (timeout) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powersync/react-native",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20250711131120",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://docs.powersync.com/",
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"@journeyapps/react-native-quick-sqlite": "^2.4.
|
|
28
|
-
"@powersync/common": "0.0.0-dev-
|
|
27
|
+
"@journeyapps/react-native-quick-sqlite": "^2.4.6",
|
|
28
|
+
"@powersync/common": "0.0.0-dev-20250711131120",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-native": "*"
|
|
31
31
|
},
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@powersync/common": "0.0.0-dev-
|
|
38
|
+
"@powersync/common": "0.0.0-dev-20250711131120",
|
|
39
39
|
"@powersync/react": "1.5.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@craftzdog/react-native-buffer": "^6.0.5",
|
|
43
|
-
"@journeyapps/react-native-quick-sqlite": "^2.4.
|
|
43
|
+
"@journeyapps/react-native-quick-sqlite": "^2.4.6",
|
|
44
44
|
"@rollup/plugin-alias": "^5.1.0",
|
|
45
45
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
46
46
|
"@rollup/plugin-inject": "^5.0.5",
|