diff --git a/NodeApp/src/commander/assignment/AssignmentCommand.ts b/NodeApp/src/commander/assignment/AssignmentCommand.ts index c629ddc14f3ed6785ac5a4b5c7a9fe05b82ef23b..3363dd74e35f6e720b53805f95321568e2325aec 100644 --- a/NodeApp/src/commander/assignment/AssignmentCommand.ts +++ b/NodeApp/src/commander/assignment/AssignmentCommand.ts @@ -1,7 +1,7 @@ import CommanderCommand from '../CommanderCommand'; -import AssignmentCreateCommand from './AssignmentCreateCommand'; -import AssignmentPublishCommand from './AssignmentPublishCommand'; -import AssignmentUnpublishCommand from './AssignmentUnpublishCommand'; +import AssignmentCreateCommand from './subcommands/AssignmentCreateCommand'; +import AssignmentPublishCommand from './subcommands/AssignmentPublishCommand'; +import AssignmentUnpublishCommand from './subcommands/AssignmentUnpublishCommand'; class AssignmentCommand extends CommanderCommand { diff --git a/NodeApp/src/commander/assignment/AssignmentCreateCommand.ts b/NodeApp/src/commander/assignment/subcommands/AssignmentCreateCommand.ts similarity index 85% rename from NodeApp/src/commander/assignment/AssignmentCreateCommand.ts rename to NodeApp/src/commander/assignment/subcommands/AssignmentCreateCommand.ts index c2b384afaf2f8c41e52c0cf836d537912df28ed1..0b28a1c7ff9302c5b0416043e8bc3421cbbfb96b 100644 --- a/NodeApp/src/commander/assignment/AssignmentCreateCommand.ts +++ b/NodeApp/src/commander/assignment/subcommands/AssignmentCreateCommand.ts @@ -1,12 +1,12 @@ -import CommanderCommand from '../CommanderCommand'; +import CommanderCommand from '../../CommanderCommand'; import chalk from 'chalk'; import ora from 'ora'; -import GitlabManager from '../../managers/GitlabManager'; -import GitlabUser from '../../shared/types/Gitlab/GitlabUser'; -import DojoBackendManager from '../../managers/DojoBackendManager'; -import Toolbox from '../../shared/helpers/Toolbox'; -import AccessesHelper from '../../helpers/AccessesHelper'; -import Assignment from '../../sharedByClients/models/Assignment'; +import GitlabManager from '../../../managers/GitlabManager'; +import GitlabUser from '../../../shared/types/Gitlab/GitlabUser'; +import DojoBackendManager from '../../../managers/DojoBackendManager'; +import Toolbox from '../../../shared/helpers/Toolbox'; +import AccessesHelper from '../../../helpers/AccessesHelper'; +import Assignment from '../../../sharedByClients/models/Assignment'; class AssignmentCreateCommand extends CommanderCommand { @@ -68,8 +68,7 @@ class AssignmentCreateCommand extends CommanderCommand { const oraInfo = (message: string) => { ora({ - text : message, - indent: 4 + text: message, indent: 4 }).start().info(); }; diff --git a/NodeApp/src/commander/assignment/AssignmentPublishCommand.ts b/NodeApp/src/commander/assignment/subcommands/AssignmentPublishCommand.ts similarity index 100% rename from NodeApp/src/commander/assignment/AssignmentPublishCommand.ts rename to NodeApp/src/commander/assignment/subcommands/AssignmentPublishCommand.ts diff --git a/NodeApp/src/commander/assignment/AssignmentPublishUnpublishCommandBase.ts b/NodeApp/src/commander/assignment/subcommands/AssignmentPublishUnpublishCommandBase.ts similarity index 72% rename from NodeApp/src/commander/assignment/AssignmentPublishUnpublishCommandBase.ts rename to NodeApp/src/commander/assignment/subcommands/AssignmentPublishUnpublishCommandBase.ts index b5df0c9b02e54abd46fbc438e7005e868f17a551..b82805174b5e8b177f475086d752ce440161deeb 100644 --- a/NodeApp/src/commander/assignment/AssignmentPublishUnpublishCommandBase.ts +++ b/NodeApp/src/commander/assignment/subcommands/AssignmentPublishUnpublishCommandBase.ts @@ -1,10 +1,10 @@ -import CommanderCommand from '../CommanderCommand'; +import CommanderCommand from '../../CommanderCommand'; import inquirer from 'inquirer'; import chalk from 'chalk'; -import SessionManager from '../../managers/SessionManager'; +import SessionManager from '../../../managers/SessionManager'; import ora from 'ora'; -import DojoBackendManager from '../../managers/DojoBackendManager'; -import Assignment from '../../sharedByClients/models/Assignment'; +import DojoBackendManager from '../../../managers/DojoBackendManager'; +import Assignment from '../../../sharedByClients/models/Assignment'; abstract class AssignmentPublishUnpublishCommandBase extends CommanderCommand { @@ -21,9 +21,7 @@ abstract class AssignmentPublishUnpublishCommandBase extends CommanderCommand { protected async commandAction(assignmentNameOrUrl: string, options: { force: boolean }): Promise<void> { if ( !options.force ) { options.force = (await inquirer.prompt({ - type : 'confirm', - name : 'force', - message: this.publish ? 'Are you sure you want to publish this assignment?' : 'Are you sure you want to unpublish this assignment?' + type: 'confirm', name: 'force', message: this.publish ? 'Are you sure you want to publish this assignment?' : 'Are you sure you want to unpublish this assignment?' })).force; } @@ -42,12 +40,10 @@ abstract class AssignmentPublishUnpublishCommandBase extends CommanderCommand { ora('Checking assignment:').start().info(); ora({ - text : assignmentNameOrUrl, - indent: 4 + text: assignmentNameOrUrl, indent: 4 }).start().info(); const assignmentGetSpinner: ora.Ora = ora({ - text : 'Checking if assignment exists', - indent: 8 + text: 'Checking if assignment exists', indent: 8 }).start(); assignment = await DojoBackendManager.getAssignment(assignmentNameOrUrl); if ( !assignment ) { @@ -57,8 +53,7 @@ abstract class AssignmentPublishUnpublishCommandBase extends CommanderCommand { assignmentGetSpinner.succeed(`The assignment exists`); const assignmentCheckAccessSpinner: ora.Ora = ora({ - text : 'Checking accesses', - indent: 8 + text: 'Checking accesses', indent: 8 }).start(); if ( !assignment.staff ) { assignmentCheckAccessSpinner.fail(`You are not in the staff of this assignment`); diff --git a/NodeApp/src/commander/assignment/AssignmentUnpublishCommand.ts b/NodeApp/src/commander/assignment/subcommands/AssignmentUnpublishCommand.ts similarity index 100% rename from NodeApp/src/commander/assignment/AssignmentUnpublishCommand.ts rename to NodeApp/src/commander/assignment/subcommands/AssignmentUnpublishCommand.ts diff --git a/NodeApp/src/commander/exercise/ExerciseCommand.ts b/NodeApp/src/commander/exercise/ExerciseCommand.ts index ef2c3f263f3bf1bdd287016d4d194b41ab44888d..bc122a864f7cc7fd9b32c00879b4427cdaae67e6 100644 --- a/NodeApp/src/commander/exercise/ExerciseCommand.ts +++ b/NodeApp/src/commander/exercise/ExerciseCommand.ts @@ -1,6 +1,6 @@ import CommanderCommand from '../CommanderCommand'; -import ExerciseCreateCommand from './ExerciseCreateCommand'; -import ExerciseRunCommand from './ExerciseRunCommand'; +import ExerciseCreateCommand from './subcommands/ExerciseCreateCommand'; +import ExerciseRunCommand from './subcommands/ExerciseRunCommand'; class ExerciseCommand extends CommanderCommand { diff --git a/NodeApp/src/commander/exercise/ExerciseCreateCommand.ts b/NodeApp/src/commander/exercise/subcommands/ExerciseCreateCommand.ts similarity index 79% rename from NodeApp/src/commander/exercise/ExerciseCreateCommand.ts rename to NodeApp/src/commander/exercise/subcommands/ExerciseCreateCommand.ts index 9116ff3a4c5cf8356ab05f57fd171b6eae15702b..bb51c2e6ece83361bd4fa5bd011b8d2e5731f97b 100644 --- a/NodeApp/src/commander/exercise/ExerciseCreateCommand.ts +++ b/NodeApp/src/commander/exercise/subcommands/ExerciseCreateCommand.ts @@ -1,12 +1,12 @@ -import CommanderCommand from '../CommanderCommand'; +import CommanderCommand from '../../CommanderCommand'; import chalk from 'chalk'; -import GitlabManager from '../../managers/GitlabManager'; -import GitlabUser from '../../shared/types/Gitlab/GitlabUser'; +import GitlabManager from '../../../managers/GitlabManager'; +import GitlabUser from '../../../shared/types/Gitlab/GitlabUser'; import ora from 'ora'; -import DojoBackendManager from '../../managers/DojoBackendManager'; -import AccessesHelper from '../../helpers/AccessesHelper'; -import Assignment from '../../sharedByClients/models/Assignment'; -import Exercise from '../../sharedByClients/models/Exercise'; +import DojoBackendManager from '../../../managers/DojoBackendManager'; +import AccessesHelper from '../../../helpers/AccessesHelper'; +import Assignment from '../../../sharedByClients/models/Assignment'; +import Exercise from '../../../sharedByClients/models/Exercise'; class ExerciseCreateCommand extends CommanderCommand { @@ -40,8 +40,7 @@ class ExerciseCreateCommand extends CommanderCommand { ora('Checking assignment:').start().info(); const assignmentGetSpinner: ora.Ora = ora({ - text : 'Checking if assignment exists', - indent: 4 + text: 'Checking if assignment exists', indent: 4 }).start(); assignment = await DojoBackendManager.getAssignment(options.assignment); if ( !assignment ) { @@ -51,8 +50,7 @@ class ExerciseCreateCommand extends CommanderCommand { assignmentGetSpinner.succeed(`Assignment "${ options.assignment }" exists`); const assignmentPublishedSpinner: ora.Ora = ora({ - text : 'Checking if assignment is published', - indent: 4 + text: 'Checking if assignment is published', indent: 4 }).start(); if ( !assignment.published ) { assignmentPublishedSpinner.fail(`Assignment "${ assignment.name }" isn't published`); @@ -70,8 +68,7 @@ class ExerciseCreateCommand extends CommanderCommand { const oraInfo = (message: string) => { ora({ - text : message, - indent: 4 + text: message, indent: 4 }).start().info(); }; diff --git a/NodeApp/src/commander/exercise/ExerciseRunCommand.ts b/NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts similarity index 82% rename from NodeApp/src/commander/exercise/ExerciseRunCommand.ts rename to NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts index 884de3c4dfa6afe406a97a8732c01fe23d9ff572..bac1eb1db39cf5f36fe539855803420d0f872f52 100644 --- a/NodeApp/src/commander/exercise/ExerciseRunCommand.ts +++ b/NodeApp/src/commander/exercise/subcommands/ExerciseRunCommand.ts @@ -1,5 +1,5 @@ -import CommanderCommand from '../CommanderCommand'; -import Config from '../../config/Config'; +import CommanderCommand from '../../CommanderCommand'; +import Config from '../../../config/Config'; import fs from 'node:fs'; import ora from 'ora'; import util from 'util'; @@ -7,13 +7,13 @@ import { exec } from 'child_process'; import chalk from 'chalk'; import * as os from 'os'; import path from 'path'; -import ClientsSharedConfig from '../../sharedByClients/config/ClientsSharedConfig'; -import AssignmentFile from '../../shared/types/Dojo/AssignmentFile'; -import ExerciseDockerCompose from '../../sharedByClients/helpers/Dojo/ExerciseDockerCompose'; -import SharedAssignmentHelper from '../../shared/helpers/Dojo/SharedAssignmentHelper'; -import ExerciseCheckerError from '../../shared/types/Dojo/ExerciseCheckerError'; -import ClientsSharedExerciseHelper from '../../sharedByClients/helpers/Dojo/ClientsSharedExerciseHelper'; -import ExerciseResultsSanitizerAndValidator from '../../sharedByClients/helpers/Dojo/ExerciseResultsSanitizerAndValidator'; +import ClientsSharedConfig from '../../../sharedByClients/config/ClientsSharedConfig'; +import AssignmentFile from '../../../shared/types/Dojo/AssignmentFile'; +import ExerciseDockerCompose from '../../../sharedByClients/helpers/Dojo/ExerciseDockerCompose'; +import SharedAssignmentHelper from '../../../shared/helpers/Dojo/SharedAssignmentHelper'; +import ExerciseCheckerError from '../../../shared/types/Dojo/ExerciseCheckerError'; +import ClientsSharedExerciseHelper from '../../../sharedByClients/helpers/Dojo/ClientsSharedExerciseHelper'; +import ExerciseResultsSanitizerAndValidator from '../../../sharedByClients/helpers/Dojo/ExerciseResultsSanitizerAndValidator'; const execAsync = util.promisify(exec); @@ -42,8 +42,7 @@ 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(); } @@ -67,15 +66,13 @@ 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); @@ -92,8 +89,7 @@ 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)); @@ -112,8 +108,7 @@ 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 { @@ -157,8 +152,7 @@ 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' ) { @@ -170,8 +164,7 @@ 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); @@ -179,8 +172,7 @@ 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); @@ -218,8 +210,7 @@ class ExerciseRunCommand extends CommanderCommand { exerciseResultsValidation.events.on('step', (name: string, message: string) => { spinner = ora({ - text : message, - indent: 4 + text: message, indent: 4 }).start(); }); @@ -251,9 +242,7 @@ 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/commander/session/SessionCommand.ts b/NodeApp/src/commander/session/SessionCommand.ts index c7089d6b0441979a93133f0cab4a30ee3bad306e..8ec16854a4bc15f6cdfb8534f57c28c2bef128c8 100644 --- a/NodeApp/src/commander/session/SessionCommand.ts +++ b/NodeApp/src/commander/session/SessionCommand.ts @@ -1,7 +1,7 @@ import CommanderCommand from '../CommanderCommand'; -import SessionTestCommand from './SessionTestCommand'; -import SessionAppCommand from './App/SessionAppCommand'; -import SessionGitlabCommand from './Gitlab/SessionGitlabCommand'; +import SessionTestCommand from './subcommands/SessionTestCommand'; +import SessionAppCommand from './subcommands/SessionAppCommand'; +import SessionGitlabCommand from './subcommands/SessionGitlabCommand'; class SessionCommand extends CommanderCommand { diff --git a/NodeApp/src/commander/session/App/SessionAppCommand.ts b/NodeApp/src/commander/session/subcommands/SessionAppCommand.ts similarity index 78% rename from NodeApp/src/commander/session/App/SessionAppCommand.ts rename to NodeApp/src/commander/session/subcommands/SessionAppCommand.ts index d0c943b10a8f3a38fe93fd245c0c533582bffd8e..f8d179efead33b4652c0a994d8aed4cdc9e28e81 100644 --- a/NodeApp/src/commander/session/App/SessionAppCommand.ts +++ b/NodeApp/src/commander/session/subcommands/SessionAppCommand.ts @@ -1,6 +1,6 @@ import CommanderCommand from '../../CommanderCommand'; -import SessionAppLoginCommand from './SessionAppLoginCommand'; -import SessionAppLogoutCommand from './SessionAppLogoutCommand'; +import SessionAppLoginCommand from './application/SessionAppLoginCommand'; +import SessionAppLogoutCommand from './application/SessionAppLogoutCommand'; class SessionAppCommand extends CommanderCommand { diff --git a/NodeApp/src/commander/session/Gitlab/SessionGitlabCommand.ts b/NodeApp/src/commander/session/subcommands/SessionGitlabCommand.ts similarity index 78% rename from NodeApp/src/commander/session/Gitlab/SessionGitlabCommand.ts rename to NodeApp/src/commander/session/subcommands/SessionGitlabCommand.ts index 3662faa1e86d0d7f0d78ac71de71c4c4c02254ca..e80ceb264f1d16f458b1f4cb770dc82dd93da817 100644 --- a/NodeApp/src/commander/session/Gitlab/SessionGitlabCommand.ts +++ b/NodeApp/src/commander/session/subcommands/SessionGitlabCommand.ts @@ -1,6 +1,6 @@ import CommanderCommand from '../../CommanderCommand'; -import SessionGitlabLoginCommand from './SessionGitlabLoginCommand'; -import SessionGitlabLogoutCommand from './SessionGitlabLogoutCommand'; +import SessionGitlabLoginCommand from './gitlab/SessionGitlabLoginCommand'; +import SessionGitlabLogoutCommand from './gitlab/SessionGitlabLogoutCommand'; class SessionGitlabCommand extends CommanderCommand { diff --git a/NodeApp/src/commander/session/SessionTestCommand.ts b/NodeApp/src/commander/session/subcommands/SessionTestCommand.ts similarity index 72% rename from NodeApp/src/commander/session/SessionTestCommand.ts rename to NodeApp/src/commander/session/subcommands/SessionTestCommand.ts index d0ab1b62051f3e7a6555081957851cde1461cc7f..57c1bf00b1ea126c17fddea14714d06effdbea40 100644 --- a/NodeApp/src/commander/session/SessionTestCommand.ts +++ b/NodeApp/src/commander/session/subcommands/SessionTestCommand.ts @@ -1,6 +1,6 @@ -import CommanderCommand from '../CommanderCommand'; -import SessionManager from '../../managers/SessionManager'; -import GitlabManager from '../../managers/GitlabManager'; +import CommanderCommand from '../../CommanderCommand'; +import SessionManager from '../../../managers/SessionManager'; +import GitlabManager from '../../../managers/GitlabManager'; class SessionTestCommand extends CommanderCommand { diff --git a/NodeApp/src/commander/session/App/SessionAppLoginCommand.ts b/NodeApp/src/commander/session/subcommands/application/SessionAppLoginCommand.ts similarity index 71% rename from NodeApp/src/commander/session/App/SessionAppLoginCommand.ts rename to NodeApp/src/commander/session/subcommands/application/SessionAppLoginCommand.ts index 58bc031c2c4b389ae024cf41479abb2241119eb1..88deb2e8b9a40cdc8d399393a81257ff327e4992 100644 --- a/NodeApp/src/commander/session/App/SessionAppLoginCommand.ts +++ b/NodeApp/src/commander/session/subcommands/application/SessionAppLoginCommand.ts @@ -1,7 +1,7 @@ import chalk from 'chalk'; -import CommanderCommand from '../../CommanderCommand'; +import CommanderCommand from '../../../CommanderCommand'; import inquirer from 'inquirer'; -import SessionManager from '../../../managers/SessionManager'; +import SessionManager from '../../../../managers/SessionManager'; class SessionAppLoginCommand extends CommanderCommand { @@ -18,10 +18,7 @@ class SessionAppLoginCommand extends CommanderCommand { protected async commandAction(options: { user: string, password: string }): Promise<void> { if ( !options.password ) { options.password = (await inquirer.prompt({ - type : 'password', - name : 'password', - message: 'Please enter your password', - mask : '' + type: 'password', name: 'password', message: 'Please enter your password', mask: '' })).password; } diff --git a/NodeApp/src/commander/session/App/SessionAppLogoutCommand.ts b/NodeApp/src/commander/session/subcommands/application/SessionAppLogoutCommand.ts similarity index 72% rename from NodeApp/src/commander/session/App/SessionAppLogoutCommand.ts rename to NodeApp/src/commander/session/subcommands/application/SessionAppLogoutCommand.ts index 650440d8396647ecfc4d634b4eda32347c2473b6..7d051a31a7ebf761ef5fd119b0fb1bdd4b8aa6d6 100644 --- a/NodeApp/src/commander/session/App/SessionAppLogoutCommand.ts +++ b/NodeApp/src/commander/session/subcommands/application/SessionAppLogoutCommand.ts @@ -1,6 +1,6 @@ -import CommanderCommand from '../../CommanderCommand'; +import CommanderCommand from '../../../CommanderCommand'; import inquirer from 'inquirer'; -import SessionManager from '../../../managers/SessionManager'; +import SessionManager from '../../../../managers/SessionManager'; import ora from 'ora'; @@ -17,10 +17,7 @@ class SessionAppLogoutCommand extends CommanderCommand { protected async commandAction(options: any): Promise<void> { if ( !options.force ) { const confirm: boolean = (await inquirer.prompt({ - name : 'confirm', - message: 'Are you sure?', - type : 'confirm', - default: false + name: 'confirm', message: 'Are you sure?', type: 'confirm', default: false })).confirm; if ( !confirm ) { diff --git a/NodeApp/src/commander/session/Gitlab/SessionGitlabLoginCommand.ts b/NodeApp/src/commander/session/subcommands/gitlab/SessionGitlabLoginCommand.ts similarity index 67% rename from NodeApp/src/commander/session/Gitlab/SessionGitlabLoginCommand.ts rename to NodeApp/src/commander/session/subcommands/gitlab/SessionGitlabLoginCommand.ts index e76525eca30b430a63c93b200e795bf5be606c98..fae91b6cf934f21e1c40a64f878c9a526b6f8241 100644 --- a/NodeApp/src/commander/session/Gitlab/SessionGitlabLoginCommand.ts +++ b/NodeApp/src/commander/session/subcommands/gitlab/SessionGitlabLoginCommand.ts @@ -1,6 +1,6 @@ import chalk from 'chalk'; -import CommanderCommand from '../../CommanderCommand'; -import GitlabManager from '../../../managers/GitlabManager'; +import CommanderCommand from '../../../CommanderCommand'; +import GitlabManager from '../../../../managers/GitlabManager'; import inquirer from 'inquirer'; @@ -17,10 +17,7 @@ class SessionGitlabLoginCommand extends CommanderCommand { protected async commandAction(options: { token: string }): Promise<void> { if ( !options.token ) { options.token = (await inquirer.prompt({ - type : 'password', - name : 'token', - message: 'Please enter your gitlab token', - mask : '' + type: 'password', name: 'token', message: 'Please enter your gitlab token', mask: '' })).token; } diff --git a/NodeApp/src/commander/session/Gitlab/SessionGitlabLogoutCommand.ts b/NodeApp/src/commander/session/subcommands/gitlab/SessionGitlabLogoutCommand.ts similarity index 72% rename from NodeApp/src/commander/session/Gitlab/SessionGitlabLogoutCommand.ts rename to NodeApp/src/commander/session/subcommands/gitlab/SessionGitlabLogoutCommand.ts index 6b86883c7f4021362d6b0ca785d95cd7101e2a29..4d43d379fbbc185cb571cf1039460e1c620965dc 100644 --- a/NodeApp/src/commander/session/Gitlab/SessionGitlabLogoutCommand.ts +++ b/NodeApp/src/commander/session/subcommands/gitlab/SessionGitlabLogoutCommand.ts @@ -1,7 +1,7 @@ -import CommanderCommand from '../../CommanderCommand'; +import CommanderCommand from '../../../CommanderCommand'; import inquirer from 'inquirer'; import ora from 'ora'; -import GitlabManager from '../../../managers/GitlabManager'; +import GitlabManager from '../../../../managers/GitlabManager'; class SessionGitlabLogoutCommand extends CommanderCommand { @@ -17,10 +17,7 @@ class SessionGitlabLogoutCommand extends CommanderCommand { protected async commandAction(options: any): Promise<void> { if ( !options.force ) { const confirm: boolean = (await inquirer.prompt({ - name : 'confirm', - message: 'Are you sure?', - type : 'confirm', - default: false + name: 'confirm', message: 'Are you sure?', type: 'confirm', default: false })).confirm; if ( !confirm ) {