Skip to content

refactor: split src/handlers/bash.ts into focused modules#179

Merged
sakebomb merged 1 commit into
mainfrom
refactor/split-bash-handlers-177
May 10, 2026
Merged

refactor: split src/handlers/bash.ts into focused modules#179
sakebomb merged 1 commit into
mainfrom
refactor/split-bash-handlers-177

Conversation

@sakebomb
Copy link
Copy Markdown
Owner

Summary

  • bash.ts was 699 lines with four handlers over 50 lines; extracted into four focused modules
  • bash-shared.tsextractStdout, extractStderr, extractCommand, and the four MAX_* constants
  • bash-git.tsgitDiffHandler, gitLogHandler, gitStatusHandler
  • bash-test.tstestRunnerHandler
  • bash-docker.tsdockerPsHandler
  • bash.ts retains terraformPlanHandler, packageInstallHandler, buildToolHandler, ghHandler, and the getBashHandler dispatcher (~300 lines); all original exports re-exported so no import sites changed

Closes #177

Test plan

  • bun run typecheck — clean, no errors
  • bun test tests/handlers.test.ts — 211 pass, 0 fail
  • bun test (full suite) — 693 tests, 0 fail

bash.ts was 699 lines with four functions over 50 lines. Extracted into:
- bash-shared.ts — extractStdout/Stderr/Command helpers + four constants
- bash-git.ts — gitDiffHandler, gitLogHandler, gitStatusHandler
- bash-test.ts — testRunnerHandler
- bash-docker.ts — dockerPsHandler

bash.ts now holds terraformPlanHandler, packageInstallHandler,
buildToolHandler, ghHandler, and the getBashHandler dispatcher (~300 lines).
All exports remain on bash.ts via re-exports so no import sites changed.
@sakebomb sakebomb merged commit 08c4d9d into main May 10, 2026
3 checks passed
@sakebomb sakebomb deleted the refactor/split-bash-handlers-177 branch May 10, 2026 23:06
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.

refactor: split src/handlers/bash.ts into focused handler modules

1 participant