Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function handleStart(modulePath, givenPulse) {
if (started) {
throw new Error('Assertion failed: worker received a second start message over its IPC channel');
}
started = true;
// Start periodic health reports.
pulse = givenPulse;
if (pulse) {
tick();
}
// Start running the worker module.
Module._load(modulePath, null, true);
}
var Module = require('module')
let entrypoint = process.argv[2]
if (entrypoint) {
if (entrypoint === '-m') {
console.log(process.versions.modules)
process.exit(0)
} else if (entrypoint === '-v') {
console.log(process.versions.node)
process.exit(0)
}
Module._load(entrypoint, null, true)
process._tickCallback()
}
var _require = sandbox.require = function(path) {
if(arguments.length < 1) {
throw new SyntaxError("Wrong number of arguments (" + arguments.length + " for 1)");
}
if(path === void 0 || path === null) {
throw new TypeError("'path' is not nullable");
}
return Module._load(path, _module, true);
};
_module.filename = file;
noderequire = function(dep, thisModule){
//Call _load directly as we can't set this object for require.
return Module._load(dep, thisModule);
},