2017-01-15 14:05:25 +00:00
|
|
|
#!/usr/bin/env node
|
|
|
|
|
2021-04-09 14:16:00 +00:00
|
|
|
import { logger } from './logger';
|
2019-06-28 07:18:05 +00:00
|
|
|
import * as proxy from './proxy';
|
2019-05-28 09:21:17 +00:00
|
|
|
import * as globalWorker from './workers/global';
|
2017-01-15 14:05:25 +00:00
|
|
|
|
2021-04-09 14:16:00 +00:00
|
|
|
// istanbul ignore next
|
|
|
|
process.on('unhandledRejection', (err) => {
|
|
|
|
logger.error({ err }, 'unhandledRejection');
|
|
|
|
});
|
|
|
|
|
2019-06-28 07:18:05 +00:00
|
|
|
proxy.bootstrap();
|
|
|
|
|
2020-04-09 10:47:48 +00:00
|
|
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
2019-11-24 07:43:24 +00:00
|
|
|
(async (): Promise<void> => {
|
2019-08-15 10:43:13 +00:00
|
|
|
process.exitCode = await globalWorker.start();
|
2021-03-16 12:34:43 +00:00
|
|
|
// istanbul ignore if
|
|
|
|
if (process.env.RENOVATE_X_HARD_EXIT) {
|
|
|
|
process.exit(process.exitCode);
|
|
|
|
}
|
2018-03-09 11:00:57 +00:00
|
|
|
})();
|