async start() {
        if(this._running) return;
        this.customerLogic = await CustomerLogicFactory.createAndInitializeCustomerLogicHandler(false);

        const handler = mapping[this.args._[0]];
        if(!handler) {
            if(this.args._[0]) console.log("ERROR", `Handler with name [${this.args._[0]}] not found.`);
            console.log("INFO", "Available handlers:");
            console.log("INFO", Object.keys(mapping).map(x => ` - ${x}`).join("\n"));
            return;
        }

        if(!handler.execute) {
            console.log("ERROR", `Handler with name [${this.args._[0]}] has no execute method.`);
            return;
        }

        await handler.execute(this.args._.slice(1));
        await this.customerLogic.unloadAllCustomerImplementations();

        this._running = false;
    }
/**
     * Starts the application
     * @return {Promise<void>}
     * @memberof CliApplication
     */
Starts the application
@return {Promise}
@memberof CliApplication
Starts the application @return { Promise } @memberof CliApplication
async start() {
        if(this._running) return;
        this.customerLogic = await CustomerLogicFactory.createAndInitializeCustomerLogicHandler(false);
        const handler = mapping[this.args._[0]];
        if(!handler) {
            if(this.args._[0]) console.log("ERROR", `Handler with name [${this.args._[0]}] not found.`);
            console.log("INFO", "Available handlers:");
            console.log("INFO", Object.keys(mapping).map(x => ` - ${x}`).join("\n"));
            return;
        }
        if(!handler.execute) {
            console.log("ERROR", `Handler with name [${this.args._[0]}] has no execute method.`);
            return;
        }
        await handler.execute(this.args._.slice(1));
        await this.customerLogic.unloadAllCustomerImplementations();
        this._running = false;
    }
async start ( ) { if ( this . _running ) return ; this . customerLogic = await CustomerLogicFactory . createAndInitializeCustomerLogicHandler ( false ) ; const handler = mapping [ this . args . _ [ 0 ] ] ; if ( ! handler ) { if ( this . args . _ [ 0 ] ) console . log ( "ERROR" , ` ${ this . args . _ [ 0 ] } ` ) ; console . log ( "INFO" , "Available handlers:" ) ; console . log ( "INFO" , Object . keys ( mapping ) . map ( x => ` ${ x } ` ) . join ( "\n" ) ) ; return ; } if ( ! handler . execute ) { console . log ( "ERROR" , ` ${ this . args . _ [ 0 ] } ` ) ; return ; } await handler . execute ( this . args . _ . slice ( 1 ) ) ; await this . customerLogic . unloadAllCustomerImplementations ( ) ; this . _running = false ; }
Starts the application
 @return {Promise<void>}
 @memberof CliApplication
Starts the application @return { Promise<void > } @memberof CliApplication