Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
retrieveSourceMap(filePath) {
const cacheFilePath = join(optionsScopedCachePath, filePathToCacheFileName(filePath));
const cachedOutput = readCacheFileSync(cacheFilePath);
if (cachedOutput && cachedOutput.mtime === statSync(filePath).mtime.getTime()) {
const { sourceMapText, outputText } = cachedOutput;
const map = sourceMapText || extractInlineSourceMap(outputText);
if (map) {
return { map, url: filePath };
}
}
return null;
}
});