@meistrari/sandbox-sdk 1.0.2 → 1.0.3
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/index.cjs +8 -8
- package/dist/index.mjs +8 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -290,8 +290,8 @@ class SandboxClient {
|
|
|
290
290
|
}
|
|
291
291
|
let capturedRunId;
|
|
292
292
|
let receivedDone = false;
|
|
293
|
-
let
|
|
294
|
-
let
|
|
293
|
+
let stdoutCharsEmitted = 0;
|
|
294
|
+
let stderrCharsEmitted = 0;
|
|
295
295
|
try {
|
|
296
296
|
for await (const event of parseSSEStream(res)) {
|
|
297
297
|
if (event.type === "run_created" && event.runId) {
|
|
@@ -301,10 +301,10 @@ class SandboxClient {
|
|
|
301
301
|
receivedDone = true;
|
|
302
302
|
}
|
|
303
303
|
if (event.type === "stdout" && event.content) {
|
|
304
|
-
|
|
304
|
+
stdoutCharsEmitted += event.content.length;
|
|
305
305
|
}
|
|
306
306
|
if (event.type === "stderr" && event.content) {
|
|
307
|
-
|
|
307
|
+
stderrCharsEmitted += event.content.length;
|
|
308
308
|
}
|
|
309
309
|
yield event;
|
|
310
310
|
}
|
|
@@ -327,11 +327,11 @@ class SandboxClient {
|
|
|
327
327
|
};
|
|
328
328
|
return;
|
|
329
329
|
}
|
|
330
|
-
if (run.stdout && run.stdout.length >
|
|
331
|
-
yield { type: "stdout", content: run.stdout.slice(
|
|
330
|
+
if (run.stdout && run.stdout.length > stdoutCharsEmitted) {
|
|
331
|
+
yield { type: "stdout", content: run.stdout.slice(stdoutCharsEmitted) };
|
|
332
332
|
}
|
|
333
|
-
if (run.stderr && run.stderr.length >
|
|
334
|
-
yield { type: "stderr", content: run.stderr.slice(
|
|
333
|
+
if (run.stderr && run.stderr.length > stderrCharsEmitted) {
|
|
334
|
+
yield { type: "stderr", content: run.stderr.slice(stderrCharsEmitted) };
|
|
335
335
|
}
|
|
336
336
|
yield {
|
|
337
337
|
type: "done",
|
package/dist/index.mjs
CHANGED
|
@@ -288,8 +288,8 @@ class SandboxClient {
|
|
|
288
288
|
}
|
|
289
289
|
let capturedRunId;
|
|
290
290
|
let receivedDone = false;
|
|
291
|
-
let
|
|
292
|
-
let
|
|
291
|
+
let stdoutCharsEmitted = 0;
|
|
292
|
+
let stderrCharsEmitted = 0;
|
|
293
293
|
try {
|
|
294
294
|
for await (const event of parseSSEStream(res)) {
|
|
295
295
|
if (event.type === "run_created" && event.runId) {
|
|
@@ -299,10 +299,10 @@ class SandboxClient {
|
|
|
299
299
|
receivedDone = true;
|
|
300
300
|
}
|
|
301
301
|
if (event.type === "stdout" && event.content) {
|
|
302
|
-
|
|
302
|
+
stdoutCharsEmitted += event.content.length;
|
|
303
303
|
}
|
|
304
304
|
if (event.type === "stderr" && event.content) {
|
|
305
|
-
|
|
305
|
+
stderrCharsEmitted += event.content.length;
|
|
306
306
|
}
|
|
307
307
|
yield event;
|
|
308
308
|
}
|
|
@@ -325,11 +325,11 @@ class SandboxClient {
|
|
|
325
325
|
};
|
|
326
326
|
return;
|
|
327
327
|
}
|
|
328
|
-
if (run.stdout && run.stdout.length >
|
|
329
|
-
yield { type: "stdout", content: run.stdout.slice(
|
|
328
|
+
if (run.stdout && run.stdout.length > stdoutCharsEmitted) {
|
|
329
|
+
yield { type: "stdout", content: run.stdout.slice(stdoutCharsEmitted) };
|
|
330
330
|
}
|
|
331
|
-
if (run.stderr && run.stderr.length >
|
|
332
|
-
yield { type: "stderr", content: run.stderr.slice(
|
|
331
|
+
if (run.stderr && run.stderr.length > stderrCharsEmitted) {
|
|
332
|
+
yield { type: "stderr", content: run.stderr.slice(stderrCharsEmitted) };
|
|
333
333
|
}
|
|
334
334
|
yield {
|
|
335
335
|
type: "done",
|