@miso.ai/server-commons 0.6.3-beta.17 → 0.6.3-beta.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -20,5 +20,5 @@
20
20
  "uuid": "^9.0.0",
21
21
  "yargs": "^17.5.1"
22
22
  },
23
- "version": "0.6.3-beta.17"
23
+ "version": "0.6.3-beta.19"
24
24
  }
@@ -76,10 +76,11 @@ export default class BufferedWriteStream extends Transform {
76
76
  done();
77
77
  }
78
78
 
79
- async _transform(record, _) {
79
+ async _transform(record, _, next) {
80
80
  this._pushStartEventIfNecessary();
81
81
  this._dispatchAll(this._buffer.push(record));
82
82
  await this._pauseIfNecessary();
83
+ next();
83
84
  }
84
85
 
85
86
  async _flush(done) {
@@ -49,13 +49,14 @@ export default class DiffStream extends Transform {
49
49
  }
50
50
  }
51
51
 
52
- async _transform(value, _) {
52
+ _transform(value, _, next) {
53
53
  if (value instanceof Buffer) {
54
54
  value = value.toString();
55
55
  }
56
56
  // dedupe
57
57
  const input = this._inputDataSet;
58
58
  if (input.has(value)) {
59
+ next();
59
60
  return;
60
61
  }
61
62
  input.add(value);
@@ -66,6 +67,7 @@ export default class DiffStream extends Transform {
66
67
  } else {
67
68
  this._output(true, value);
68
69
  }
70
+ next();
69
71
  }
70
72
 
71
73
  async _flush(done) {
@@ -65,7 +65,7 @@ export function take(n, { transform: _, ...options } = {}) {
65
65
  let count = 0;
66
66
  return new Transform({
67
67
  ...options,
68
- transform (chunk, _, next) {
68
+ transform(chunk, _, next) {
69
69
  if (count > n) {
70
70
  next(undefined);
71
71
  this.end();