Options
All
  • Public
  • Public/Protected
  • All
Menu

Implements GitProject interface using the Git binary from the command line. Works only if git is installed.

Hierarchy

Implements

Index

Constructors

Private constructor

Properties

baseDir

baseDir: string

branch

branch: string

Readonly cache

cache: Record<string, object>

Private Readonly credentials

id

newRepo

newRepo: boolean = false

Optional provenance

provenance: string

remote

remote: string

shouldCache

shouldCache: boolean

Accessors

dirty

  • get dirty(): boolean

name

  • get name(): string

Methods

add

  • add(f: File): Promise<this>

addDirectory

  • addDirectory(path: string): Promise<this>

addFile

  • addFile(path: string, content: string): Promise<this>

addFileSync

  • addFileSync(path: string, content: string): void

checkout

  • checkout(ref: string): Promise<this>

commit

  • commit(message: string): Promise<this>

configureFromRemote

  • configureFromRemote(): Promise<this>

createAndSetRemote

  • createAndSetRemote(gid: RemoteRepoRef, description?: string, visibility: "private" | "public"): Promise<this>

createBranch

  • createBranch(name: string): Promise<this>

deleteDirectory

  • deleteDirectory(path: string): Promise<this>

deleteDirectorySync

  • deleteDirectorySync(path: string): void

deleteFile

  • deleteFile(path: string): Promise<this>

deleteFileSync

  • deleteFileSync(path: string): void

directoryExistsSync

  • directoryExistsSync(path: string): boolean

fileExistsSync

  • fileExistsSync(path: string): boolean

findFile

  • findFile(path: string): Promise<File>

findFileSync

  • findFileSync(path: string): File

flush

  • flush(): Promise<this>

getFile

  • getFile(path: string): Promise<File>

getFiles

  • getFiles(globPatterns?: string | string[]): Promise<File[]>

Protected getFilesInternal

  • getFilesInternal(globPatterns: string[]): Promise<File[]>

Private gitInProjectBaseDir

gitStatus

hasBranch

  • hasBranch(name: string): Promise<boolean>

hasDirectory

  • hasDirectory(path: string): Promise<boolean>

hasFile

  • hasFile(path: string): Promise<boolean>

init

  • init(): Promise<this>

Protected invalidateCache

  • invalidateCache(): void

isClean

  • isClean(): Promise<boolean>

makeExecutable

  • makeExecutable(path: string): Promise<this>

makeExecutableSync

  • makeExecutableSync(path: string): void

moveFile

  • moveFile(oldPath: string, newPath: string): Promise<this>

push

raisePullRequest

  • raisePullRequest(title: string, body?: string, targetBranch?: string, reviewers?: PullRequestReviewer[]): Promise<this>

recordAction

recordAddFile

  • recordAddFile(path: string, content: string): this

recordDeleteFile

  • recordDeleteFile(path: string): this

release

  • release(): Promise<void>

revert

  • revert(): Promise<this>

setRemote

  • setRemote(remote: string): Promise<this>

setUserConfig

  • setUserConfig(user: string, email: string): Promise<this>

streamFiles

  • streamFiles(...globPatterns: string[]): FileStream

streamFilesRaw

  • streamFilesRaw(globPatterns: string[], opts: fg.Options): FileStream

totalFileCount

  • totalFileCount(): Promise<number>

trackFile

Static cloned

Static copy

Static fromBaseDir

Static fromExistingDirectory

Static fromProject

Generated using TypeDoc