UNPKG

worktree-tool

Version:

A command-line tool for managing Git worktrees with integrated tmux/shell session management

20 lines 792 B
import { WorktreeToolError } from "../../utils/errors.js"; import { BackgroundMode } from "./background.js"; import { ExitMode } from "./exit.js"; import { InlineMode } from "./inline.js"; import { WindowMode } from "./window.js"; export function createExecutionMode(mode, config, logger) { switch (mode) { case "window": return new WindowMode(config, logger); case "inline": return new InlineMode(logger); case "background": return new BackgroundMode(config, logger); case "exit": return new ExitMode(config, logger); default: throw new WorktreeToolError(`Unknown execution mode: ${mode}`, "Valid modes are: window, inline, background, exit"); } } //# sourceMappingURL=factory.js.map