Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/alien-bindings-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ platform-sdk = ["alien-bindings/platform-sdk"]
# so the gRPC feature is never pulled in transitively; platform features are
# forwarded explicitly above.
alien-bindings = { workspace = true }
alien-core = { workspace = true }
alien-error = { workspace = true }
futures = { workspace = true }
napi = { workspace = true }
Expand Down
10 changes: 10 additions & 0 deletions crates/alien-bindings-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ mod error;
mod kv;
mod postgres;
mod queue;
mod sandbox;
#[cfg(feature = "platform-sdk")]
mod remote_storage;
mod storage;
Expand All @@ -29,6 +30,7 @@ pub use container::ContainerHandle;
pub use kv::KvHandle;
pub use postgres::{PostgresConnectionJs, PostgresHandle};
pub use queue::QueueHandle;
pub use sandbox::{CommandFrameJs, CommandStreamHandle, SandboxHandle, SandboxSessionJs};
#[cfg(feature = "platform-sdk")]
pub use remote_storage::RemoteStorageHandle;
pub use storage::StorageHandle;
Expand Down Expand Up @@ -92,6 +94,14 @@ impl BindingsHandle {
Ok(VaultHandle::new(vault))
}

/// Resolve the sandbox binding named `name`.
#[napi]
pub async fn sandbox(&self, name: String) -> napi::Result<SandboxHandle> {
let inner = self.inner.clone();
let sandbox = inner.sandbox(&name).await.map_err(map_alien_error)?;
Ok(SandboxHandle::new(sandbox))
}

/// Resolve the linked-container binding named `name`.
#[napi]
pub async fn container(&self, name: String) -> napi::Result<ContainerHandle> {
Expand Down
Loading
Loading