(id: string)
| 89 | } |
| 90 | |
| 91 | export async function getRemoteWorkspaceSecret(id: string): Promise<string | null> { |
| 92 | const normalizedId = id.trim() |
| 93 | if (!normalizedId) return null |
| 94 | |
| 95 | const keytar = await loadKeytar() |
| 96 | if (keytar) { |
| 97 | return await keytar.getPassword(KEYTAR_SERVICE, accountName(normalizedId)) |
| 98 | } |
| 99 | |
| 100 | const fallback = await loadFallbackSecrets() |
| 101 | const encoded = fallback[normalizedId] |
| 102 | return encoded ? decodeSecret(encoded) : null |
| 103 | } |
| 104 | |
| 105 | export async function setRemoteWorkspaceSecret(id: string, secret: string | null): Promise<boolean> { |
| 106 | const normalizedId = id.trim() |
no test coverage detected