mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-06 04:44:21 +01:00
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:
1 parent
ba08f5c24a
commit
7c8a4fe64c
31 files changed
+1136
-132
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user