diff --git a/.changeset/add-exists-method.md b/.changeset/add-exists-method.md deleted file mode 100644 index 4e3942de..00000000 --- a/.changeset/add-exists-method.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -"@cloudflare/sandbox": patch ---- - -Add exists() method to check if a file or directory exists - -This adds a new `exists()` method to the SDK that checks whether a file or directory exists at a given path. The method returns a boolean indicating existence, similar to Python's `os.path.exists()` and JavaScript's `fs.existsSync()`. - -The implementation is end-to-end: -- New `FileExistsResult` and `FileExistsRequest` types in shared package -- Handler endpoint at `/api/exists` in container layer -- Client method in `FileClient` and `Sandbox` classes -- Full test coverage (unit tests and E2E tests) diff --git a/CLAUDE.md b/CLAUDE.md index 8810ff57..fc132d57 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -96,7 +96,7 @@ npm run docker:rebuild # Rebuild container image locally (includes clean bui - Stable images when "Version Packages" PR is merged - Multi-arch builds (amd64, arm64) handled by CI -**Critical:** Docker image version MUST match npm package version (`@cloudflare/sandbox@0.4.7` → `cloudflare/sandbox:0.4.8`). This is enforced via `ARG SANDBOX_VERSION` in Dockerfile. +**Critical:** Docker image version MUST match npm package version (`@cloudflare/sandbox@0.4.7` → `cloudflare/sandbox:0.4.9`). This is enforced via `ARG SANDBOX_VERSION` in Dockerfile. ### Development Server diff --git a/examples/basic/Dockerfile b/examples/basic/Dockerfile index 1027627d..8d211445 100644 --- a/examples/basic/Dockerfile +++ b/examples/basic/Dockerfile @@ -1,12 +1,12 @@ # This image is unique to this repo, and you'll never need it. # Whenever you're integrating with sandbox SDK in your own project, # you should use the official image instead: -# FROM docker.io/cloudflare/sandbox:0.4.8 -FROM cloudflare/sandbox-test:0.4.8 +# FROM docker.io/cloudflare/sandbox:0.4.9 +FROM cloudflare/sandbox-test:0.4.9 # On a mac, you might need to actively pick up the # arm64 build of the image. -# FROM --platform=linux/arm64 cloudflare/sandbox-test:0.4.8 +# FROM --platform=linux/arm64 cloudflare/sandbox-test:0.4.9 # Expose the ports you want to expose EXPOSE 8080 diff --git a/examples/code-interpreter/Dockerfile b/examples/code-interpreter/Dockerfile index 4691fd1c..5839fc7d 100644 --- a/examples/code-interpreter/Dockerfile +++ b/examples/code-interpreter/Dockerfile @@ -1,9 +1,9 @@ # This image is unique to this repo, and you'll never need it. # Whenever you're integrating with sandbox SDK in your own project, # you should use the official image instead: -# FROM docker.io/cloudflare/sandbox:0.4.8 -FROM cloudflare/sandbox-test:0.4.8 +# FROM docker.io/cloudflare/sandbox:0.4.9 +FROM cloudflare/sandbox-test:0.4.9 # On a mac, you might need to actively pick up the # arm64 build of the image. -# FROM --platform=linux/arm64 cloudflare/sandbox-test:0.4.8 +# FROM --platform=linux/arm64 cloudflare/sandbox-test:0.4.9 diff --git a/examples/minimal/Dockerfile b/examples/minimal/Dockerfile index 0560f021..b44d6eb8 100644 --- a/examples/minimal/Dockerfile +++ b/examples/minimal/Dockerfile @@ -1,7 +1,7 @@ -FROM docker.io/cloudflare/sandbox:0.4.8 +FROM docker.io/cloudflare/sandbox:0.4.9 # On a Mac with Apple Silicon, you might need to specify the platform: -# FROM --platform=linux/arm64 docker.io/cloudflare/sandbox:0.4.8 +# FROM --platform=linux/arm64 docker.io/cloudflare/sandbox:0.4.9 # Required during local development to access exposed ports EXPOSE 8080 diff --git a/package-lock.json b/package-lock.json index d8258ce8..7251c04b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9940,7 +9940,7 @@ }, "packages/sandbox": { "name": "@cloudflare/sandbox", - "version": "0.4.8", + "version": "0.4.9", "license": "ISC", "dependencies": { "@cloudflare/containers": "^0.0.28" diff --git a/packages/sandbox/CHANGELOG.md b/packages/sandbox/CHANGELOG.md index cf543b2a..7d6de5eb 100644 --- a/packages/sandbox/CHANGELOG.md +++ b/packages/sandbox/CHANGELOG.md @@ -1,5 +1,20 @@ # @cloudflare/sandbox +## 0.4.9 + +### Patch Changes + +- [#152](https://github.com/cloudflare/sandbox-sdk/pull/152) [`8e7773e`](https://github.com/cloudflare/sandbox-sdk/commit/8e7773ec9571a5f968cbbc5f48e38e01d7d13b77) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Add exists() method to check if a file or directory exists + + This adds a new `exists()` method to the SDK that checks whether a file or directory exists at a given path. The method returns a boolean indicating existence, similar to Python's `os.path.exists()` and JavaScript's `fs.existsSync()`. + + The implementation is end-to-end: + + - New `FileExistsResult` and `FileExistsRequest` types in shared package + - Handler endpoint at `/api/exists` in container layer + - Client method in `FileClient` and `Sandbox` classes + - Full test coverage (unit tests and E2E tests) + ## 0.4.8 ### Patch Changes diff --git a/packages/sandbox/package.json b/packages/sandbox/package.json index 7b9b09b6..8f0574a8 100644 --- a/packages/sandbox/package.json +++ b/packages/sandbox/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/sandbox", - "version": "0.4.8", + "version": "0.4.9", "repository": { "type": "git", "url": "https://github.com/cloudflare/sandbox-sdk" diff --git a/packages/sandbox/src/version.ts b/packages/sandbox/src/version.ts index 10018614..468248a0 100644 --- a/packages/sandbox/src/version.ts +++ b/packages/sandbox/src/version.ts @@ -3,4 +3,4 @@ * This file is auto-updated by .github/changeset-version.ts during releases * DO NOT EDIT MANUALLY - Changes will be overwritten on the next version bump */ -export const SDK_VERSION = '0.4.8'; +export const SDK_VERSION = '0.4.9'; diff --git a/tests/e2e/test-worker/Dockerfile b/tests/e2e/test-worker/Dockerfile index e80fb05f..2b0c1ad6 100644 --- a/tests/e2e/test-worker/Dockerfile +++ b/tests/e2e/test-worker/Dockerfile @@ -1,5 +1,5 @@ # Integration test Dockerfile -FROM docker.io/cloudflare/sandbox-test:0.4.8 +FROM docker.io/cloudflare/sandbox-test:0.4.9 # Expose ports used for testing EXPOSE 8080