UNPKG

@sap/cli-core

Version:

Command-Line Interface (CLI) Core Module

10 lines (9 loc) 770 B
import commander, { Command, Option } from "commander"; import { Command as CommandType, Option as OptionType } from "../types"; export declare const createCommand: (name?: string) => Command; export declare function getAbsoluteCommandName(command: Command): string; export declare const getShortFlagForLongName: (command: Command, option: OptionType) => string; export declare const isOptionAlreadyRegistered: ({ longName }: OptionType, command: Command) => boolean; export declare const registerLongName: (command: Command, option: OptionType) => string; export declare const buildOption: (command: Command, option: OptionType) => Promise<Option>; export declare const buildCommand: (topCommand: commander.Command, command: CommandType) => Promise<commander.Command>;