Skip to content

feat: split batch and snapshot into commands - #126

Merged
yusukebe merged 2 commits into
nextfrom
feat/request-snapshot
Sep 7, 2026
Merged

feat: split batch and snapshot into commands#126
yusukebe merged 2 commits 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

@yusukebe
yusukebe merged commit b87dd69 into next Sep 7, 2026
4 checks passed
@yusukebe
yusukebe deleted the feat/request-snapshot branch September 7, 2026 05:05
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