Update types
This commit is contained in:
parent
063d78fad5
commit
1b21e194cf
1 changed files with 4 additions and 4 deletions
|
|
@ -4,26 +4,22 @@ import type { Logger } from "./logger";
|
||||||
export interface SyncCreateDetails {
|
export interface SyncCreateDetails {
|
||||||
type: SyncType.CREATE;
|
type: SyncType.CREATE;
|
||||||
relativePath: RelativePath;
|
relativePath: RelativePath;
|
||||||
author?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SyncUpdateDetails {
|
export interface SyncUpdateDetails {
|
||||||
type: SyncType.UPDATE;
|
type: SyncType.UPDATE;
|
||||||
relativePath: RelativePath;
|
relativePath: RelativePath;
|
||||||
author?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SyncMovedDetails {
|
export interface SyncMovedDetails {
|
||||||
type: SyncType.MOVE;
|
type: SyncType.MOVE;
|
||||||
relativePath: RelativePath;
|
relativePath: RelativePath;
|
||||||
movedFrom: RelativePath;
|
movedFrom: RelativePath;
|
||||||
author?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SyncDeleteDetails {
|
export interface SyncDeleteDetails {
|
||||||
type: SyncType.DELETE;
|
type: SyncType.DELETE;
|
||||||
relativePath: RelativePath;
|
relativePath: RelativePath;
|
||||||
author?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SyncSkippedDetails {
|
export interface SyncSkippedDetails {
|
||||||
|
|
@ -42,6 +38,7 @@ export interface CommonHistoryEntry {
|
||||||
status: SyncStatus;
|
status: SyncStatus;
|
||||||
message: string;
|
message: string;
|
||||||
details: SyncDetails;
|
details: SyncDetails;
|
||||||
|
author?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum SyncType {
|
export enum SyncType {
|
||||||
|
|
@ -165,6 +162,9 @@ export class SyncHistory {
|
||||||
this.status.error++;
|
this.status.error++;
|
||||||
this.logger.error(`Cannot sync file: ${message}`);
|
this.logger.error(`Cannot sync file: ${message}`);
|
||||||
break;
|
break;
|
||||||
|
case SyncStatus.SKIPPED:
|
||||||
|
this.logger.error(`Skipping file: ${message}`);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.syncHistoryUpdateListeners.forEach((listener) => {
|
this.syncHistoryUpdateListeners.forEach((listener) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue