- Use function replacer in rewriteBody to prevent $& / $$ / $` / $' pattern
corruption when alt text or siteUrl contains dollar-sign sequences
- Detect empty staged index after `git add -A` and throw a clear
"No changes to publish" error instead of a cryptic git failure
- Correct README flat-slug description: single image → <slug>.<ext>,
multiple → <slug>-1.<ext>, <slug>-2.<ext> (original filename discarded)
- Harden askpass dir resolution: show a Notice and return early if
getFullPath is absent (desktop-only guard), rather than passing a bad path
Co-Authored-By: Claude <noreply@anthropic.com>
- Wrap onPrompt in try/catch in connection handler; on rejection send
empty reply ("\n") so the git/ssh helper exits promptly instead of
hanging indefinitely.
- Reject the start() promise on server 'error' events (e.g. EADDRINUSE)
so callers get a fast failure rather than an eternal hang.
- stop() now unlinks the socket file and helper script to prevent stale-
socket errors on subsequent start() calls with the same dir.
- start() best-effort unlinks a pre-existing stale socket before listen().
- Tests: added onPrompt-rejection (with 3s timeout guard) and restart
(stop then start on same dir) test cases.
Co-Authored-By: Claude <noreply@anthropic.com>
formatValue now detects YAML-special tokens (true/false/null/yes/no/on/off/y/n/~)
and numeric-looking strings, quoting them via JSON.stringify so YAML parsers
cannot misread them as booleans or numbers. ISO date strings (YYYY-MM-DD) are
exempt and remain bare for readability. Adds four covering tests.
Co-Authored-By: Claude <noreply@anthropic.com>