///
import { ChildProcess } from "child_process";
export interface IIntergradeOptions {
changes?: string[];
type?: "spawn" | "fork" | "exec";
token?: C;
defineCancel?: (child: ChildProcess, token: C) => void;
}
export interface ICommandPlugin {
name: string;
description: string;
options: Array<[string, string]>;
action: (...args: any[]) => void;
help: (...args: any[]) => void;
}
export interface IENV {
NODE_ENV?: string;
NODE_PORT?: number | string;
[key: string]: any;
}
export interface IRouterConfig {
enabled?: boolean;
always?: boolean;
approot?: string;
filetype?: "js" | "ts";
details?: boolean;
tsconfig?: string;
}
export interface IConfigCompilerCmdConfig {
enabled?: boolean;
force?: boolean;
configroot?: string;
outputroot?: string;
tsconfig?: string;
increment?: boolean;
}
export interface IMiddlewareCompilerCmdConfig {
enabled?: boolean;
force?: boolean;
root?: string;
output?: string;
tsconfig?: string;
increment?: boolean;
}
export interface ICmdConfig {
tsconfig?: string;
inspect?: boolean;
env?: IENV;
watch?: string[] | false;
ignore?: string[] | false;
verbose?: boolean;
debug?: boolean | string;
mock?: boolean | string;
typeCheck?: boolean;
transpile?: boolean;
routers?: IRouterConfig;
compile?: boolean;
configCompiler?: IConfigCompilerCmdConfig & {
hmr?: boolean;
};
middlewareCompiler?: IMiddlewareCompilerCmdConfig & {
hmr?: boolean;
};
}
export declare type Env = {
env?: Record;
} & T;
export interface IInnerCmdConfig extends ICmdConfig {
env?: IENV & {
__TSCONFIG?: any;
__TRANSPILE?: any;
};
exec?: string;
}
export declare function createCmdConfig(config: ICmdConfig): ICmdConfig;
export declare function mergeCmdConfig(config: ICmdConfig, merge: ICmdConfig): ICmdConfig;