fix(core): update

This commit is contained in:
2023-11-06 19:46:02 +01:00
parent 77e75ee0d9
commit 401150bd10
3 changed files with 7 additions and 17 deletions

View File

@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartarchive',
version: '4.0.1',
version: '4.0.2',
description: 'work with archives'
}

View File

@ -107,7 +107,8 @@ export class SmartArchive {
plugins.smartstream.createTransformFunction<IAnalyzedResult, any>(
async (analyzedResultChunk) => {
if (analyzedResultChunk.fileType.mime === 'application/x-tar') {
(analyzedResultChunk.decompressionStream as plugins.tarStream.Extract).on(
const tarStream = analyzedResultChunk.decompressionStream as plugins.tarStream.Extract;
tarStream.on(
'entry',
async (header, stream, next) => {
const streamfile = plugins.smartfile.StreamFile.fromStream(stream, header.name);
@ -117,6 +118,9 @@ export class SmartArchive {
});
}
);
tarStream.on('finish', function () {
streamFileIntake.signalEnd();
})
analyzedResultChunk.resultStream.pipe(analyzedResultChunk.decompressionStream);
} else if (analyzedResultChunk.isArchive && analyzedResultChunk.decompressionStream) {
analyzedResultChunk.resultStream