mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-29 12:33:20 +00:00
Polish diagnostic reporting and local pseudonym follow-up
This commit is contained in:
1 parent
c1ed71f686
commit
32874ea97f
21 files changed
+2425
-154
No files matched your search
@@ -0,0 +1,36 @@
|
||||
import type { FilePath, FilePathWithPrefix } from "@vrtmrz/livesync-commonlib/compat/common/types";
|
||||
import type { DatabaseDiagnosticOutput } from "./databaseDiagnostics";
|
||||
|
||||
export type DiagnosticFileCandidate = {
|
||||
path: string;
|
||||
databasePath?: FilePathWithPrefix | FilePath;
|
||||
documentId?: string;
|
||||
storageExists: boolean;
|
||||
source: "metadata" | "vault";
|
||||
};
|
||||
|
||||
export type DiagnosticFileLookupResult =
|
||||
| {
|
||||
valid: false;
|
||||
status: "invalid";
|
||||
processed: 0;
|
||||
candidates: [];
|
||||
}
|
||||
| {
|
||||
valid: true;
|
||||
status: "cancelled" | "complete";
|
||||
processed: number;
|
||||
candidates: DiagnosticFileCandidate[];
|
||||
};
|
||||
|
||||
export interface FindDiagnosticFilesOptions {
|
||||
signal?: AbortSignal;
|
||||
onProgress?(processed: number): void;
|
||||
}
|
||||
|
||||
export interface DiagnosticFileLookupDialogOptions {
|
||||
find(token: string, onProgress: (processed: number) => void): Promise<DiagnosticFileLookupResult>;
|
||||
prepareReport(candidate: DiagnosticFileCandidate, token: string): Promise<DatabaseDiagnosticOutput>;
|
||||
openFile?(path: string): Promise<void> | void;
|
||||
cancel(): void;
|
||||
}
|
||||
Reference in new issue
Block a user