@myuon/refactor-mcp
Version:
MCP server for refactoring tools
28 lines (27 loc) • 808 B
TypeScript
export interface RefactorOptions {
searchPattern: string;
replacePattern: string;
contextPattern?: string;
filePattern?: string;
dryRun?: boolean;
}
export interface RefactorMatch {
line: number;
content: string;
original: string;
replaced: string;
captureGroups?: string[];
}
export interface RefactorResult {
filePath: string;
replacements: number;
matches: RefactorMatch[];
modified: boolean;
}
export declare function performRefactor(options: RefactorOptions): Promise<RefactorResult[]>;
export interface RefactorFormatOptions {
includeCaptureGroups?: boolean;
includeMatchedText?: boolean;
dryRun?: boolean;
}
export declare function formatRefactorResults(results: RefactorResult[], options?: RefactorFormatOptions | boolean): string;