feat: Add support for #143 - add flag to pipeResponseToFile

Adding a flag that will skip the gzip decode step
This commit is contained in:
Austin Sasko 2022-03-14 14:59:24 -04:00 committed by GitHub
parent fb598a63ae
commit c3b37cf849
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

6
dist/index.js vendored
View file

@ -7299,10 +7299,10 @@ class DownloadHttpClient {
* @param destinationStream the stream where the file should be written to
* @param isGzip a boolean denoting if the content is compressed using gzip and if we need to decode it
*/
pipeResponseToFile(response, destinationStream, isGzip) {
pipeResponseToFile(response, destinationStream, isGzip, forceGzip) {
return __awaiter(this, void 0, void 0, function* () {
yield new Promise((resolve, reject) => {
if (isGzip) {
if (isGzip && !forceGzip) {
const gunzip = zlib.createGunzip();
response.message
.on('error', error => {
@ -8021,4 +8021,4 @@ module.exports = __webpack_require__(141);
/***/ })
/******/ });
/******/ });