UNPKG

@altostra/core

Version:

Core library for shared types and logic

20 lines (19 loc) 720 B
import type { Maybe } from "../../common/Maybe"; import type { StatusResult } from 'simple-git'; import { RestorationPaths } from "./Common"; import type { GitInstance } from "./GitClass"; /** * A class to handle git operations */ export declare class Git implements GitInstance { #private; readonly path: string; constructor(path: string); get isRepoExists(): Promise<boolean>; 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>; }