ppio-sandbox 2.1.1-a6 → 2.1.1-a7

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.
@@ -9,7 +9,7 @@ import {
9
9
  __forAwait,
10
10
  __spreadProps,
11
11
  __spreadValues
12
- } from "./chunk-KWBEO77A.mjs";
12
+ } from "./chunk-3FDSHOTR.mjs";
13
13
 
14
14
  // src/code-interpreter/messaging.ts
15
15
  async function extractError(res) {
@@ -465,4 +465,4 @@ Sandbox2.defaultTemplate = "code-interpreter-v1";
465
465
  export {
466
466
  Sandbox2 as Sandbox
467
467
  };
468
- //# sourceMappingURL=chunk-CMNTW7II.mjs.map
468
+ //# sourceMappingURL=chunk-2JB7PIKB.mjs.map
@@ -60,7 +60,7 @@ import createClient from "openapi-fetch";
60
60
  import platform2 from "platform";
61
61
 
62
62
  // package.json
63
- var version = "2.1.1-a6";
63
+ var version = "2.1.1-a7";
64
64
 
65
65
  // src/core/utils.ts
66
66
  import platform from "platform";
@@ -122,6 +122,9 @@ function toBlob(data) {
122
122
  if (data instanceof Blob) {
123
123
  return data;
124
124
  }
125
+ if (data instanceof Uint8Array) {
126
+ return new Blob([new Uint8Array(data)]);
127
+ }
125
128
  if (typeof data === "string" || data instanceof ArrayBuffer) {
126
129
  return new Blob([data]);
127
130
  }
@@ -132,7 +135,7 @@ function shellQuote(s) {
132
135
  }
133
136
  async function toUploadBody(data, gzip) {
134
137
  if (gzip) {
135
- const stream = data instanceof ReadableStream ? data : data instanceof Blob ? data.stream() : new Blob([data]).stream();
138
+ const stream = data instanceof ReadableStream ? data : (await toBlob(data)).stream();
136
139
  const compressed = stream.pipeThrough(new CompressionStream("gzip"));
137
140
  return new Response(compressed).blob();
138
141
  }
@@ -3619,9 +3622,6 @@ var SandboxApi = class {
3619
3622
  const config = new ConnectionConfig(opts);
3620
3623
  const longRunning = ((_a3 = opts == null ? void 0 : opts.metadata) == null ? void 0 : _a3.long_running) === "true";
3621
3624
  const metadata = longRunning ? __spreadValues({}, opts == null ? void 0 : opts.metadata) : opts == null ? void 0 : opts.metadata;
3622
- if (longRunning) {
3623
- metadata == null ? true : delete metadata.idle_timeout;
3624
- }
3625
3625
  const timeout = longRunning ? void 0 : timeoutToSeconds(timeoutMs);
3626
3626
  const lifecycle = getLifecycle(opts);
3627
3627
  const autoPause = lifecycle.onTimeout === "pause";
@@ -7929,12 +7929,12 @@ var PPIO = class {
7929
7929
  this.secret = new SecretNamespace(opts);
7930
7930
  this.codeInterpreter = new RuntimeSandboxNamespace(
7931
7931
  opts,
7932
- () => import("./sandbox-SEHZLHQY.mjs")
7932
+ () => import("./sandbox-YOWIOKTV.mjs")
7933
7933
  );
7934
7934
  this.code_interpreter = this.codeInterpreter;
7935
7935
  this.desktop = new RuntimeSandboxNamespace(
7936
7936
  opts,
7937
- () => import("./sandbox-T2TK45W6.mjs")
7937
+ () => import("./sandbox-TEFWZI7X.mjs")
7938
7938
  );
7939
7939
  }
7940
7940
  async create(templateOrOpts, opts) {
@@ -8013,4 +8013,4 @@ export {
8013
8013
  ALL_TRAFFIC,
8014
8014
  core_default
8015
8015
  };
8016
- //# sourceMappingURL=chunk-KWBEO77A.mjs.map
8016
+ //# sourceMappingURL=chunk-3FDSHOTR.mjs.map