mirror of
https://github.com/morluto/rea.git
synced 2026-12-06 14:59:05 +00:00
refactor(cli): reuse help schema fields (#17066)
This commit is contained in:
1 parent
4d39a2cfdd
commit
70b253f6bb
1 file changed
+2
-6
+2
-6
@@ -1,5 +1,6 @@
|
||||
import { z } from "zod";
|
||||
|
||||
import type { CliArgvSchemas } from "./argvParser.js";
|
||||
import { declaredOptionType, optionFlagName } from "./optionFields.js";
|
||||
|
||||
/**
|
||||
@@ -30,15 +31,10 @@ export interface GlobalOptionsHelp {
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export interface CommandHelp {
|
||||
export interface CommandHelp extends CliArgvSchemas {
|
||||
readonly description?: string | undefined;
|
||||
/** Printed as `name@version` in the title. */
|
||||
readonly version?: string | undefined;
|
||||
/** Positionals, in argv order. */
|
||||
readonly args?: z.ZodObject | undefined;
|
||||
readonly options?: z.ZodObject | undefined;
|
||||
/** Short alias by option key, such as `{ help: "h" }`. */
|
||||
readonly alias?: Readonly<Record<string, string>> | undefined;
|
||||
/** A paragraph printed after the options. */
|
||||
readonly hint?: string | undefined;
|
||||
/** Omitted for an entry that accepts only its own options. */
|
||||
|
||||
Reference in new issue
Block a user