Consolidate gunzip logic
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
import path from 'path';
|
||||
import gunzip from 'gunzip-maybe';
|
||||
import tar from 'tar-stream';
|
||||
|
||||
import asyncHandler from '../utils/asyncHandler.js';
|
||||
@ -15,7 +14,6 @@ async function findMatchingEntries(stream, filename) {
|
||||
const entries = {};
|
||||
|
||||
stream
|
||||
.pipe(gunzip())
|
||||
.pipe(tar.extract())
|
||||
.on('error', reject)
|
||||
.on('entry', async (header, stream, next) => {
|
||||
|
@ -1,5 +1,4 @@
|
||||
import path from 'path';
|
||||
import gunzip from 'gunzip-maybe';
|
||||
import tar from 'tar-stream';
|
||||
|
||||
import asyncHandler from '../utils/asyncHandler.js';
|
||||
@ -16,7 +15,6 @@ async function findMatchingEntries(stream, filename) {
|
||||
entries[filename] = { path: filename, type: 'directory' };
|
||||
|
||||
stream
|
||||
.pipe(gunzip())
|
||||
.pipe(tar.extract())
|
||||
.on('error', reject)
|
||||
.on('entry', async (header, stream, next) => {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import gunzip from 'gunzip-maybe';
|
||||
import tar from 'tar-stream';
|
||||
|
||||
import asyncHandler from '../utils/asyncHandler.js';
|
||||
@ -18,7 +17,6 @@ async function findEntry(stream, filename) {
|
||||
let foundEntry = null;
|
||||
|
||||
stream
|
||||
.pipe(gunzip())
|
||||
.pipe(tar.extract())
|
||||
.on('error', reject)
|
||||
.on('entry', async (header, stream, next) => {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import gunzip from 'gunzip-maybe';
|
||||
import tar from 'tar-stream';
|
||||
|
||||
import asyncHandler from '../utils/asyncHandler.js';
|
||||
@ -13,7 +12,6 @@ async function findEntry(stream, filename) {
|
||||
let foundEntry = null;
|
||||
|
||||
stream
|
||||
.pipe(gunzip())
|
||||
.pipe(tar.extract())
|
||||
.on('error', reject)
|
||||
.on('entry', async (header, stream, next) => {
|
||||
|
Reference in New Issue
Block a user