diff --git a/NodeApp/src/commander/exercise/ExerciseRunCommand.ts b/NodeApp/src/commander/exercise/ExerciseRunCommand.ts index 9eb4d8da5a2ec909018a15e052142adc6bcacf09..b5eec3e44c8bd667145564999c9e184b49a6df2f 100644 --- a/NodeApp/src/commander/exercise/ExerciseRunCommand.ts +++ b/NodeApp/src/commander/exercise/ExerciseRunCommand.ts @@ -36,6 +36,7 @@ class ExerciseRunCommand extends CommanderCommand { this.command .description('locally run an exercise') .option('-p, --path <value>', 'exercise path', Config.folders.defaultLocalExercise) + .option('-v, --verbose', 'exercise path', Config.folders.defaultLocalExercise) .action(this.commandAction.bind(this)); } @@ -46,7 +47,7 @@ class ExerciseRunCommand extends CommanderCommand { }).start().info(); } - protected async commandAction(options: any): Promise<void> { + protected async commandAction(options: { path: string, verbose: boolean }): Promise<void> { const localExercisePath = options.path ?? Config.folders.defaultLocalExercise; let assignmentFile: AssignmentFile; @@ -138,6 +139,14 @@ class ExerciseRunCommand extends CommanderCommand { await new Promise<void>((resolve, reject) => { let spinner: ora.Ora; + if ( options.verbose ) { + exerciseDockerCompose.events.on('logs', (log: string, _error: boolean, displayable: boolean) => { + if ( displayable ) { + console.log(log); + } + }); + } + exerciseDockerCompose.events.on('step', (name: string, message: string) => { spinner = ora({ text : message, diff --git a/NodeApp/src/commander/session/App/SessionAppLoginCommand.ts b/NodeApp/src/commander/session/App/SessionAppLoginCommand.ts index 514353fd4f34e498125eee4e9427ba5c9cef3790..58bc031c2c4b389ae024cf41479abb2241119eb1 100644 --- a/NodeApp/src/commander/session/App/SessionAppLoginCommand.ts +++ b/NodeApp/src/commander/session/App/SessionAppLoginCommand.ts @@ -15,7 +15,7 @@ class SessionAppLoginCommand extends CommanderCommand { .action(this.commandAction.bind(this)); } - protected async commandAction(options: any): Promise<void> { + protected async commandAction(options: { user: string, password: string }): Promise<void> { if ( !options.password ) { options.password = (await inquirer.prompt({ type : 'password', diff --git a/NodeApp/src/commander/session/Gitlab/SessionGitlabLoginCommand.ts b/NodeApp/src/commander/session/Gitlab/SessionGitlabLoginCommand.ts index f7b156ad0bd2981fcfc082023fd80b029624c6b1..e76525eca30b430a63c93b200e795bf5be606c98 100644 --- a/NodeApp/src/commander/session/Gitlab/SessionGitlabLoginCommand.ts +++ b/NodeApp/src/commander/session/Gitlab/SessionGitlabLoginCommand.ts @@ -14,7 +14,7 @@ class SessionGitlabLoginCommand extends CommanderCommand { .action(this.commandAction.bind(this)); } - protected async commandAction(options: any): Promise<void> { + protected async commandAction(options: { token: string }): Promise<void> { if ( !options.token ) { options.token = (await inquirer.prompt({ type : 'password',