UNPKG

@elsikora/git-branch-lint

Version:
36 lines (35 loc) 2.37 kB
import type { BuildBranchNameUseCase } from "../../../application/use-cases/build-branch-name.use-case"; import type { CheckWorkingDirectoryUseCase } from "../../../application/use-cases/check-working-directory.use-case"; import type { CreateBranchUseCase } from "../../../application/use-cases/create-branch.use-case"; import type { GetBranchConfigUseCase } from "../../../application/use-cases/get-branch-config.use-case"; import type { GetBranchPatternUseCase } from "../../../application/use-cases/get-branch-pattern.use-case"; import type { GetBranchPlaceholderDefinitionsUseCase } from "../../../application/use-cases/get-branch-placeholder-definitions.use-case"; import type { LintBranchNameUseCase } from "../../../application/use-cases/lint-branch-name.use-case"; import type { NormalizeTicketIdUseCase } from "../../../application/use-cases/normalize-ticket-id.use-case"; import type { PushBranchUseCase } from "../../../application/use-cases/push-branch.use-case"; /** * Controller for branch creation CLI operations */ export declare class CreateBranchController { private readonly BRANCH_CREATION_PROMPT; private readonly BUILD_BRANCH_NAME_USE_CASE; private readonly CHECK_WORKING_DIRECTORY_USE_CASE; private readonly CREATE_BRANCH_USE_CASE; private readonly GET_BRANCH_CONFIG_USE_CASE; private readonly GET_BRANCH_PATTERN_USE_CASE; private readonly GET_BRANCH_PLACEHOLDER_DEFINITIONS_USE_CASE; private readonly LINT_BRANCH_NAME_USE_CASE; private readonly NORMALIZE_TICKET_ID_USE_CASE; private readonly PUSH_BRANCH_USE_CASE; constructor(buildBranchNameUseCase: BuildBranchNameUseCase, checkWorkingDirectoryUseCase: CheckWorkingDirectoryUseCase, createBranchUseCase: CreateBranchUseCase, getBranchPatternUseCase: GetBranchPatternUseCase, getBranchPlaceholderDefinitionsUseCase: GetBranchPlaceholderDefinitionsUseCase, getBranchConfigUseCase: GetBranchConfigUseCase, lintBranchNameUseCase: LintBranchNameUseCase, normalizeTicketIdUseCase: NormalizeTicketIdUseCase, pushBranchUseCase: PushBranchUseCase); /** * Execute the branch creation flow * @param appName The application name for configuration */ execute(appName: string): Promise<void>; /** * Handle errors that occur during branch creation * @param error The error that occurred */ private handleError; }