(json: string)
| 38 | } |
| 39 | |
| 40 | export const userFromJson = (json: string): User | null => { |
| 41 | try { |
| 42 | const credentials = credentialsFileSchema.parse(JSON.parse(json)) |
| 43 | return credentials.default ?? null |
| 44 | } catch { |
| 45 | return null |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | /** |
| 50 | * Get the config directory path based on the environment. |
no test coverage detected