(options: ListProfilesOptions)
| 46 | } |
| 47 | |
| 48 | export async function listProfiles(options: ListProfilesOptions) { |
| 49 | const authConfig = readAuthConfigFile(); |
| 50 | |
| 51 | if (!authConfig) { |
| 52 | logger.info("No profiles found"); |
| 53 | return; |
| 54 | } |
| 55 | |
| 56 | const profiles = Object.keys(authConfig); |
| 57 | |
| 58 | log.message("Profiles:"); |
| 59 | |
| 60 | for (const profile of profiles) { |
| 61 | const profileConfig = authConfig[profile]; |
| 62 | |
| 63 | log.info(`${profile}${profileConfig?.apiUrl ? ` - ${chalkGrey(profileConfig.apiUrl)}` : ""}`); |
| 64 | } |
| 65 | |
| 66 | outro("Retrieve account info by running whoami --profile <profile>"); |
| 67 | } |
no test coverage detected
searching dependent graphs…