@decaf-ts/utils
Version:
module management utils for decaf-ts
76 lines (75 loc) • 3.15 kB
TypeScript
/**
* @description Default command options for CLI commands.
* @summary Defines the structure and default values for common command-line options used across various CLI commands.
* @const DefaultCommandOptions
* @typedef {Object} DefaultCommandOptions
* @property {Object} verbose - Verbosity level option.
* @property {string} verbose.type - The type of the verbose option (number).
* @property {string} verbose.short - The short flag for the verbose option (V).
* @property {number} verbose.default - The default value for verbosity (0).
* @property {Object} version - Version display option.
* @property {string} version.type - The type of the version option (boolean).
* @property {string} version.short - The short flag for the version option (v).
* @property {undefined} version.default - The default value for version display (undefined).
* @property {Object} help - Help display option.
* @property {string} help.type - The type of the help option (boolean).
* @property {string} help.short - The short flag for the help option (h).
* @property {boolean} help.default - The default value for help display (false).
* @property {Object} logLevel - Log level option.
* @property {string} logLevel.type - The type of the logLevel option (string).
* @property {string} logLevel.default - The default value for log level ("info").
* @property {Object} logStyle - Log styling option.
* @property {string} logStyle.type - The type of the logStyle option (boolean).
* @property {boolean} logStyle.default - The default value for log styling (true).
* @property {Object} timestamp - Timestamp display option.
* @property {string} timestamp.type - The type of the timestamp option (boolean).
* @property {boolean} timestamp.default - The default value for timestamp display (true).
* @property {Object} banner - Banner display option.
* @property {string} banner.type - The type of the banner option (boolean).
* @property {boolean} banner.default - The default value for banner display (false).
* @memberOf module:utils
*/
export declare const DefaultCommandOptions: {
verbose: {
type: string;
short: string;
default: undefined;
};
version: {
type: string;
short: string;
default: undefined;
};
help: {
type: string;
short: string;
default: boolean;
};
logLevel: {
type: string;
default: string;
};
logStyle: {
type: string;
default: boolean;
};
timestamp: {
type: string;
default: boolean;
};
banner: {
type: string;
default: boolean;
};
};
/**
* @description Default command values derived from DefaultCommandOptions.
* @summary Creates an object with the default values of all options defined in DefaultCommandOptions.
* @const DefaultCommandValues
* @typedef {Object} DefaultCommandValues
* @property {unknown} [key: string] - The default value for each option in DefaultCommandOptions.
* @memberOf module:utils
*/
export declare const DefaultCommandValues: {
[k in keyof typeof DefaultCommandOptions]: unknown;
};