Class: GitService
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:34
Constructors
Constructor
new GitService(
cacheService,npmService):GitService
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:35
Parameters
cacheService
npmService
NpmService
Returns
GitService
Methods
addAllAndRetrieveDiff()
addAllAndRetrieveDiff(
repoPath):Promise<Result<string>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:625
Parameters
repoPath
string
Returns
Promise<Result<string>>
applyDiffToGitRepo()
applyDiffToGitRepo(
repoPath,diffPath):Promise<Result<void>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:684
Parameters
repoPath
string
diffPath
string
Returns
Promise<Result<void>>
cloneRepoBranchToCache()
cloneRepoBranchToCache(
repoUrl,branch?,options?):Promise<Result<string>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:347
Parameters
repoUrl
string
branch?
string
options?
forceRefresh?
boolean
revision?
string
Returns
Promise<Result<string>>
cloneRevisionToCache()
cloneRevisionToCache(
template,revisionHash):Promise<Result<string>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:445
Parameters
template
revisionHash
string
Returns
Promise<Result<string>>
commitAll()
commitAll(
repoPath,commitMessage):Promise<Result<void>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:607
Parameters
repoPath
string
commitMessage
string
Returns
Promise<Result<void>>
createGitRepo()
createGitRepo(
repoPath):Promise<Result<void>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:655
Parameters
repoPath
string
Returns
Promise<Result<void>>
deleteRepo()
deleteRepo(
repoPath):Promise<Result<void>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:642
Parameters
repoPath
string
Returns
Promise<Result<void>>
diffDirectories()
diffDirectories(
absoluteBaseProjectPath,absoluteNewProjectPath):Promise<Result<string>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:731
Parameters
absoluteBaseProjectPath
string
absoluteNewProjectPath
string
Returns
Promise<Result<string>>
getCommitHash()
getCommitHash(
repoPath):Promise<Result<string>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:489
Parameters
repoPath
string
Returns
Promise<Result<string>>
getCurrentBranch()
getCurrentBranch(
repoPath):Promise<Result<string>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:521
Parameters
repoPath
string
Returns
Promise<Result<string>>
getRemoteCommitHash()
getRemoteCommitHash(
repoUrl,branch):Promise<Result<string>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:535
Parameters
repoUrl
string
branch
string
Returns
Promise<Result<string>>
getRemoteDefaultBranch()
getRemoteDefaultBranch(
repoUrl):Promise<Result<string>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:416
Parameters
repoUrl
string
Returns
Promise<Result<string>>
getRemoteUrl()
getRemoteUrl(
repoPath):Promise<Result<string>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:557
Parameters
repoPath
string
Returns
Promise<Result<string>>
isConflictAfterApply()
isConflictAfterApply(
repoPath):Promise<Result<boolean>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:715
Parameters
repoPath
string
Returns
Promise<Result<boolean>>
isGitRepo()
isGitRepo(
dir):Promise<Result<boolean>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:293
Parameters
dir
string
Returns
Promise<Result<boolean>>
isGitRepoClean()
isGitRepoClean(
hostRepoPath):Promise<Result<boolean>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:670
Parameters
hostRepoPath
string
Returns
Promise<Result<boolean>>
listBranches()
listBranches(
repoPath):Promise<Result<string[]>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:503
Parameters
repoPath
string
Returns
Promise<Result<string[]>>
loadGitStatus()
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:568
Parameters
repoPath
string
Returns
parseGitDiff()
parseGitDiff(
diffText):ParsedFile[]
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:776
Parameters
diffText
string
Returns
resetAllChanges()
resetAllChanges(
repoPath):Promise<Result<void>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:701
Parameters
repoPath
string
Returns
Promise<Result<void>>
switchBranch()
switchBranch(
repoPath,branchName):Promise<Result<void>>
Defined in: ../../skaff-lib/src/core/infra/git-service.ts:313
Parameters
repoPath
string
branchName
string
Returns
Promise<Result<void>>