@tuwaio/quasar-sdk 0.1.10 → 0.1.11
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.cjs +6 -3
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -47,7 +47,7 @@ var path = __toESM(require("path"), 1);
|
|
|
47
47
|
// package.json
|
|
48
48
|
var package_default = {
|
|
49
49
|
name: "@tuwaio/quasar-sdk",
|
|
50
|
-
version: "0.1.
|
|
50
|
+
version: "0.1.11",
|
|
51
51
|
private: false,
|
|
52
52
|
author: "Oleksandr Tkach",
|
|
53
53
|
license: "Apache-2.0",
|
|
@@ -323,14 +323,14 @@ async function runListen(options) {
|
|
|
323
323
|
const reader = response.body.getReader();
|
|
324
324
|
const decoder = new TextDecoder("utf-8");
|
|
325
325
|
let buffer = "";
|
|
326
|
+
let currentEvent = "message";
|
|
327
|
+
let currentData = "";
|
|
326
328
|
while (!isShuttingDown) {
|
|
327
329
|
const { done, value } = await reader.read();
|
|
328
330
|
if (done) break;
|
|
329
331
|
buffer += decoder.decode(value, { stream: true });
|
|
330
332
|
const lines = buffer.split("\n");
|
|
331
333
|
buffer = lines.pop() || "";
|
|
332
|
-
let currentEvent = "message";
|
|
333
|
-
let currentData = "";
|
|
334
334
|
for (const line of lines) {
|
|
335
335
|
const trimmed = line.trim();
|
|
336
336
|
if (!trimmed) {
|
|
@@ -341,6 +341,9 @@ async function runListen(options) {
|
|
|
341
341
|
}
|
|
342
342
|
continue;
|
|
343
343
|
}
|
|
344
|
+
if (trimmed.startsWith(":")) {
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
344
347
|
if (trimmed.startsWith("event:")) {
|
|
345
348
|
currentEvent = trimmed.slice(6).trim();
|
|
346
349
|
} else if (trimmed.startsWith("data:")) {
|