mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 17:37:40 +00:00
refactor(runtime): group integration commands by concrete owner (#38504)
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
import type { RuntimeGitCommands } from './orca-runtime-git'
|
||||
|
||||
type RuntimeGitCommandName =
|
||||
| 'getRuntimeGitStatus'
|
||||
| 'getRuntimeGitSubmoduleStatus'
|
||||
| 'checkRuntimeGitIgnoredPaths'
|
||||
| 'getRuntimeGitHistory'
|
||||
| 'getRuntimeGitConflictOperation'
|
||||
| 'getRuntimeGitMutationInFlight'
|
||||
| 'abortRuntimeGitMerge'
|
||||
| 'abortRuntimeGitRebase'
|
||||
| 'checkoutRuntimeGitBranch'
|
||||
| 'listRuntimeGitLocalBranches'
|
||||
| 'getRuntimeGitDiff'
|
||||
| 'getRuntimeGitBranchCompare'
|
||||
| 'getRuntimeGitCommitCompare'
|
||||
| 'getRuntimeGitUpstreamStatus'
|
||||
| 'fetchRuntimeGit'
|
||||
| 'syncRuntimeGitForkDefaultBranch'
|
||||
| 'pullRuntimeGit'
|
||||
| 'fastForwardRuntimeGit'
|
||||
| 'rebaseRuntimeGitFromBase'
|
||||
| 'pushRuntimeGit'
|
||||
| 'getRuntimeGitBranchDiff'
|
||||
| 'getRuntimeGitCommitDiff'
|
||||
| 'commitRuntimeGit'
|
||||
| 'completeRuntimeGitMerge'
|
||||
| 'generateRuntimeCommitMessage'
|
||||
| 'discoverRuntimeCommitMessageModels'
|
||||
| 'cancelRuntimeGenerateCommitMessage'
|
||||
| 'generateRuntimePullRequestFields'
|
||||
| 'cancelRuntimeGeneratePullRequestFields'
|
||||
| 'stageRuntimeGitPath'
|
||||
| 'resolveRuntimeGitConflict'
|
||||
| 'unstageRuntimeGitPath'
|
||||
| 'bulkStageRuntimeGitPaths'
|
||||
| 'bulkUnstageRuntimeGitPaths'
|
||||
| 'bulkDiscardRuntimeGitPaths'
|
||||
| 'discardRuntimeGitPath'
|
||||
| 'getRuntimeGitRemoteFileUrl'
|
||||
| 'getRuntimeGitRemoteCommitUrl'
|
||||
|
||||
export type RuntimeGitCommandSurface = Pick<RuntimeGitCommands, RuntimeGitCommandName>
|
||||
|
||||
export function installRuntimeGitCommandSurface(
|
||||
target: RuntimeGitCommandSurface,
|
||||
commands: RuntimeGitCommands
|
||||
): void {
|
||||
Object.assign(target, {
|
||||
getRuntimeGitStatus: commands.getRuntimeGitStatus.bind(commands),
|
||||
getRuntimeGitSubmoduleStatus: commands.getRuntimeGitSubmoduleStatus.bind(commands),
|
||||
checkRuntimeGitIgnoredPaths: commands.checkRuntimeGitIgnoredPaths.bind(commands),
|
||||
getRuntimeGitHistory: commands.getRuntimeGitHistory.bind(commands),
|
||||
getRuntimeGitConflictOperation: commands.getRuntimeGitConflictOperation.bind(commands),
|
||||
getRuntimeGitMutationInFlight: commands.getRuntimeGitMutationInFlight.bind(commands),
|
||||
abortRuntimeGitMerge: commands.abortRuntimeGitMerge.bind(commands),
|
||||
abortRuntimeGitRebase: commands.abortRuntimeGitRebase.bind(commands),
|
||||
checkoutRuntimeGitBranch: commands.checkoutRuntimeGitBranch.bind(commands),
|
||||
listRuntimeGitLocalBranches: commands.listRuntimeGitLocalBranches.bind(commands),
|
||||
getRuntimeGitDiff: commands.getRuntimeGitDiff.bind(commands),
|
||||
getRuntimeGitBranchCompare: commands.getRuntimeGitBranchCompare.bind(commands),
|
||||
getRuntimeGitCommitCompare: commands.getRuntimeGitCommitCompare.bind(commands),
|
||||
getRuntimeGitUpstreamStatus: commands.getRuntimeGitUpstreamStatus.bind(commands),
|
||||
fetchRuntimeGit: commands.fetchRuntimeGit.bind(commands),
|
||||
syncRuntimeGitForkDefaultBranch: commands.syncRuntimeGitForkDefaultBranch.bind(commands),
|
||||
pullRuntimeGit: commands.pullRuntimeGit.bind(commands),
|
||||
fastForwardRuntimeGit: commands.fastForwardRuntimeGit.bind(commands),
|
||||
rebaseRuntimeGitFromBase: commands.rebaseRuntimeGitFromBase.bind(commands),
|
||||
pushRuntimeGit: commands.pushRuntimeGit.bind(commands),
|
||||
getRuntimeGitBranchDiff: commands.getRuntimeGitBranchDiff.bind(commands),
|
||||
getRuntimeGitCommitDiff: commands.getRuntimeGitCommitDiff.bind(commands),
|
||||
commitRuntimeGit: commands.commitRuntimeGit.bind(commands),
|
||||
completeRuntimeGitMerge: commands.completeRuntimeGitMerge.bind(commands),
|
||||
generateRuntimeCommitMessage: commands.generateRuntimeCommitMessage.bind(commands),
|
||||
discoverRuntimeCommitMessageModels: commands.discoverRuntimeCommitMessageModels.bind(commands),
|
||||
cancelRuntimeGenerateCommitMessage: commands.cancelRuntimeGenerateCommitMessage.bind(commands),
|
||||
generateRuntimePullRequestFields: commands.generateRuntimePullRequestFields.bind(commands),
|
||||
cancelRuntimeGeneratePullRequestFields:
|
||||
commands.cancelRuntimeGeneratePullRequestFields.bind(commands),
|
||||
stageRuntimeGitPath: commands.stageRuntimeGitPath.bind(commands),
|
||||
resolveRuntimeGitConflict: commands.resolveRuntimeGitConflict.bind(commands),
|
||||
unstageRuntimeGitPath: commands.unstageRuntimeGitPath.bind(commands),
|
||||
bulkStageRuntimeGitPaths: commands.bulkStageRuntimeGitPaths.bind(commands),
|
||||
bulkUnstageRuntimeGitPaths: commands.bulkUnstageRuntimeGitPaths.bind(commands),
|
||||
bulkDiscardRuntimeGitPaths: commands.bulkDiscardRuntimeGitPaths.bind(commands),
|
||||
discardRuntimeGitPath: commands.discardRuntimeGitPath.bind(commands),
|
||||
getRuntimeGitRemoteFileUrl: commands.getRuntimeGitRemoteFileUrl.bind(commands),
|
||||
getRuntimeGitRemoteCommitUrl: commands.getRuntimeGitRemoteCommitUrl.bind(commands)
|
||||
} satisfies RuntimeGitCommandSurface)
|
||||
}
|
||||
Reference in New Issue
Block a user