/** * Git Hooks - Pre-commit and pre-push hook setup * * Provides functionality to install and manage Git hooks for Drift integration. * Supports both Husky-based and direct Git hooks installation. * * @requirements 37.1, 37.3 */ /** * Hook types supported by Drift */ export type HookType = 'pre-commit' | 'pre-push'; /** * Result of a hook installation operation */ export interface HookInstallResult { success: boolean; hookType: HookType; method: 'husky' | 'git'; message: string; path?: string; } /** * Options for hook installation */ export interface HookInstallOptions { /** Force overwrite existing hooks */ force?: boolean; /** Use Husky if available */ preferHusky?: boolean; } /** * Check if Husky is installed and configured in the project * * @param rootDir - Root directory of the repository * @returns True if Husky is available */ export declare function isHuskyInstalled(rootDir: string): Promise; /** * Get the Git hooks directory path * * @param rootDir - Root directory of the repository * @returns Path to the Git hooks directory */ export declare function getGitHooksDir(rootDir: string): Promise; /** * Install a pre-commit hook for Drift * * The pre-commit hook runs `drift check --staged` to check only staged files * before allowing a commit. * * @param rootDir - Root directory of the repository * @param options - Installation options * @returns Installation result * * @requirements 37.1 */ export declare function installPreCommitHook(rootDir: string, options?: HookInstallOptions): Promise; /** * Install a pre-push hook for Drift * * The pre-push hook runs `drift check` to perform a full check * before allowing a push. * * @param rootDir - Root directory of the repository * @param options - Installation options * @returns Installation result * * @requirements 37.3 */ export declare function installPrePushHook(rootDir: string, options?: HookInstallOptions): Promise; /** * Install all Drift Git hooks (pre-commit and pre-push) * * @param rootDir - Root directory of the repository * @param options - Installation options * @returns Array of installation results * * @requirements 37.1, 37.3 */ export declare function installAllHooks(rootDir: string, options?: HookInstallOptions): Promise; /** * Uninstall a Git hook * * @param rootDir - Root directory of the repository * @param hookType - Type of hook to uninstall * @returns True if hook was removed */ export declare function uninstallHook(rootDir: string, hookType: HookType): Promise; /** * Uninstall all Drift Git hooks * * @param rootDir - Root directory of the repository * @returns Object with results for each hook type */ export declare function uninstallAllHooks(rootDir: string): Promise>; /** * Get the status of installed hooks * * @param rootDir - Root directory of the repository * @returns Object with status for each hook type */ export declare function getHooksStatus(rootDir: string): Promise>; //# sourceMappingURL=hooks.d.ts.map