()
| 84 | } |
| 85 | |
| 86 | combine(): string | void { |
| 87 | if (!this.#options.combined) { |
| 88 | return; |
| 89 | } |
| 90 | |
| 91 | let path = typeof this.#options.combined === 'string' ? this.#options.combined : './metadata.json'; |
| 92 | path = fs.normalizePath(this.#options.cacheDir, path); |
| 93 | this.#options.combined = path; // override in the options, so we can log it from the CLI in `cache:generate` command |
| 94 | writeFileSync(path, JSON.stringify(this.#cache, null, this.#pretty ? 2 : undefined)); |
| 95 | |
| 96 | return path; |
| 97 | } |
| 98 | |
| 99 | private path(name: string): string { |
| 100 | fs.ensureDir(this.#options.cacheDir); |
nothing calls this directly
no test coverage detected