UNPKG

@altostra/core

Version:

Core library for shared types and logic

19 lines (18 loc) 745 B
import type { Maybe } from "../../common/Maybe"; import type { StatusResult } from 'simple-git'; import type { RestorationPaths } from "./Common"; import type { GitInstance } from "./GitClass"; /** * A class that mock git handling without requiring git repo */ export declare class MockedGit implements GitInstance { readonly path: string; readonly isRepoExists: Promise<boolean>; constructor(path: string); getRemoteUrl(name?: string): Promise<Maybe<string>>; getRemotes(): Promise<Record<string, string>>; getStatus(): Promise<StatusResult>; isDirty(): Promise<boolean>; headHash(): Promise<string>; restoreFromCommit(commitHash: string, paths: RestorationPaths, commitMessage?: string): Promise<void>; }