fix(core): update

This commit is contained in:
2023-11-13 22:11:24 +01:00
parent 21da75c09a
commit f87359fb97
5 changed files with 22 additions and 16 deletions

View File

@@ -42,13 +42,13 @@ export class ArchiveAnalyzer {
return this.smartArchiveRef.tarTools.getDecompressionStream(); // replace with your own tar decompression stream
default:
// Handle unsupported formats or no decompression needed
return new plugins.smartstream.PassThrough();
return plugins.smartstream.createPassThrough();
}
}
public getAnalyzedStream() {
let firstRun = true;
const resultStream = new plugins.smartstream.PassThrough();
const resultStream = plugins.smartstream.createPassThrough();
const analyzerstream = new plugins.smartstream.SmartDuplex<Buffer, IAnalyzedResult>({
readableObjectMode: true,
writeFunction: async (chunkArg: Buffer, streamtools) => {
@@ -63,8 +63,7 @@ export class ArchiveAnalyzer {
resultStream,
decompressionStream,
};
streamtools.push(result);
streamtools.push(null);
await streamtools.push(result);
return null;
}
},