Fix/touched tables + improvements to dev#18
Conversation
packages/cli/src/commands/dev.ts: - Make cleanup() synchronous since watcher.close() is fire-and-forget - Suppress watcher.close() errors with .catch() packages/client/src/vite.ts: - Restrict plugin to serve mode with apply: "serve" - Change stdio from "inherit" to ["ignore", "pipe", "pipe"] - Pipe subprocess stdout/stderr explicitly to process streams
Greptile SummaryThis PR fixes the client invalidation metadata to include both read and changed ("touched") tables, and improves the dev tooling in several ways.
Confidence Score: 5/5Safe to merge — all changes are additive or fix previously reported bugs with no regressions on the critical RPC path. The RPC metadata fix is a straightforward union+deduplicate that is strictly more correct than the previous read-only approach. The dev-tooling changes (sync cleanup, stdio piping, apply:serve) are isolated to the CLI and Vite plugin and do not affect production runtime behaviour. The indentation fix in the generator corrects a previously flagged output bug. No files require special attention; packages/cli/src/commands/dev.ts has a minor cosmetic edge case around the force-kill timer on the error-exit path. Important Files Changed
|
Use a `Set` to remove duplicates from the combined read and changed table names before hashing, preventing redundant entries in the metadata.
Add `indentJson` helper to properly indent nested JSON objects in the generated migrations index, ensuring 2-space indentation for the journal object and 4-space indentation for migration entries.
No description provided.