Skip to content
Snippets Groups Projects
Commit d2da386d authored by michael.minelli's avatar michael.minelli
Browse files

App => Code improvement

parent a6c2d19c
Branches
Tags
No related merge requests found
......@@ -15,7 +15,6 @@ require('./shared/helpers/TypeScriptExtensions'); // ATTENTION : This line MUST
import ClientsSharedConfig from './sharedByClients/config/ClientsSharedConfig';
import Styles from './types/Style';
import Icon from './sharedByClients/types/Icon';
import RecursiveFilesStats from './shared/helpers/recursiveFilesStats/RecursiveFilesStats';
import Toolbox from './shared/helpers/Toolbox';
import ExerciseCheckerError from './shared/types/Dojo/ExerciseCheckerError';
......@@ -28,12 +27,14 @@ import ExerciseDockerCompose from './sharedByClients/helpers/Dojo
import ExerciseResultsSanitizerAndValidator from './sharedByClients/helpers/Dojo/ExerciseResultsSanitizerAndValidator';
import ExerciseAssignment from './sharedByClients/models/ExerciseAssignment';
import ClientsSharedExerciseHelper from './sharedByClients/helpers/Dojo/ClientsSharedExerciseHelper';
import Icon from './shared/types/Icon';
import { version } from './config/Version';
(async () => {
HttpManager.registerAxiosInterceptor();
console.log(Styles.APP_NAME(`${ Config.appName } (version {{VERSION}})`));
console.log(Styles.APP_NAME(`${ Config.appName } (version ${ version })`));
let exerciseAssignment: ExerciseAssignment | undefined;
let exerciseDockerCompose: ExerciseDockerCompose;
......@@ -48,7 +49,7 @@ import ClientsSharedExerciseHelper from './sharedByClients/helpers/Dojo
- Download immutables files (maybe throw or show an error if the files have been modified ?)
*/
{
console.log(Styles.INFO(`${ Icon.INFO } Checking the exercise's assignment and his immutable files`));
console.log(Styles.INFO(`${ Icon.INFO }️Checking the exercise's assignment and his immutable files`));
exerciseAssignment = await DojoBackendManager.getExerciseAssignment();
if ( !exerciseAssignment ) {
console.error(Styles.ERROR(`${ Icon.ERROR } Error while getting the exercise's assignment`));
......@@ -85,11 +86,11 @@ import ClientsSharedExerciseHelper from './sharedByClients/helpers/Dojo
try {
await new Promise<void>((resolve, reject) => {
exerciseDockerCompose.events.on('step', (name: string, message: string) => {
exerciseDockerCompose.events.on('step', (_name: string, message: string) => {
console.log(Styles.INFO(`${ Icon.INFO } ${ message }`));
});
exerciseDockerCompose.events.on('endStep', (stepName: string, message: string, error: boolean) => {
exerciseDockerCompose.events.on('endStep', (_stepName: string, message: string, error: boolean) => {
if ( error ) {
console.error(Styles.ERROR(`${ Icon.ERROR } ${ message }`));
}
......@@ -119,11 +120,11 @@ import ClientsSharedExerciseHelper from './sharedByClients/helpers/Dojo
try {
await new Promise<void>((resolve) => {
exerciseResultsValidation.events.on('step', (name: string, message: string) => {
exerciseResultsValidation.events.on('step', (_name: string, message: string) => {
console.log(Styles.INFO(`${ Icon.INFO } ${ message }`));
});
exerciseResultsValidation.events.on('endStep', (stepName: string, message: string, error: boolean) => {
exerciseResultsValidation.events.on('endStep', (_stepName: string, message: string, error: boolean) => {
if ( error ) {
console.error(Styles.ERROR(`${ Icon.ERROR } ${ message }`));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment