@powersync/react-native 1.33.1 → 1.34.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.
package/dist/index.js
CHANGED
|
@@ -19207,14 +19207,18 @@ class ReactNativeRemote extends common.AbstractRemote {
|
|
|
19207
19207
|
createTextDecoder() {
|
|
19208
19208
|
return new textEncodingExports.TextDecoder();
|
|
19209
19209
|
}
|
|
19210
|
-
|
|
19210
|
+
get supportsStreamingBinaryResponses() {
|
|
19211
|
+
// We have to pass textStreaming: true to get streamed responses at all, and those don't support binary data.
|
|
19212
|
+
return false;
|
|
19213
|
+
}
|
|
19214
|
+
async fetchStreamRaw(options) {
|
|
19211
19215
|
const timeout = reactNative.Platform.OS == 'android'
|
|
19212
19216
|
? setTimeout(() => {
|
|
19213
19217
|
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.`);
|
|
19214
19218
|
}, STREAMING_POST_TIMEOUT_MS)
|
|
19215
19219
|
: null;
|
|
19216
19220
|
try {
|
|
19217
|
-
return await super.
|
|
19221
|
+
return await super.fetchStreamRaw({
|
|
19218
19222
|
...options,
|
|
19219
19223
|
fetchOptions: {
|
|
19220
19224
|
...options.fetchOptions,
|
|
@@ -19226,7 +19230,7 @@ class ReactNativeRemote extends common.AbstractRemote {
|
|
|
19226
19230
|
// @ts-expect-error https://github.com/react-native-community/fetch#enable-text-streaming
|
|
19227
19231
|
reactNative: { textStreaming: true }
|
|
19228
19232
|
}
|
|
19229
|
-
}
|
|
19233
|
+
});
|
|
19230
19234
|
}
|
|
19231
19235
|
finally {
|
|
19232
19236
|
if (timeout) {
|