Select Git revision
AuthTestCommand.ts

michael.minelli authored
AuthTestCommand.ts 674 B
import CommanderCommand from '../../CommanderCommand.js';
import SessionManager from '../../../managers/SessionManager.js';
import Config from '../../../config/Config';
class AuthTestCommand extends CommanderCommand {
protected commandName: string = 'test';
protected defineCommand() {
this.command
.description('test availability of registered Dojo API and Gitlab API sessions')
.action(this.commandAction.bind(this));
}
protected async commandAction(): Promise<void> {
await SessionManager.testSession();
await Config.gitlabManager.testToken();
}
}
export default new AuthTestCommand();