(raw)
| 228 | } |
| 229 | |
| 230 | function parseMaybeDataJs(raw) { |
| 231 | const trimmed = raw.trim() |
| 232 | |
| 233 | if (trimmed.startsWith('window.BENCHMARK_DATA')) { |
| 234 | const sandbox = { window: {} } |
| 235 | vm.runInNewContext(trimmed, sandbox, { timeout: 1000 }) |
| 236 | return sandbox.window.BENCHMARK_DATA |
| 237 | } |
| 238 | |
| 239 | return JSON.parse(trimmed) |
| 240 | } |
| 241 | |
| 242 | function resolveManifestChunkKey(manifest, keyOrFile) { |
| 243 | if (manifest[keyOrFile]) { |
no test coverage detected