import type { Simplify } from 'type-fest'; import type { Arguments, CliArguments } from './arguments'; import type { CliEnv, Env } from './env'; /** * Available GraphQL Mesh CLI commands */ export declare type Command = 'build' | 'dev' | 'serve-source' | 'start' | 'validate'; /** * Command Options that can be passed to a node:child_process. */ export declare type CommandOptions = { args: TArgs; env: TEnv; }; /** * Arguments used by all CLI commands */ export declare type SharedArgs = Pick; /** * Arguments used by the build command */ export declare type BuildArgs = Simplify>; /** * Arguments used by the dev command */ export declare type DevArgs = Simplify>; /** * Arguments used by the serve-source command */ export declare type ServeSourceArgs = SharedArgs; /** * Arguments used by the start command */ export declare type StartArgs = Simplify>; /** * Arguments used by the validate command */ export declare type ValidateArgs = SharedArgs; /** * Options used by the GraphQL Mesh CLI commands */ export declare type Options = TCommand extends 'build' ? CommandOptions : TCommand extends 'dev' ? CommandOptions : TCommand extends 'serve-source' ? CommandOptions : TCommand extends 'start' ? CommandOptions : TCommand extends 'validate' ? CommandOptions : CommandOptions; /** * Command Options in a format that can be passed to the GraphQL Mesh CLI. */ export declare type CommandCliOptions = { args: CliArguments; env: CliEnv; }; export declare const getCommandOptions: = Options>(options: TOptions) => CommandCliOptions;