template-syncer
Version:
智能模板同步工具 - 让你的项目与模板仓库保持同步,支持智能合并、差异对比和交互式更新
17 lines (16 loc) • 728 B
TypeScript
import type { FileInfo, FileChange, CategoryRule } from '../types';
export declare class Scanner {
private ignorePatterns;
private categorizer;
constructor(customIgnore?: string[], customCategories?: CategoryRule[]);
scan(dir: string): Promise<FileInfo[]>;
compare(templateDir: string, currentDir: string, detectOrphans?: boolean): Promise<FileChange[]>;
/** Rust native 实现:并行 hash 比较 */
private compareNative;
/** 纯 JS fallback 实现 */
private compareJs;
private hasChanged;
filterOrphans(orphans: FileChange[], deletePatterns?: string[], protectPatterns?: string[]): FileChange[];
addIgnore(pattern: string): void;
addCategory(rule: CategoryRule): void;
}