From 21f06ad68bbd2b6a013ea0adc41a0e5db24804c2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <michael@minelli.me>
Date: Fri, 13 Oct 2023 14:11:11 +0200
Subject: [PATCH] App => Display result in boxen

---
 AssignmentChecker/src/app.ts          | 23 ++++++++++-------------
 AssignmentChecker/src/sharedByClients |  2 +-
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/AssignmentChecker/src/app.ts b/AssignmentChecker/src/app.ts
index 1299507..7ae5b39 100644
--- a/AssignmentChecker/src/app.ts
+++ b/AssignmentChecker/src/app.ts
@@ -8,13 +8,14 @@ const myEnv = require('dotenv').config({
 require('dotenv-expand').expand(myEnv);
 require('./shared/helpers/TypeScriptExtensions'); // ATTENTION : This line MUST be the second of this file
 
-import AssignmentValidator from './sharedByClients/helpers/Dojo/AssignmentValidator';
-import Styles              from './types/Style';
-import { exec }            from 'child_process';
-import util                from 'util';
-import HttpManager         from './managers/HttpManager';
-import Config              from './config/Config';
-import Icon                from './sharedByClients/types/Icon';
+import ClientsSharedAssignmentHelper from './sharedByClients/helpers/Dojo/ClientsSharedAssignmentHelper';
+import AssignmentValidator           from './sharedByClients/helpers/Dojo/AssignmentValidator';
+import Styles                        from './types/Style';
+import { exec }                      from 'child_process';
+import util                          from 'util';
+import HttpManager                   from './managers/HttpManager';
+import Config                        from './config/Config';
+import Icon                          from './sharedByClients/types/Icon';
 
 
 (async () => {
@@ -42,12 +43,6 @@ import Icon                from './sharedByClients/types/Icon';
                 }
             });
 
-            assignmentValidator.events.on('endStep', (stepName: string, message: string, error: boolean) => {
-                if ( error ) {
-                    console.error(Styles.ERROR(`${ Icon.ERROR } ${ message }`));
-                }
-            });
-
             assignmentValidator.events.on('finished', (success: boolean, exitCode: number) => {
                 success ? resolve() : reject();
             });
@@ -56,5 +51,7 @@ import Icon                from './sharedByClients/types/Icon';
         });
     } catch ( error ) { }
 
+    ClientsSharedAssignmentHelper.displayExecutionResults(assignmentValidator, `The assignment is ready to be published.`, Styles);
+
     process.exit(assignmentValidator.exitCode);
 })();
\ No newline at end of file
diff --git a/AssignmentChecker/src/sharedByClients b/AssignmentChecker/src/sharedByClients
index 1ed34ef..b22af10 160000
--- a/AssignmentChecker/src/sharedByClients
+++ b/AssignmentChecker/src/sharedByClients
@@ -1 +1 @@
-Subproject commit 1ed34ef2260dc08c92dfee96d9ba8a10e98eae22
+Subproject commit b22af10834e18c944606d5822b4446467792fbf8
-- 
GitLab