Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const file = traceJSONOutput;
let archiveFile;
let rawTraceData;
try {
rawTraceData = JSON.parse(fs.readFileSync(traceJSONOutput, 'utf8'));
} catch (error) {
this.error(`Could not find file: ${traceJSONOutput}, ${error}`);
}
try {
archiveFile = JSON.parse(fs.readFileSync(archive, 'utf8'));
} catch (error) {
this.error(`Could not find archive file: ${archive}, ${error}`);
}
await analyze({
archiveFile,
event,
file,
methods,
rawTraceData,
report,
});
}
}