Skip to content

feat: split batch and snapshot into commands - #126

Open
yusukebe wants to merge 1 commit into
nextfrom
feat/request-snapshot
Open

feat: split batch and snapshot into commands#126
yusukebe wants to merge 1 commit into
nextfrom
feat/request-snapshot

Conversation

@yusukebe

@yusukebe yusukebe commented Sep 5, 2026

Copy link
Copy Markdown
Member

--batch and the new snapshot mode rejected almost every single-request option — the sign of separate commands under one flag. Now: hono batch <source> [file] runs JSONL lines, and hono snapshot [file] prints the current behavior as batch lines to stdout (paramless GET routes carry their actual response as expect, plus one probe line for the not-found behavior). The taxonomy: routes never sends a request; request, batch, snapshot exist to send them.

Also fixed on the way: hono snapshot | hono batch - piping (stdin is now read as a stream — the sync read failed with EAGAIN on a pipe), and old --batch/--snapshot flags answer with the new command.

Merge #125 first — I will resolve the overlap here after.

The author should do the following, if applicable

  • Add tests
  • Run tests
  • pnpm run format:fix && pnpm run lint:fix to format the code
  • Add TSDoc/JSDoc to document the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant