Skip to content

Commit c4db459

Browse files
Websockets support (#162)
* websockets lightweight wrapper * fix formatting * fix ws * minor fixes * WIP * working draft * cleanup connect() * add more tests * minor nits and fixes * add unit tests * add more tests * Move basic example to tests/integration The examples/basic directory was primarily used for integration testing rather than as a standalone example. This moves it to tests/integration to reflect its actual purpose. Merged WebSocket example functionality into tests/integration since it shared the same testing infrastructure. Simplified WebSocket E2E tests by removing redundant test coverage and focusing on core transport-level functionality. * fix the build * Revert "fix the build" This reverts commit b915e85. * update lockfile * Update lockfile --------- Co-authored-by: Naresh <[email protected]>
1 parent 6b08f02 commit c4db459

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+6107
-6962
lines changed

.changeset/loud-nights-sneeze.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cloudflare/sandbox": patch
3+
---
4+
5+
Add WebSocket support via connect() method for routing client WebSocket connections directly to container services

.github/changeset-version.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ try {
6161
replacement: `cloudflare/sandbox-test:${newVersion}`,
6262
description: "Test Docker image reference",
6363
},
64+
// Example package.json dependencies
65+
{
66+
pattern: /"@cloudflare\/sandbox":\s*"\^[\d.]+"/g,
67+
replacement: `"@cloudflare/sandbox": "^${newVersion}"`,
68+
description: "Example package.json @cloudflare/sandbox dependencies",
69+
},
6470
];
6571

6672
// Files to search and update
@@ -73,6 +79,7 @@ try {
7379
"**/*.json", // JSON configs (but not package.json/package-lock.json)
7480
"**/*.yaml", // YAML configs
7581
"**/*.yml", // YML configs
82+
"examples/**/package.json", // Example package.json files (exception to ignore rule below)
7683
];
7784

7885
// Ignore patterns

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ npm run docker:rebuild # Rebuild container image locally (includes clean bui
9696
- Stable images when "Version Packages" PR is merged
9797
- Multi-arch builds (amd64, arm64) handled by CI
9898

99-
**Critical:** Docker image version MUST match npm package version (`@cloudflare/[email protected].7``cloudflare/sandbox:0.4.12`). This is enforced via `ARG SANDBOX_VERSION` in Dockerfile.
99+
**Critical:** Docker image version MUST match npm package version (`@cloudflare/[email protected].12``cloudflare/sandbox:0.4.12`). This is enforced via `ARG SANDBOX_VERSION` in Dockerfile.
100100

101101
### Development Server
102102

0 commit comments

Comments
 (0)