feat: 更新版本号至 0.1.15;增强 getSyncList 方法以支持本地文件选项
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user