revert main.ts after debugging
This commit is contained in:
parent
fafe74526d
commit
91af2c849f
100
src/main.ts
100
src/main.ts
@ -143,61 +143,61 @@ export default class RemotelySavePlugin extends Plugin {
|
|||||||
const remoteRsp = await client.listFromRemote();
|
const remoteRsp = await client.listFromRemote();
|
||||||
log.info(remoteRsp);
|
log.info(remoteRsp);
|
||||||
|
|
||||||
// getNotice("3/7 Starting to fetch local meta data.");
|
getNotice("3/7 Starting to fetch local meta data.");
|
||||||
// this.syncStatus = "getting_local_meta";
|
this.syncStatus = "getting_local_meta";
|
||||||
// const local = this.app.vault.getAllLoadedFiles();
|
const local = this.app.vault.getAllLoadedFiles();
|
||||||
// const localHistory = await loadDeleteRenameHistoryTableByVault(
|
const localHistory = await loadDeleteRenameHistoryTableByVault(
|
||||||
// this.db,
|
this.db,
|
||||||
// this.settings.vaultRandomID
|
this.settings.vaultRandomID
|
||||||
// );
|
);
|
||||||
// // log.info(local);
|
// log.info(local);
|
||||||
// // log.info(localHistory);
|
// log.info(localHistory);
|
||||||
|
|
||||||
// getNotice("4/7 Checking password correct or not.");
|
getNotice("4/7 Checking password correct or not.");
|
||||||
// this.syncStatus = "checking_password";
|
this.syncStatus = "checking_password";
|
||||||
// const passwordCheckResult = await isPasswordOk(
|
const passwordCheckResult = await isPasswordOk(
|
||||||
// remoteRsp.Contents,
|
remoteRsp.Contents,
|
||||||
// this.settings.password
|
this.settings.password
|
||||||
// );
|
);
|
||||||
// if (!passwordCheckResult.ok) {
|
if (!passwordCheckResult.ok) {
|
||||||
// getNotice("something goes wrong while checking password");
|
getNotice("something goes wrong while checking password");
|
||||||
// throw Error(passwordCheckResult.reason);
|
throw Error(passwordCheckResult.reason);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// getNotice("5/7 Starting to generate sync plan.");
|
getNotice("5/7 Starting to generate sync plan.");
|
||||||
// this.syncStatus = "generating_plan";
|
this.syncStatus = "generating_plan";
|
||||||
// const syncPlan = await getSyncPlan(
|
const syncPlan = await getSyncPlan(
|
||||||
// remoteRsp.Contents,
|
remoteRsp.Contents,
|
||||||
// local,
|
local,
|
||||||
// localHistory,
|
localHistory,
|
||||||
// this.db,
|
this.db,
|
||||||
// this.settings.vaultRandomID,
|
this.settings.vaultRandomID,
|
||||||
// client.serviceType,
|
client.serviceType,
|
||||||
// this.settings.password
|
this.settings.password
|
||||||
// );
|
);
|
||||||
// log.info(syncPlan.mixedStates); // for debugging
|
log.info(syncPlan.mixedStates); // for debugging
|
||||||
// await insertSyncPlanRecordByVault(
|
await insertSyncPlanRecordByVault(
|
||||||
// this.db,
|
this.db,
|
||||||
// syncPlan,
|
syncPlan,
|
||||||
// this.settings.vaultRandomID
|
this.settings.vaultRandomID
|
||||||
// );
|
);
|
||||||
|
|
||||||
// // The operations above are read only and kind of safe.
|
// The operations above are read only and kind of safe.
|
||||||
// // The operations below begins to write or delete (!!!) something.
|
// The operations below begins to write or delete (!!!) something.
|
||||||
|
|
||||||
// getNotice("6/7 Remotely Save Sync data exchanging!");
|
getNotice("6/7 Remotely Save Sync data exchanging!");
|
||||||
|
|
||||||
// this.syncStatus = "syncing";
|
this.syncStatus = "syncing";
|
||||||
// await doActualSync(
|
await doActualSync(
|
||||||
// client,
|
client,
|
||||||
// this.db,
|
this.db,
|
||||||
// this.settings.vaultRandomID,
|
this.settings.vaultRandomID,
|
||||||
// this.app.vault,
|
this.app.vault,
|
||||||
// syncPlan,
|
syncPlan,
|
||||||
// this.settings.password,
|
this.settings.password,
|
||||||
// (i: number, totalCount: number, pathName: string, decision: string) =>
|
(i: number, totalCount: number, pathName: string, decision: string) =>
|
||||||
// self.setCurrSyncMsg(i, totalCount, pathName, decision)
|
self.setCurrSyncMsg(i, totalCount, pathName, decision)
|
||||||
// );
|
);
|
||||||
|
|
||||||
getNotice("7/7 Remotely Save finish!");
|
getNotice("7/7 Remotely Save finish!");
|
||||||
this.currSyncMsg = "";
|
this.currSyncMsg = "";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user