@itsaplan/runner 0.8.0 → 0.8.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.
- package/dist/cli.js +8 -9
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -552,6 +552,7 @@ class AnswerStream {
|
|
|
552
552
|
send;
|
|
553
553
|
messageId;
|
|
554
554
|
queued = [];
|
|
555
|
+
unsent = [];
|
|
555
556
|
text = "";
|
|
556
557
|
started = false;
|
|
557
558
|
line = "";
|
|
@@ -603,15 +604,13 @@ class AnswerStream {
|
|
|
603
604
|
}
|
|
604
605
|
async sendQueued() {
|
|
605
606
|
this.drainText();
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
await this.send(
|
|
612
|
-
|
|
613
|
-
this.queued.unshift(...batch);
|
|
614
|
-
throw err;
|
|
607
|
+
while (this.unsent.length > 0 || this.queued.length > 0) {
|
|
608
|
+
if (this.unsent.length === 0) {
|
|
609
|
+
this.unsent = this.queued;
|
|
610
|
+
this.queued = [];
|
|
611
|
+
}
|
|
612
|
+
await this.send(this.unsent);
|
|
613
|
+
this.unsent = [];
|
|
615
614
|
}
|
|
616
615
|
}
|
|
617
616
|
async finish(fallback) {
|