From 04ea765546be51348d2049b1efa2f184ba9ddb6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Costa=20Lima?= Date: Mon, 1 Feb 2021 13:40:01 +0000 Subject: [PATCH] fix: enable text streaming for React Native on log.tail --- packages/ipfs-http-client/.aegir.js | 28 ++++++++++++----------- packages/ipfs-http-client/src/log/tail.js | 5 +++- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/packages/ipfs-http-client/.aegir.js b/packages/ipfs-http-client/.aegir.js index 978ae66789..4b9d65e18d 100644 --- a/packages/ipfs-http-client/.aegir.js +++ b/packages/ipfs-http-client/.aegir.js @@ -11,16 +11,18 @@ const server = createServer({ ipfsBin: require('go-ipfs').path() }) -module.exports = { - bundlesize: { maxSize: '83kB' }, - hooks: { - browser: { - pre: async () => { - await server.start() - }, - post: async () => { - await server.stop() - } - } - } -} +server.start() + +// module.exports = { +// bundlesize: { maxSize: '83kB' }, +// hooks: { +// browser: { +// pre: async () => { +// await server.start() +// }, +// post: async () => { +// await server.stop() +// } +// } +// } +// } diff --git a/packages/ipfs-http-client/src/log/tail.js b/packages/ipfs-http-client/src/log/tail.js index e3238b19f8..ab20a35f41 100644 --- a/packages/ipfs-http-client/src/log/tail.js +++ b/packages/ipfs-http-client/src/log/tail.js @@ -9,7 +9,10 @@ module.exports = configure(api => { timeout: options.timeout, signal: options.signal, searchParams: toUrlSearchParams(options), - headers: options.headers + headers: options.headers, + reactNative: { + textStreaming: true + } }) yield * res.ndjson()