()
| 46 | * this was the only account. |
| 47 | */ |
| 48 | export function getGlobalDefaultAccount(): Account | undefined { |
| 49 | const user = configstore.get("user") as User | undefined; |
| 50 | const tokens = configstore.get("tokens") as Tokens | undefined; |
| 51 | |
| 52 | // TODO: Is there ever a case where only User or Tokens is defined |
| 53 | // and we want to accept that? |
| 54 | if (!user || !tokens) { |
| 55 | return undefined; |
| 56 | } |
| 57 | |
| 58 | return { |
| 59 | user, |
| 60 | tokens, |
| 61 | }; |
| 62 | } |
| 63 | |
| 64 | /** |
| 65 | * Get the default account associated with a project directory, or the global default. |
no test coverage detected
searching dependent graphs…