asch/fix-everything #188
5 changed files with 2 additions and 29 deletions
Remove duplicate errors
commit
f3d985cc57
|
|
@ -1,9 +0,0 @@
|
||||||
export class FileNotFoundError extends Error {
|
|
||||||
public constructor(
|
|
||||||
message: string,
|
|
||||||
public readonly filePath: string
|
|
||||||
) {
|
|
||||||
super(message);
|
|
||||||
this.name = "FileNotFoundError";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
export class AuthenticationError extends Error {
|
|
||||||
public constructor(message: string) {
|
|
||||||
super(message);
|
|
||||||
this.name = "AuthenticationError";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
export class ServerVersionMismatchError extends Error {
|
|
||||||
public constructor(message: string) {
|
|
||||||
super(message);
|
|
||||||
this.name = "ServerVersionMismatchError";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
export class SyncResetError extends Error {
|
|
||||||
public constructor() {
|
|
||||||
super("SyncClient has been reset, cleaning up");
|
|
||||||
this.name = "SyncResetError";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -142,7 +142,7 @@ export class CursorTracker {
|
||||||
const record = this.database.getLatestDocumentByRelativePath(
|
const record = this.database.getLatestDocumentByRelativePath(
|
||||||
doc.relative_path
|
doc.relative_path
|
||||||
);
|
);
|
||||||
if (record?.metadata?.hash !== hash(readContent)) {
|
if (record?.metadata?.hash !== (await hash(readContent))) {
|
||||||
doc.vault_update_id = null;
|
doc.vault_update_id = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -255,7 +255,7 @@ export class CursorTracker {
|
||||||
|
|
||||||
return this.database.getLatestDocumentByRelativePath(
|
return this.database.getLatestDocumentByRelativePath(
|
||||||
document.relative_path
|
document.relative_path
|
||||||
)?.metadata?.hash === hash(currentContent)
|
)?.metadata?.hash === (await hash(currentContent))
|
||||||
? DocumentUpToDateness.UpToDate
|
? DocumentUpToDateness.UpToDate
|
||||||
: DocumentUpToDateness.Prior;
|
: DocumentUpToDateness.Prior;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue