Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const savedConsole = console;
const builtIn = Module.builtinModules.filter(i => {
switch (i) {
case "sys":
return false;
}
if (/^(?:v8|node-inspect)\//g.test(i)) return false;
return true;
});
let cache;
if (config.cache) {
registerCache.load();
cache = registerCache.get();
}
let babelOpts = config.babelOpts || {};
babelOpts = {
...babelOpts,
caller: {
name: "@effectful/debugger",
...(babelOpts.caller || {})
}
};
const log = (...args) => console.log(...args);
function mtime(filename) {
return +fs.statSync(filename).mtime;
retrieveSourceMap: function(file) {
var cache = babelRegisterCache.get(),
sourceMap = null;
Object.keys(cache).some(function(hash) {
var fileCache = cache[hash];
if (typeof fileCache == 'undefined' || typeof fileCache.options == 'undefined'
|| fileCache.options.filename != file
) {
return false;
}
sourceMap = {
url: file,
map: fileCache.map
};