@miso.ai/server-commons 0.6.3-beta.18 → 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 +1 -1
- package/src/stream/buffered-write.js +2 -1
- package/src/stream/diff.js +3 -1
- package/src/stream/misc.js +1 -1
package/package.json
CHANGED
|
@@ -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) {
|
package/src/stream/diff.js
CHANGED
|
@@ -49,13 +49,14 @@ export default class DiffStream extends Transform {
|
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
|
|
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) {
|
package/src/stream/misc.js
CHANGED