From 2cacfcf9905e91918c0ab1e126d80fade6a1b38b Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Fri, 17 May 2024 19:09:00 +0200 Subject: [PATCH] fix(core): update --- ts/00_commitinfo_data.ts | 2 +- ts/smartbucket.classes.bucket.ts | 6 +++--- ts/smartbucket.classes.directory.ts | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index b1193d5..784d886 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@push.rocks/smartbucket', - version: '3.0.0', + version: '3.0.1', description: 'A TypeScript library for simple cloud independent object storage with support for buckets, directories, and files.' } diff --git a/ts/smartbucket.classes.bucket.ts b/ts/smartbucket.classes.bucket.ts index 88d6038..c84e7ed 100644 --- a/ts/smartbucket.classes.bucket.ts +++ b/ts/smartbucket.classes.bucket.ts @@ -96,14 +96,14 @@ export class Bucket { .getObject(this.name, optionsArg.path) .catch((e) => console.log(e)); const replaySubject = new plugins.smartrx.rxjs.ReplaySubject(); - const duplexStream = new plugins.smartstream.SmartDuplex({ + const duplexStream = new plugins.smartstream.SmartDuplex({ writeFunction: async (chunk) => { replaySubject.next(chunk); - return chunk; + return; }, finalFunction: async (cb) => { replaySubject.complete(); - return Buffer.from(''); + return; } }); diff --git a/ts/smartbucket.classes.directory.ts b/ts/smartbucket.classes.directory.ts index d3573a4..ced2763 100644 --- a/ts/smartbucket.classes.directory.ts +++ b/ts/smartbucket.classes.directory.ts @@ -71,6 +71,7 @@ export class Directory { ); const fileArray: File[] = []; const duplexStream = new plugins.smartstream.SmartDuplex({ + objectMode: true, writeFunction: async (bucketItem) => { if (bucketItem.prefix) { return; @@ -113,6 +114,7 @@ export class Directory { ); const directoryArray: Directory[] = []; const duplexStream = new plugins.smartstream.SmartDuplex({ + objectMode: true, writeFunction: async (bucketItem) => { if (bucketItem.name) { return;