fix(core): update

This commit is contained in:
Philipp Kunz 2023-11-13 20:34:21 +01:00
parent c77e0f2ba6
commit 28725d1723
2 changed files with 6 additions and 3 deletions

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartstream', name: '@push.rocks/smartstream',
version: '3.0.25', version: '3.0.26',
description: 'simplifies access to node streams' description: 'simplifies access to node streams'
} }

View File

@ -35,7 +35,7 @@ export class SmartDuplex<TInput = any, TOutput = any> extends Duplex {
} }
// INSTANCE // INSTANCE
private backpressuredArray = new plugins.lik.BackpressuredArray<TOutput>(); private backpressuredArray: plugins.lik.BackpressuredArray<TOutput>;
public options: ISmartDuplexOptions<TInput, TOutput>; public options: ISmartDuplexOptions<TInput, TOutput>;
private observableSubscription?: plugins.smartrx.rxjs.Subscription; private observableSubscription?: plugins.smartrx.rxjs.Subscription;
private debugLog(messageArg: string) { private debugLog(messageArg: string) {
@ -45,8 +45,11 @@ export class SmartDuplex<TInput = any, TOutput = any> extends Duplex {
} }
constructor(optionsArg?: ISmartDuplexOptions<TInput, TOutput>) { constructor(optionsArg?: ISmartDuplexOptions<TInput, TOutput>) {
super(optionsArg); super(Object.assign({
highWaterMark: 1,
}, optionsArg));
this.options = optionsArg; this.options = optionsArg;
this.backpressuredArray = new plugins.lik.BackpressuredArray<TOutput>(this.options.highWaterMark || 1)
} }
public async _read(size: number): Promise<void> { public async _read(size: number): Promise<void> {