UNPKG

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.

50 lines (49 loc) • 1.76 kB
import DAT from './dats/dat.js'; import File from './files/file.js'; import Options from './options.js'; import WriteCandidate from './writeCandidate.js'; export declare const GameStatus: { readonly FOUND: 1; readonly INCOMPLETE: 2; readonly MISSING: 3; readonly DUPLICATE: 4; readonly UNUSED: 5; readonly DELETED: 6; }; type GameStatusKey = keyof typeof GameStatus; export type GameStatusValue = (typeof GameStatus)[GameStatusKey]; /** * Parse and hold information about every {@link Game} in a {@link DAT}, as well as which * {@link Game}s were found (had a {@link WriteCandidate} created for it). */ export default class DATStatus { private readonly dat; private readonly allRomTypesToGames; private readonly foundRomTypesToCandidates; private readonly incompleteRomTypesToCandidates; constructor(dat: DAT, candidates: WriteCandidate[]); private static pushValueIntoMap; private static append; getDATName(): string; getInputFiles(): File[]; /** * If any {@link Game} in the entire {@link DAT} was found in the input files. */ anyGamesFound(options: Options): boolean; /** * Return a string of CLI-friendly output to be printed by a {@link Logger}. */ toConsole(options: Options): string; /** * Return the file contents of a CSV with status information for every {@link Game}. */ toCsv(options: Options): Promise<string>; /** * Return a string of CSV rows without headers for a certain {@link GameStatusValue}. */ static filesToCsv(filePaths: string[], status: GameStatusValue): Promise<string>; private static buildCsvRow; private static getValuesForAllowedTypes; private static getAllowedTypes; } export {};