import { CommandSearcher } from "./commandSearcher" ; import { Logger } from "./logger" ; import { Runtime } from "./runtime" ; /**
 * Settings to run the shenanigans-manager program.
 */ export interface RunSettings { /**
     * Arguments for the command.
     */ args : any ; /**
     * Reference name for the command.
     */ commandName : string ; /**
     * Logs on important events.
     */ logger : Logger ; } /**
 * Runs the shenanigans-manager program.
 */ export class Runner { /**
     * Searches for Command classes.
     */ private readonly commandSearcher : CommandSearcher ; param commandSearcher public constructor ( commandSearcher ) { this . commandSearcher = commandSearcher ; } param runSettings returns public async run ( runSettings ) { const command = await this . commandSearcher . search ( runSettings . commandName ) ; if ( ! command ) { return false ; } const runtime = { logger : runSettings . logger , } ; await command ( runtime , runSettings . args ) ; return true ; } }