@naturalcycles/nodejs-lib 15.135.0 → 15.135.1
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.
|
@@ -36,7 +36,7 @@ export function writableChunk(splitPredicate, fn, opt = {}) {
|
|
|
36
36
|
logger.debug(`WritableChunk(${splitIndex}): pause`);
|
|
37
37
|
}
|
|
38
38
|
if (splitPredicate(chunk, ++indexWritten)) {
|
|
39
|
-
logger.
|
|
39
|
+
logger.debug(`WritableChunk(${splitIndex}): splitting to ${splitIndex + 1}`);
|
|
40
40
|
splitIndex++;
|
|
41
41
|
fork.push(null);
|
|
42
42
|
lock?.resolve();
|
|
@@ -47,7 +47,7 @@ export function writableChunk(splitPredicate, fn, opt = {}) {
|
|
|
47
47
|
cb();
|
|
48
48
|
},
|
|
49
49
|
async final(cb) {
|
|
50
|
-
logger.
|
|
50
|
+
logger.debug(`WritableChunk: final`);
|
|
51
51
|
// Pushing null "closes"/ends the secondary pipeline correctly
|
|
52
52
|
fork.push(null);
|
|
53
53
|
// Acknowledge that we've received `null` and passed it through to the fork
|
|
@@ -67,7 +67,7 @@ export function writableChunk(splitPredicate, fn, opt = {}) {
|
|
|
67
67
|
lockCopy.resolve();
|
|
68
68
|
});
|
|
69
69
|
void fn(Pipeline.from(readable), currentSplitIndex).then(() => {
|
|
70
|
-
logger.
|
|
70
|
+
logger.debug(`WritableChunk(${currentSplitIndex}): done`);
|
|
71
71
|
});
|
|
72
72
|
return readable;
|
|
73
73
|
}
|
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ export function writableChunk<T>(
|
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
if (splitPredicate(chunk, ++indexWritten)) {
|
|
51
|
-
logger.
|
|
51
|
+
logger.debug(`WritableChunk(${splitIndex}): splitting to ${splitIndex + 1}`)
|
|
52
52
|
splitIndex++
|
|
53
53
|
fork.push(null)
|
|
54
54
|
lock?.resolve()
|
|
@@ -60,7 +60,7 @@ export function writableChunk<T>(
|
|
|
60
60
|
cb()
|
|
61
61
|
},
|
|
62
62
|
async final(cb) {
|
|
63
|
-
logger.
|
|
63
|
+
logger.debug(`WritableChunk: final`)
|
|
64
64
|
|
|
65
65
|
// Pushing null "closes"/ends the secondary pipeline correctly
|
|
66
66
|
fork.push(null)
|
|
@@ -84,7 +84,7 @@ export function writableChunk<T>(
|
|
|
84
84
|
})
|
|
85
85
|
|
|
86
86
|
void fn(Pipeline.from<T>(readable), currentSplitIndex).then(() => {
|
|
87
|
-
logger.
|
|
87
|
+
logger.debug(`WritableChunk(${currentSplitIndex}): done`)
|
|
88
88
|
})
|
|
89
89
|
|
|
90
90
|
return readable
|