mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
59 lines
2.5 KiB
Diff
59 lines
2.5 KiB
Diff
diff --git a/node_modules/google-gax/node_modules/teeny-request/build/src/index.js b/node_modules/google-gax/node_modules/teeny-request/build/src/index.js
|
|
index af5d15e..2b63d0c 100644
|
|
--- a/node_modules/google-gax/node_modules/teeny-request/build/src/index.js
|
|
+++ b/node_modules/google-gax/node_modules/teeny-request/build/src/index.js
|
|
@@ -115,6 +115,9 @@ function createMultipartStream(boundary, multipart) {
|
|
}
|
|
else {
|
|
part.body.pipe(stream, { end: false });
|
|
+ part.body.on('error', (err) => {
|
|
+ stream.destroy(err);
|
|
+ });
|
|
part.body.on('end', () => {
|
|
stream.write('\r\n');
|
|
stream.write(finale);
|
|
@@ -168,25 +171,27 @@ function teenyRequest(reqOpts, callback) {
|
|
// 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) {
|
|
- (0, stream_1.pipeline)(responseStream, requestStream, () => { });
|
|
- }
|
|
- else {
|
|
- requestStream.once('response', () => {
|
|
- (0, stream_1.pipeline)(responseStream, requestStream, () => { });
|
|
- });
|
|
- }
|
|
- });
|
|
+ // let responseStream;
|
|
+ // requestStream.once('reading', () => {
|
|
+ // if (responseStream) {
|
|
+ // (0, stream_1.pipeline)(responseStream, requestStream, () => { });
|
|
+ // }
|
|
+ // else {
|
|
+ // requestStream.once('response', () => {
|
|
+ // (0, stream_1.pipeline)(responseStream, 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 => {
|