import type { Model } from '../../compatible/diff'; import type { IStandardBaseConfig, IStandardOirginConfig } from '../../types/pontConfig'; import type { CodeGenerator } from './CodeGenerator'; import type { OriginReader } from './OriginReader'; import { StandardDataSource } from '../StandardDataSource'; import { BaseTemplate } from './CustomTemplateManage'; export declare class OriginManage { private name; private config; /** 异步初始化,使用时注意判空 */ private dataSource; private remoteDataSource; private codeGenerator; private originReader; private baseConfig; private baseTemplate; private isInit; private diffs; constructor(config: IStandardOirginConfig, baseConfig: IStandardBaseConfig, baseTemplate: BaseTemplate); private log; /** 新旧数据源信息 diff */ static calculateDiff(oldDataSource: StandardDataSource, dataSource: StandardDataSource): { modDiffs: Model[]; boDiffs: Model[]; }; private getApiLockPath; /** 获取本地 api-lock 的数据源数据 */ private getApiLockDataSource; /** 通过 OriginUrl 获取 DataSource */ private getDataSourceByOriginUrl; /** 获取最新的数据源 */ private getRemoteDataSource; /** * 初始化数据源 * 1. 先获取本地 api-lock 中的 dataSource 数据 * 2. 如果本地文件不存在,则获取远程数据源数据 * */ initDataSource(): Promise; /** 更新本地 api-lock 文件的 dataSource 数据 */ /** 计算当前 dataSource 和 remoteDataSource 差异 */ updateDiffs(): void; /** 增量更新 this.dataSource mods */ updateDataSourceMod(modName: string): Promise; /** 增量更新 this.dataSource baseClasses */ updateDataSourceClass(baseClassName: string): Promise; initOriginTemplate(): void; setCodeGeneratorDataSource(): Promise; /** 获取远程数据源信息并更新 remoteDataSource */ updateRemoteDataSource(): Promise; updateDataSourceByRemoteDataSource(): void; getDiffs(): { modDiffs: Model[]; boDiffs: Model[]; }; getDataSource(): Promise; getConfig(): IStandardOirginConfig; getName(): string; getOriginReader(): OriginReader; getCodeGenerator(): CodeGenerator; }