feat: 更新版本号至 0.1.15;增强 getSyncList 方法以支持本地文件选项

This commit is contained in:
2026-03-03 00:40:30 +08:00
parent 57bf884360
commit c2c6d4a7d3
3 changed files with 24 additions and 17 deletions

View File

@@ -103,11 +103,14 @@ export class SyncBase {
* @param opts.getFile 是否检测文件是否存在
* @returns
*/
async getSyncList(opts?: { getFile?: boolean }): Promise<SyncList[]> {
async getSyncList(opts?: { getFile?: boolean, getLocalFile?: boolean }): Promise<SyncList[]> {
const config = this.config!;
let sync = config?.sync || {};
const local = opts?.getLocalFile ?? true;
const syncDirectory = await this.getSyncDirectoryList();
sync = this.getMergeSync(sync, syncDirectory.sync);
if (local) {
sync = this.getMergeSync(sync, syncDirectory.sync);
}
const syncKeys = Object.keys(sync);
const baseURL = this.baseURL;
const syncList = syncKeys.map((key) => {