Update types

This commit is contained in:
Andras Schmelczer 2025-05-24 19:02:27 +01:00
parent 063d78fad5
commit 1b21e194cf
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -4,26 +4,22 @@ import type { Logger } from "./logger";
export interface SyncCreateDetails {
type: SyncType.CREATE;
relativePath: RelativePath;
author?: string;
}
export interface SyncUpdateDetails {
type: SyncType.UPDATE;
relativePath: RelativePath;
author?: string;
}
export interface SyncMovedDetails {
type: SyncType.MOVE;
relativePath: RelativePath;
movedFrom: RelativePath;
author?: string;
}
export interface SyncDeleteDetails {
type: SyncType.DELETE;
relativePath: RelativePath;
author?: string;
}
export interface SyncSkippedDetails {
@ -42,6 +38,7 @@ export interface CommonHistoryEntry {
status: SyncStatus;
message: string;
details: SyncDetails;
author?: string;
}
export enum SyncType {
@ -165,6 +162,9 @@ export class SyncHistory {
this.status.error++;
this.logger.error(`Cannot sync file: ${message}`);
break;
case SyncStatus.SKIPPED:
this.logger.error(`Skipping file: ${message}`);
break;
}
this.syncHistoryUpdateListeners.forEach((listener) => {