@sap/cli-core
Version:
Command-Line Interface (CLI) Core Module
10 lines (9 loc) • 742 B
TypeScript
import { Command, Option } from "commander";
import { Command as CommandType, Option as OptionType } from "../types.js";
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: Command, command: CommandType) => Promise<Command>;