Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}).catch((err) => {
mainStory.error('scanner', err.message, {attach: err});
httpEventEmitter.emit(scanError, {error: err, ok: false});
});
mediastic.use((metadata, next) => {
mainStory.trace('scanner', 'Working on '+ metadata.path);
try {
next();
} catch (err) {
mainStory.error('scanner', 'Uncaught exception', {attach: err});
}
});
httpServer.on('error', () => {
mainStory.warn('http', `Port ${String(port)} busy`);
port += 1;
if (port >= initialPort + 20) {
mainStory.error('http', 'Cannot open port (tried 20 times)');
return;
}
httpServer.listen(port);
});
httpServer.on('listening', () => {
}).catch((err) => {
res.send({ok: false, error: 'An error has occured while creating a report'});
mainStory.error('analytics', 'An error occured', {attach: err});
});
});
checkStatus(state.props._id, state.dirtyFields).catch((err) => {
mainStory.error('tracker', 'Error', {
attach: err
});
});
return Promise.resolve();
const readOneSpec = (pkgPath: string): OaoSpecs => {
const pkg = {};
pkg.pkgPath = pkgPath;
try {
pkg.specPath = path.resolve(process.cwd(), pkgPath, 'package.json');
pkg.specs = JSON.parse(fs.readFileSync(pkg.specPath, 'utf8'));
} catch (err) {
mainStory.error(`Could not read package.json at ${pkg.specPath}`);
throw err;
}
const name = pkgPath === '.' ? ROOT_PACKAGE : pkg.specs.name;
validatePkgName(pkgPath, name);
pkg.name = name;
pkg.displayName = name === ROOT_PACKAGE ? 'MONOREPO ROOT' : name;
return pkg;
};
const validateVersionIncrement = incrementVersionBy => {
if (INCREMENTS.indexOf(incrementVersionBy) < 0) {
mainStory.error(
`Value specified for --increment-version-by: ${chalk.bold(
incrementVersionBy
)} is invalid.`
);
mainStory.error(
`It should be one of (${INCREMENTS.join(', ')}), or not specified.`
);
if (!DEBUG_SKIP_CHECKS) throw new Error('INVALID_INCREMENT_BY_VALUE');
}
};
.on('error', function (err) {
mainStory.error('transcoder', `Couldn't transcode using ffmpeg`, {attach: err})
reject(err);
})
.output(output).run();
}).catch((err) => {
mainStory.error('artwork-agent', 'Uncaught error', {attach: err});
fs.unlink(filePath + '.lock');
});
}
}).catch((err) => {
mainStory.error('aquarelle', 'Error while setting album artwwork from URL '+req.body.url, {
attach: err
});
return res.status(500).send({ok: false});
})