Commit 5e71007
authored
feat(js): expose real filesystem mounts with per-mount readOnly support (#1077)
## Summary
- Add `MountConfig` napi object and `mounts` option to `BashOptions` for
configuring real filesystem mounts at construction time (host path,
optional VFS path, optional readOnly flag defaulting to true)
- Add `mountReal(hostPath, vfsPath, readOnly?)` and `unmount(vfsPath)`
runtime methods to both `Bash` and `BashTool` classes
- Mount configs stored in `SharedState` and re-applied on `reset()` for
consistency
- Enable `realfs` feature in bashkit-js Cargo.toml dependency
- Fix pre-existing broken code: add missing `shared_state_from_opts`
function and fix stale `build_bash` reference in `BashTool::reset`
- Add 3 integration tests for runtime mount/unmount (readonly,
readwrite, unmount verification)
Closes #1066
## Test plan
- [x] `cargo check -p bashkit-js` compiles cleanly
- [x] `cargo fmt` passes
- [x] 3 new `runtime_mount_*` / `runtime_unmount` tests pass in
`realfs_tests.rs`
- [ ] CI green1 parent 4a787fa commit 5e71007
File tree
3 files changed
+339
-141
lines changed- crates
- bashkit-js
- src
- bashkit/tests
3 files changed
+339
-141
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments