asch/fix-everything #188

Open
andras wants to merge 114 commits from asch/fix-everything into main
5 changed files with 2 additions and 29 deletions
Showing only changes of commit f3d985cc57 - Show all commits

View file

@ -1,9 +0,0 @@
export class FileNotFoundError extends Error {
public constructor(
message: string,
public readonly filePath: string
) {
super(message);
this.name = "FileNotFoundError";
}
}

View file

@ -1,6 +0,0 @@
export class AuthenticationError extends Error {
public constructor(message: string) {
super(message);
this.name = "AuthenticationError";
}
}

View file

@ -1,6 +0,0 @@
export class ServerVersionMismatchError extends Error {
public constructor(message: string) {
super(message);
this.name = "ServerVersionMismatchError";
}
}

View file

@ -1,6 +0,0 @@
export class SyncResetError extends Error {
public constructor() {
super("SyncClient has been reset, cleaning up");
this.name = "SyncResetError";
}
}

View file

@ -142,7 +142,7 @@ export class CursorTracker {
const record = this.database.getLatestDocumentByRelativePath(
doc.relative_path
);
if (record?.metadata?.hash !== hash(readContent)) {
if (record?.metadata?.hash !== (await hash(readContent))) {
doc.vault_update_id = null;
}
}
@ -255,7 +255,7 @@ export class CursorTracker {
return this.database.getLatestDocumentByRelativePath(
document.relative_path
)?.metadata?.hash === hash(currentContent)
)?.metadata?.hash === (await hash(currentContent))
? DocumentUpToDateness.UpToDate
: DocumentUpToDateness.Prior;
}