@meistrari/sandbox-sdk 1.0.6 → 1.0.7

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 CHANGED
@@ -289,7 +289,7 @@ class SandboxClient {
289
289
  throw await FetchError.from(url, "POST", res);
290
290
  }
291
291
  let capturedRunId;
292
- let receivedDone = false;
292
+ let receivedTerminalEvent = false;
293
293
  let stdoutCharsEmitted = 0;
294
294
  let stderrCharsEmitted = 0;
295
295
  const streamStartMs = Date.now();
@@ -344,7 +344,7 @@ class SandboxClient {
344
344
  capturedRunId = event.runId;
345
345
  }
346
346
  if (event.type === "done" || event.type === "error") {
347
- receivedDone = true;
347
+ receivedTerminalEvent = true;
348
348
  }
349
349
  if (event.type === "stdout" && event.content) {
350
350
  stdoutCharsEmitted += event.content.length;
@@ -355,7 +355,7 @@ class SandboxClient {
355
355
  yield event;
356
356
  }
357
357
  } catch (error) {
358
- if (receivedDone) {
358
+ if (receivedTerminalEvent) {
359
359
  return;
360
360
  }
361
361
  if (!capturedRunId) {
@@ -364,7 +364,7 @@ class SandboxClient {
364
364
  yield* recoverViaPolling(this, capturedRunId, stdoutCharsEmitted, stderrCharsEmitted);
365
365
  return;
366
366
  }
367
- if (!receivedDone && capturedRunId) {
367
+ if (!receivedTerminalEvent && capturedRunId) {
368
368
  yield* recoverViaPolling(this, capturedRunId, stdoutCharsEmitted, stderrCharsEmitted);
369
369
  }
370
370
  }
package/dist/index.mjs CHANGED
@@ -287,7 +287,7 @@ class SandboxClient {
287
287
  throw await FetchError.from(url, "POST", res);
288
288
  }
289
289
  let capturedRunId;
290
- let receivedDone = false;
290
+ let receivedTerminalEvent = false;
291
291
  let stdoutCharsEmitted = 0;
292
292
  let stderrCharsEmitted = 0;
293
293
  const streamStartMs = Date.now();
@@ -342,7 +342,7 @@ class SandboxClient {
342
342
  capturedRunId = event.runId;
343
343
  }
344
344
  if (event.type === "done" || event.type === "error") {
345
- receivedDone = true;
345
+ receivedTerminalEvent = true;
346
346
  }
347
347
  if (event.type === "stdout" && event.content) {
348
348
  stdoutCharsEmitted += event.content.length;
@@ -353,7 +353,7 @@ class SandboxClient {
353
353
  yield event;
354
354
  }
355
355
  } catch (error) {
356
- if (receivedDone) {
356
+ if (receivedTerminalEvent) {
357
357
  return;
358
358
  }
359
359
  if (!capturedRunId) {
@@ -362,7 +362,7 @@ class SandboxClient {
362
362
  yield* recoverViaPolling(this, capturedRunId, stdoutCharsEmitted, stderrCharsEmitted);
363
363
  return;
364
364
  }
365
- if (!receivedDone && capturedRunId) {
365
+ if (!receivedTerminalEvent && capturedRunId) {
366
366
  yield* recoverViaPolling(this, capturedRunId, stdoutCharsEmitted, stderrCharsEmitted);
367
367
  }
368
368
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/sandbox-sdk",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {