fix(core): update

This commit is contained in:
2023-11-08 17:01:48 +01:00
parent 95069fe5c0
commit 1323458130
5 changed files with 41 additions and 36 deletions

View File

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

View File

@ -51,7 +51,7 @@ export class ArchiveAnalyzer {
const resultStream = new plugins.smartstream.PassThrough();
const analyzerstream = new plugins.smartstream.SmartDuplex<Buffer, IAnalyzedResult>({
readableObjectMode: true,
writeAndTransformFunction: async (chunkArg: Buffer, streamtools) => {
writeFunction: async (chunkArg: Buffer, streamtools) => {
const fileType = await plugins.fileType.fileTypeFromBuffer(chunkArg);
const decompressionStream = this.getDecompressionStream(fileType?.mime as any);
resultStream.push(chunkArg);

View File

@ -79,7 +79,7 @@ export class SmartArchive {
const streamFileStream = await this.exportToStreamOfStreamFiles();
streamFileStream.pipe(new plugins.smartstream.SmartDuplex({
objectMode: true,
writeAndTransformFunction: async (chunkArg: plugins.smartfile.StreamFile, streamtools) => {
writeFunction: async (chunkArg: plugins.smartfile.StreamFile, streamtools) => {
console.log(chunkArg.relativeFilePath);
const streamFile = chunkArg;
const readStream = await streamFile.createReadStream();