@cloudflare/sandbox 0.5.3 → 0.5.6
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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +28 -0
- package/Dockerfile +1 -4
- package/README.md +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/clients/interpreter-client.ts +6 -0
- package/src/file-stream.ts +6 -0
- package/src/sse-parser.ts +3 -0
- package/src/version.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/sandbox",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/cloudflare/sandbox-sdk"
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"@cloudflare/containers": "^0.0.30"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@openai/agents": "^0.3.
|
|
14
|
+
"@openai/agents": "^0.3.3",
|
|
15
15
|
"@repo/shared": "^0.0.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
|
-
"@openai/agents": "^0.3.
|
|
18
|
+
"@openai/agents": "^0.3.3"
|
|
19
19
|
},
|
|
20
20
|
"peerDependenciesMeta": {
|
|
21
21
|
"@openai/agents": {
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"check": "biome check && npm run typecheck",
|
|
35
35
|
"fix": "biome check --fix && npm run typecheck",
|
|
36
36
|
"typecheck": "tsc --noEmit",
|
|
37
|
-
"docker:local": "cd ../.. && docker build -f packages/sandbox/Dockerfile --build-arg SANDBOX_VERSION=$npm_package_version -t cloudflare/sandbox-test:$npm_package_version .",
|
|
38
|
-
"docker:publish": "cd ../.. && docker buildx build --platform linux/amd64
|
|
39
|
-
"docker:publish:beta": "cd ../.. && docker buildx build --platform linux/amd64
|
|
37
|
+
"docker:local": "cd ../.. && docker build -f packages/sandbox/Dockerfile --platform linux/amd64 --build-arg SANDBOX_VERSION=$npm_package_version -t cloudflare/sandbox-test:$npm_package_version .",
|
|
38
|
+
"docker:publish": "cd ../.. && docker buildx build --platform linux/amd64 -f packages/sandbox/Dockerfile --build-arg SANDBOX_VERSION=$npm_package_version -t cloudflare/sandbox:$npm_package_version --push .",
|
|
39
|
+
"docker:publish:beta": "cd ../.. && docker buildx build --platform linux/amd64 -f packages/sandbox/Dockerfile --build-arg SANDBOX_VERSION=$npm_package_version -t cloudflare/sandbox:$npm_package_version-beta --push .",
|
|
40
40
|
"test": "vitest run --config vitest.config.ts \"$@\"",
|
|
41
41
|
"test:e2e": "cd ../.. && vitest run --config vitest.e2e.config.ts \"$@\""
|
|
42
42
|
},
|
|
@@ -267,6 +267,12 @@ export class InterpreterClient extends BaseHttpClient {
|
|
|
267
267
|
yield buffer;
|
|
268
268
|
}
|
|
269
269
|
} finally {
|
|
270
|
+
// Cancel the stream first to properly terminate HTTP connections when breaking early
|
|
271
|
+
try {
|
|
272
|
+
await reader.cancel();
|
|
273
|
+
} catch {
|
|
274
|
+
// Ignore cancel errors (stream may already be closed)
|
|
275
|
+
}
|
|
270
276
|
reader.releaseLock();
|
|
271
277
|
}
|
|
272
278
|
}
|
package/src/file-stream.ts
CHANGED
|
@@ -37,6 +37,12 @@ async function* parseSSE(
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
} finally {
|
|
40
|
+
// Cancel the stream first to properly terminate HTTP connections when breaking early
|
|
41
|
+
try {
|
|
42
|
+
await reader.cancel();
|
|
43
|
+
} catch {
|
|
44
|
+
// Ignore cancel errors (stream may already be closed)
|
|
45
|
+
}
|
|
40
46
|
reader.releaseLock();
|
|
41
47
|
}
|
|
42
48
|
}
|
package/src/sse-parser.ts
CHANGED
package/src/version.ts
CHANGED