Home Manual Reference Source
import {CLIInfoCommand} from 'projext/src/services/cli/cliInfo.js'
public class | source

CLIInfoCommand

Extends:

CLICommand → CLIInfoCommand

This is the command used on the CLI to show the contents of the project configuration.

Constructor Summary

Public Constructor
public

constructor(appLogger: Logger, projectConfiguration: ProjectConfigurationSettings)

Class constructor.

Member Summary

Public Members
public

A local reference for the appLogger service.

public

The instruction needed to trigger the command.

public

A description of the command for the help interface.

public

All the project settings.

Method Summary

Public Methods
public

handle(path: string)

Handle the execution of the command and shows the project configuration.

Inherited Summary

From class CLICommand
public

Whether or not the command supports unknown options.

public

This is a useful flag for when the command is ran as a result of another command.

public

This is the name of the program that runs the command.

public

The CLI command instruction.

public

A description of the command for the help interface.

public

A more complete description of the command to show when the command help interface is invoked.

public

Whether the command and its description should be shown on the CLI interface list of commands.

public

A list with the name of the options the command supports.

public

A dictionary of command options settings by their option name.

public

Whether or not a sub program should be executed for this command.

private

This dictionary will be completed when the command gets activated.

public

addOption(name: string, instruction: string, description: string, defaultValue: string)

Add a new option for the command.

public

Generate an instruction for this command.

public abstract

handle()

Handle the command execution.

public

output(text: string)

A simple wrapper for a console.log.

public

register(program: Command, cli: Object)

Register this command on a CLI program.

Public Constructors

public constructor(appLogger: Logger, projectConfiguration: ProjectConfigurationSettings) source

Class constructor.

Override:

CLICommand#constructor

Params:

NameTypeAttributeDescription
appLogger Logger

To log the configuration on the console.

projectConfiguration ProjectConfigurationSettings

To read the configuration.

Public Members

public appLogger: Logger source

A local reference for the appLogger service.

public command: string source

The instruction needed to trigger the command.

Override:

CLICommand#command

public description: string source

A description of the command for the help interface.

Override:

CLICommand#description

public projectConfiguration: ProjectConfigurationSettings source

All the project settings.

Public Methods

public handle(path: string) source

Handle the execution of the command and shows the project configuration.

Override:

CLICommand#handle

Params:

NameTypeAttributeDescription
path string
  • nullable: true

The path to specific settings.