import { TeamCityStatusBarItem } from "../../view/teamcitystatusbaritem" ; import { CredentialsStore } from "../credentialsstore/credentialsstore" ; import { inject , injectable } from "inversify" ; import { TYPES } from "../utils/constants" ; import { PersistentStorageManager } from "../credentialsstore/persistentstoragemanager" ; import { Context } from "../../view/Context" ; @ injectable ( ) export class SignOut implements Command { public constructor ( @ inject ( TYPES . CredentialsStore ) private readonly credentialsStore , @ inject ( TYPES . PersistentStorageManager ) private readonly storageManager , @ inject ( TYPES . TeamCityStatusBarItem ) private readonly statusBarItem , @ inject ( TYPES . Context ) private readonly myContext ) { } public async exec ( ) { this . credentialsStore . removeCredentials ( ) ; this . statusBarItem . setLoggedOut ( ) ; this . myContext . setSignIn ( false ) ; return this . storageManager . removeCredentials ( ) ; } }