mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +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
@@ -179,7 +179,7 @@ describe('OpenCodeServerManager - server auth', () => {
|
||||
function createPasswordDb(password: string | null) {
|
||||
const encrypted = password ? encryptSecret(password) : null
|
||||
|
||||
return {
|
||||
const db = {
|
||||
prepare: vi.fn((sql: string) => ({
|
||||
get: (key?: string) => {
|
||||
if (key === 'opencode_server_password' && sql.includes('SELECT value FROM app_secrets') && encrypted) {
|
||||
@@ -190,7 +190,10 @@ describe('OpenCodeServerManager - server auth', () => {
|
||||
run: vi.fn(),
|
||||
all: vi.fn(() => []),
|
||||
})),
|
||||
} as any
|
||||
query: vi.fn((sql: string) => db.prepare(sql)),
|
||||
}
|
||||
|
||||
return db as any
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user