import {Singleton, Instantiable, Inject} from "../../di" import {Collection} from "../../util" import {CommandLineApplication} from "./CommandLineApplication" import {Directive} from "../Directive" import {Template} from "../Template" import {directive_template} from "../templates/directive" import {unit_template} from "../templates/unit"; import {controller_template} from "../templates/controller"; import {middleware_template} from "../templates/middleware"; import {routes_template} from "../templates/routes"; import {config_template} from "../templates/config"; import {Unit} from "../../lifecycle/Unit"; import {Logging} from "../../service/Logging"; /** * Service for managing directives, templates, and other resources related * to the command line utilities. */ @Singleton() export class CommandLine extends Unit { @Inject() protected readonly logging!: Logging /** Directive classes registered with the CLI command. */ protected directives: Collection> = new Collection>() /** Templates registered with the CLI command. These can be created with the TemplateDirective. */ protected templates: Collection