|
1 | 1 | # @upstash/box |
2 | 2 |
|
| 3 | +## 0.7.1 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- b840209: Add `box.exec.session()` — a live, interactive command session over a WebSocket. |
| 8 | + |
| 9 | + Unlike `exec.command` / `exec.stream`, which run a command and hand back its |
| 10 | + result, a session returns a handle to a _running_ process: |
| 11 | + - `argv` runs a program directly (no shell); `cmd` runs one via `bash -lc`. |
| 12 | + - `write()` sends stdin, `endStdin()` closes it so a command reading to EOF can |
| 13 | + finish, and `onStdout` / `onStderr` receive output as it arrives (separate |
| 14 | + streams unless `tty` is set). |
| 15 | + - `tty` allocates a real PTY sized by `rows`/`cols`, with `resize()` for later |
| 16 | + changes — enough for interactive programs and terminal UIs. |
| 17 | + - `kill(signal)` sends an allowlisted signal; `terminate(graceMs)` asks the |
| 18 | + server for SIGTERM then SIGKILL after the grace. |
| 19 | + - `wait()` resolves with the exit code; `close()` hangs up, which also stops the |
| 20 | + process. |
| 21 | + |
| 22 | + Node-only: authentication uses a request header, which browsers cannot set on a |
| 23 | + WebSocket handshake. `ws` moves from a dev dependency to a runtime dependency; |
| 24 | + the public types stay free of `@types/ws`. |
| 25 | + |
| 26 | +- cc370f8: Add filesystem metadata operations to `box.files`: |
| 27 | + - `stat(path, { follow })` — type (file/directory/symlink/other), size, mtime, |
| 28 | + inode, and an opaque `version` token for optimistic-concurrency guards. |
| 29 | + Defaults to lstat; `follow: true` dereferences a final symlink. |
| 30 | + - `mkdir(path, { parents })`, `rename(from, to)`, `remove(path, { recursive })`. |
| 31 | + - `read(path, { offset, length })` — bounded byte-range read, so a large file can |
| 32 | + be sliced instead of pulled whole. |
| 33 | + |
3 | 34 | ## 0.7.0 |
4 | 35 |
|
5 | 36 | ### Minor Changes |
|
0 commit comments