refactor: extract CredentialProvider service and consolidate git-auth utilities (#283)

* refactor: extract CredentialProvider service and consolidate git-auth utilities

* refactor: add git-credentials route and gh env plugin, pass internal token to OpenCode

* refactor: update credential provider integration and git route

* refactor: integrate credential provider across git auth, routes, and IPC
This commit is contained in:
Chris Scott committed 2026-06-20 23:20:39 -04:00
1 parent ba08f5c24a
commit 7c8a4fe64c
31 files changed
+1136 -132

No files matched your search

+10 -1
View File
@@ -89,7 +89,7 @@ vi.mock('../ipc/ipcServer', () => ({
IPCServer: vi.fn(),
}))
vi.mock('../ipc/askpassHandler', () => ({
vi.mock('../../src/ipc/askpassHandler', () => ({
AskpassHandler: vi.fn().mockImplementation(() => ({
getEnv: vi.fn().mockReturnValue({}),
})),
@@ -103,6 +103,15 @@ vi.mock('../../src/ipc/sshHostKeyHandler', () => ({
})),
}))
vi.mock('../../src/services/credential-provider', () => ({
CredentialProvider: vi.fn().mockImplementation(() => ({
getGhCliEnv: vi.fn().mockReturnValue({}),
getSshCredentialsForHost: vi.fn().mockReturnValue([]),
getPatCredentialForHost: vi.fn().mockReturnValue(null),
getGitCredentials: vi.fn().mockReturnValue([]),
})),
}))
describe('GitAuthService with passphrase support', () => {
let gitAuthService: GitAuthService
let mockIpcServer: IPCServer