mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-17 23:51:18 -05:00
778aa717d9
Revert "Update `@google-cloud/storage` and remove one patch" GitOrigin-RevId: a99b4cdf69804edb2bad0251d9ed693a9c1d0418
50 lines
2.3 KiB
Diff
50 lines
2.3 KiB
Diff
diff --git a/node_modules/@google-cloud/storage/node_modules/teeny-request/build/src/index.js b/node_modules/@google-cloud/storage/node_modules/teeny-request/build/src/index.js
|
|
index a2251ca..e29e796 100644
|
|
--- a/node_modules/@google-cloud/storage/node_modules/teeny-request/build/src/index.js
|
|
+++ b/node_modules/@google-cloud/storage/node_modules/teeny-request/build/src/index.js
|
|
@@ -166,27 +166,27 @@ function teenyRequest(reqOpts, callback) {
|
|
}
|
|
if (callback === undefined) {
|
|
// Stream mode
|
|
- const requestStream = streamEvents(new stream_1.PassThrough());
|
|
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
- let responseStream;
|
|
- requestStream.once('reading', () => {
|
|
- if (responseStream) {
|
|
- responseStream.pipe(requestStream);
|
|
- }
|
|
- else {
|
|
- requestStream.once('response', () => {
|
|
- responseStream.pipe(requestStream);
|
|
- });
|
|
- }
|
|
- });
|
|
+ const requestStream = new stream_1.PassThrough();
|
|
+ // // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
+ // let responseStream;
|
|
+ // requestStream.once('reading', () => {
|
|
+ // if (responseStream) {
|
|
+ // responseStream.pipe(requestStream);
|
|
+ // }
|
|
+ // else {
|
|
+ // requestStream.once('response', () => {
|
|
+ // responseStream.pipe(requestStream);
|
|
+ // });
|
|
+ // }
|
|
+ // });
|
|
options.compress = false;
|
|
teenyRequest.stats.requestStarting();
|
|
(0, node_fetch_1.default)(uri, options).then(res => {
|
|
- teenyRequest.stats.requestFinished();
|
|
- responseStream = res.body;
|
|
- responseStream.on('error', (err) => {
|
|
- requestStream.emit('error', err);
|
|
- });
|
|
+ teenyRequest.stats.requestFinished(); stream_1.pipeline(res.body, requestStream, () => {});
|
|
+ // responseStream = res.body;
|
|
+ // responseStream.on('error', (err) => {
|
|
+ // requestStream.emit('error', err);
|
|
+ // });
|
|
const response = fetchToRequestResponse(options, res);
|
|
requestStream.emit('response', response);
|
|
}, err => {
|