()
| 102 | Object.defineProperty(acc, path, { |
| 103 | enumerable: true, |
| 104 | get() { |
| 105 | if (cache) { |
| 106 | return cache; |
| 107 | } |
| 108 | if (!fileNames.includes(path)) { |
| 109 | return Promise.reject('No file named ' + path); |
| 110 | } |
| 111 | cache = firstValueFrom(host.read(join(outputPath, path))).then((content) => |
| 112 | virtualFs.fileBufferToString(content), |
| 113 | ); |
| 114 | |
| 115 | return cache; |
| 116 | }, |
| 117 | }); |
| 118 | |
| 119 | return acc; |