* @inheritDoc
(name: string)
| 23 | * @inheritDoc |
| 24 | */ |
| 25 | get(name: string): any { |
| 26 | const path = this.path(name); |
| 27 | |
| 28 | if (!existsSync(path)) { |
| 29 | return null; |
| 30 | } |
| 31 | |
| 32 | const payload = fs.readJSONSync(path); |
| 33 | const hash = this.getHash(payload.origin); |
| 34 | |
| 35 | if (!hash || payload.hash !== hash) { |
| 36 | return null; |
| 37 | } |
| 38 | |
| 39 | return payload.data; |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * @inheritDoc |
nothing calls this directly
no test coverage detected