The Python bindings expose mount_real_readonly_at, mount_real_readwrite_at, and dynamic mount/unmount. The JS bindings have none — the only way to populate the VFS is via the files option.
Requested API (parity with Python):
const bash = new Bash({
mounts: [
{ path: '/supabase/docs', root: '/real/path', readOnly: true },
],
})
// or
bash.mountRealReadonlyAt('/supabase/docs', docsDir)
bash.unmount('/supabase/docs')
Without native VFS-level readOnly, the only JS workaround is bash function overrides (rm() { echo EROFS; }), bypassable via command rm and redirections. The Rust crate already has OverlayFs with readOnly, and v0.1.13 added mount/unmount (#784). Python exposes it — JS should too.
The Python bindings expose mount_real_readonly_at, mount_real_readwrite_at, and dynamic mount/unmount. The JS bindings have none — the only way to populate the VFS is via the files option.
Requested API (parity with Python):
const bash = new Bash({
mounts: [
{ path: '/supabase/docs', root: '/real/path', readOnly: true },
],
})
// or
bash.mountRealReadonlyAt('/supabase/docs', docsDir)
bash.unmount('/supabase/docs')
Without native VFS-level readOnly, the only JS workaround is bash function overrides (rm() { echo EROFS; }), bypassable via command rm and redirections. The Rust crate already has OverlayFs with readOnly, and v0.1.13 added mount/unmount (#784). Python exposes it — JS should too.