fix(core): update
This commit is contained in:
@@ -53,13 +53,13 @@ export class ArchiveAnalyzer {
|
||||
readableObjectMode: true,
|
||||
writeAndTransformFunction: async (chunkArg: Buffer, streamtools) => {
|
||||
const fileType = await plugins.fileType.fileTypeFromBuffer(chunkArg);
|
||||
const decompressionStream = this.getDecompressionStream(fileType.mime as any);
|
||||
const decompressionStream = this.getDecompressionStream(fileType?.mime as any);
|
||||
resultStream.push(chunkArg);
|
||||
if (firstRun) {
|
||||
firstRun = false;
|
||||
const result: IAnalyzedResult = {
|
||||
fileType,
|
||||
isArchive: await this.mimeTypeIsArchive(fileType.mime),
|
||||
isArchive: await this.mimeTypeIsArchive(fileType?.mime),
|
||||
resultStream,
|
||||
decompressionStream,
|
||||
};
|
||||
@@ -68,6 +68,10 @@ export class ArchiveAnalyzer {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
finalFunction: async (tools) => {
|
||||
resultStream.push(null);
|
||||
return null;
|
||||
}
|
||||
});
|
||||
return analyzerstream;
|
||||
}
|
||||
|
Reference in New Issue
Block a user