52 lines
1.1 KiB
TypeScript
52 lines
1.1 KiB
TypeScript
import type { CorpConfig } from "../core/config/types.js";
|
|
import type { CorpContext } from "../core/config/manager.js";
|
|
|
|
export interface CliParsedArgs {
|
|
area?: string;
|
|
action?: string;
|
|
args: string[];
|
|
positional?: string[];
|
|
options: Record<string, string | boolean | number>;
|
|
raw: string[];
|
|
}
|
|
|
|
export interface CliRunOptions {
|
|
/** Only terminal entrypoints supply a protocol-safe streaming destination. */
|
|
writeStdout?: (chunk: string) => Promise<void>;
|
|
appRoot?: string;
|
|
entryFile?: string;
|
|
launcher?: {
|
|
command: string;
|
|
args?: string[];
|
|
};
|
|
}
|
|
|
|
export interface CliResult {
|
|
stdout: string;
|
|
stderr: string;
|
|
exitCode: number;
|
|
preserveSensitiveStdout?: boolean;
|
|
}
|
|
|
|
export interface OutputOptions {
|
|
allowFull?: boolean;
|
|
outputFile?: string;
|
|
summary?: boolean;
|
|
}
|
|
|
|
export interface CliRuntime {
|
|
writeStdout?: (chunk: string) => Promise<void>;
|
|
corpContext: CorpContext;
|
|
selectedCorp: CorpConfig | null;
|
|
jsonMode: boolean;
|
|
dryRun?: boolean;
|
|
confirmed?: boolean;
|
|
outputOptions?: OutputOptions;
|
|
appRoot?: string;
|
|
entryFile?: string;
|
|
launcher?: {
|
|
command: string;
|
|
args?: string[];
|
|
};
|
|
}
|