igir
Version:
🕹 A zero-setup ROM collection manager that sorts, filters, extracts or archives, patches, and reports on collections of any size on any OS.
85 lines (84 loc) • 2.77 kB
TypeScript
import { LogLevelValue } from './logLevel.js';
/**
* @see https://www.toptal.com/designers/htmlarrows/symbols/
* @see https://www.htmlsymbols.xyz/
* @see https://www.fileformat.info/info/unicode/font/lucida_console/grid.htm (win32)
*/
export declare const ProgressBarSymbol: {
NONE: string;
WAITING: string;
DONE: string;
FILE_SCANNING: string;
DAT_DOWNLOADING: string;
DAT_PARSING: string;
ROM_HASHING: string;
ROM_HEADER_DETECTION: string;
ROM_INDEXING: string;
DAT_GROUPING_SIMILAR: string;
DAT_MERGE_SPLIT: string;
DAT_FILTERING: string;
DAT_PREFERRING: string;
CANDIDATE_GENERATING: string;
CANDIDATE_EXTENSION_CORRECTION: string;
CANDIDATE_HASHING: string;
CANDIDATE_VALIDATING: string;
CANDIDATE_COMBINING: string;
TESTING: string;
WRITING: string;
RECYCLING: string;
DELETING: string;
};
/**
* ProgressBar represents a single progress bar (of potentially many) to present completion
* information about an operation.
*/
export default abstract class ProgressBar {
abstract reset(total: number): void;
abstract setName(name: string): void;
abstract setSymbol(symbol: string): void;
abstract addWaitingMessage(waitingMessage: string): void;
abstract removeWaitingMessage(waitingMessage: string): void;
abstract incrementTotal(increment: number): void;
abstract incrementProgress(): void;
abstract incrementDone(message?: string): void;
abstract update(current: number, message?: string): void;
abstract done(finishedMessage?: string): void;
/**
* Call the `done()` method with a completion message that indicates how many items were
* processed.
*/
doneItems(count: number, noun: string, verb: string): void;
abstract setLoggerPrefix(prefix: string): void;
abstract log(logLevel: LogLevelValue, message: string): void;
/**
* Log a TRACE message.
*
* This should be used to log internal actions that most users shouldn't care about, but could be
* helpful in bug reports.
*/
logTrace(message: string): void;
/**
* Log a DEBUG message.
*
* This should be used to log actions that weren't taken (i.e. skipped writing a ROM because it
* already exists, etc.).
*/
logDebug(message: string): void;
/**
* Log an INFO message.
*
* This should be used to log actions that were taken (i.e. copying/moving ROMs, recycling files,
* writing DATs, etc.).
*/
logInfo(message: string): void;
/**
* Log a WARN message.
*/
logWarn(message: string): void;
/**
* Log an ERROR message.
*/
logError(message: string): void;
abstract freeze(): void;
abstract delete(): void;
}