2020-08-06 19:17:38 +00:00
|
|
|
// A single check step
|
|
|
|
export interface CheckStepInterface {
|
|
|
|
getName(): string;
|
2020-09-16 12:52:10 +00:00
|
|
|
// return [errors, warnings]
|
|
|
|
check(): Promise<[string[], string[]]>;
|
2020-08-06 19:17:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// An action for a check, fix, or update, or a combination.
|
|
|
|
export interface ActionInterface {
|
|
|
|
getName(): string;
|
2020-08-10 08:56:41 +00:00
|
|
|
// return check steps for sanity check (0, 1, or more)
|
|
|
|
getSanityChecks(): CheckStepInterface[];
|
|
|
|
// return check steps for consistenct check (0, 1, or more)
|
2020-09-23 13:47:24 +00:00
|
|
|
getConsistencyChecks?(): CheckStepInterface[];
|
|
|
|
sanityFix?(): Promise<void>;
|
|
|
|
consistencyFix?(): Promise<void>;
|
2021-03-01 14:46:10 +00:00
|
|
|
updateAuto?(): Promise<void>; // For regular automatic updates (from external source)
|
|
|
|
updateManual?(): Promise<void>; // For occasional manual updates (from external source)
|
2020-08-06 19:17:38 +00:00
|
|
|
}
|
2020-08-10 08:56:41 +00:00
|
|
|
|
|
|
|
export enum FixCheckMode {
|
|
|
|
CheckSanityOnly = 1,
|
|
|
|
CheckAll,
|
|
|
|
FixSanityOnly,
|
|
|
|
FixAll
|
|
|
|
}
|