feat: Allow specify cache in App opts.

main
ギャラ 2022-10-23 17:00:16 +09:00
parent e3a037dcac
commit fa6893eeb3
No known key found for this signature in database
GPG Key ID: 686F3411A9823621
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ export type Opts = {
exporter: string;
noProgress: boolean;
monitor: boolean;
cache?: Cache;
};
export const DEFAULT_OPTS: Opts = {
@ -225,7 +226,7 @@ export class App {
const exporters = await this.getExporters();
const fetcher = new BattleFetcher({
cache: new FileCache(this.state.cacheDir),
cache: this.opts.cache ?? new FileCache(this.state.cacheDir),
state: this.state,
});
console.log("Fetching battle list...");