server/packages/cli-parser/cli-builder.type.ts

24 lines
600 B
TypeScript
Raw Normal View History

export interface CliParameter {
2024-04-07 07:30:49 +02:00
name: string;
/* Like -v for --version */
shortName?: string;
/**
* If not positioned, the argument will need to be called with --name value instead of just value
* @default true
*/
positioned?: boolean;
/* Whether the argument needs a value (requires positioned to be false) */
needsValue?: boolean;
optional?: true;
type: CliParameterType;
description?: string;
}
2024-03-11 06:30:26 +01:00
export enum CliParameterType {
2024-04-07 07:30:49 +02:00
STRING = "string",
NUMBER = "number",
BOOLEAN = "boolean",
ARRAY = "array",
EMPTY = "empty",
2024-03-11 06:30:26 +01:00
}