diff --git a/NodeApp/package.json b/NodeApp/package.json index ff0f2a74b32053f8e01a435960914e6872be964a..ca7bf2f6e131618151c92063463583787f191a0a 100644 --- a/NodeApp/package.json +++ b/NodeApp/package.json @@ -1,7 +1,7 @@ { "name" : "dojo_cli", "description" : "CLI of the Dojo project", - "version" : "3.0.0", + "version" : "3.0.1", "license" : "AGPLv3", "author" : "Michaƫl Minelli <dojo@minelli.me>", "main" : "dist/app.js", diff --git a/NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts b/NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts index bac1eb1db39cf5f36fe539855803420d0f872f52..e10f030ee540b0170c11113ad5c231566dc1c99f 100644 --- a/NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts +++ b/NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts @@ -42,7 +42,8 @@ class ExerciseRunCommand extends CommanderCommand { private displayExecutionLogs() { ora({ - text: `${ chalk.magenta('Execution logs folder:') } ${ this.folderResultsVolume }`, indent: 0 + text : `${ chalk.magenta('Execution logs folder:') } ${ this.folderResultsVolume }`, + indent: 0 }).start().info(); } @@ -66,13 +67,15 @@ class ExerciseRunCommand extends CommanderCommand { ora({ - text: `Checking exercise content:`, indent: 4 + text : `Checking exercise content:`, + indent: 4 }).start().info(); // Exercise folder { const spinner: ora.Ora = ora({ - text: `Checking exercise folder`, indent: 8 + text : `Checking exercise folder`, + indent: 8 }).start(); const files = fs.readdirSync(options.path); @@ -89,7 +92,8 @@ class ExerciseRunCommand extends CommanderCommand { // dojo_assignment.json validity { const spinner: ora.Ora = ora({ - text: `Checking ${ ClientsSharedConfig.assignment.filename } file`, indent: 8 + text : `Checking ${ ClientsSharedConfig.assignment.filename } file`, + indent: 8 }).start(); const validationResults = SharedAssignmentHelper.validateDescriptionFile(path.join(options.path, ClientsSharedConfig.assignment.filename)); @@ -108,7 +112,8 @@ class ExerciseRunCommand extends CommanderCommand { // Docker daemon { const spinner: ora.Ora = ora({ - text: `Checking Docker daemon`, indent: 4 + text : `Checking Docker daemon`, + indent: 4 }).start(); try { @@ -130,7 +135,7 @@ class ExerciseRunCommand extends CommanderCommand { let composeFileOverride: string[] = []; const composeOverridePath: string = path.join(localExercisePath, 'docker-compose-override.yml'); if ( haveResultsVolume ) { - const composeOverride = fs.readFileSync(path.join(__dirname, '../../../assets/docker-compose-override.yml'), 'utf8').replace('{{VOLUME_NAME}}', assignmentFile.result.volume!).replace('{{MOUNT_PATH}}', this.folderResultsExercise); + const composeOverride = fs.readFileSync(path.join(__dirname, '../../../../assets/docker-compose-override.yml'), 'utf8').replace('{{VOLUME_NAME}}', assignmentFile.result.volume!).replace('{{MOUNT_PATH}}', this.folderResultsExercise); fs.writeFileSync(composeOverridePath, composeOverride); composeFileOverride = [ composeOverridePath ]; @@ -152,7 +157,8 @@ class ExerciseRunCommand extends CommanderCommand { exerciseDockerCompose.events.on('step', (name: string, message: string) => { spinner = ora({ - text: message, indent: 4 + text : message, + indent: 4 }).start(); if ( options.verbose && name == 'COMPOSE_RUN' ) { @@ -164,7 +170,8 @@ class ExerciseRunCommand extends CommanderCommand { if ( error ) { if ( options.verbose && stepName == 'COMPOSE_RUN' ) { ora({ - text: message, indent: 4 + text : message, + indent: 4 }).start().fail(); } else { spinner.fail(message); @@ -172,7 +179,8 @@ class ExerciseRunCommand extends CommanderCommand { } else { if ( options.verbose && stepName == 'COMPOSE_RUN' ) { ora({ - text: message, indent: 4 + text : message, + indent: 4 }).start().succeed(); } else { spinner.succeed(message); @@ -210,7 +218,8 @@ class ExerciseRunCommand extends CommanderCommand { exerciseResultsValidation.events.on('step', (name: string, message: string) => { spinner = ora({ - text: message, indent: 4 + text : message, + indent: 4 }).start(); }); @@ -242,7 +251,9 @@ class ExerciseRunCommand extends CommanderCommand { // Step 4: Display results + Volume location { ClientsSharedExerciseHelper.displayExecutionResults(exerciseResultsValidation.exerciseResults!, exerciseDockerCompose.exitCode, { - INFO: chalk.bold, SUCCESS: chalk.green, FAILURE: chalk.red + INFO : chalk.bold, + SUCCESS: chalk.green, + FAILURE: chalk.red }, `\n\n${ chalk.bold('Execution results folder') } : ${ this.folderResultsVolume }`); } } diff --git a/NodeApp/src/sharedByClients b/NodeApp/src/sharedByClients index dc12d17660bf9e92656c6abcb24ec7ce6ab3d675..39ababf437cd738b45e07743455be7588640d5c9 160000 --- a/NodeApp/src/sharedByClients +++ b/NodeApp/src/sharedByClients @@ -1 +1 @@ -Subproject commit dc12d17660bf9e92656c6abcb24ec7ce6ab3d675 +Subproject commit 39ababf437cd738b45e07743455be7588640d5c9