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.
29 lines (28 loc) • 1.04 kB
TypeScript
import { MultiBar, SingleBar } from 'cli-progress';
import ProgressBarPayload from './progressBarPayload.js';
/**
* A wrapper class for a cli-progress {@link SingleBar} that formats the output.
*/
export default class SingleBarFormatted {
static readonly MAX_NAME_LENGTH = 35;
static readonly BAR_COMPLETE_CHAR = "\u2588";
static readonly BAR_IN_PROGRESS_CHAR = "\u2592";
static readonly BAR_INCOMPLETE_CHAR = "\u2591";
private readonly multiBar;
private readonly singleBar;
private lastOutput?;
private valueTimeBuffer;
private lastEtaTime;
private lastEtaValue;
constructor(multiBar: MultiBar, initialTotal: number, initialPayload: ProgressBarPayload);
getSingleBar(): SingleBar;
getLastOutput(): string | undefined;
private static getSymbolAndName;
private getProgress;
private calculateEta;
private static getBar;
private getEtaFormatted;
private static getEtaFormattedDays;
private static getEtaFormattedHours;
private static getEtaFormattedMinutes;
}