[Updater > App] Move some requires inline
This commit is contained in:
parent
5fb4664a9b
commit
d4e14ae35a
|
@ -1,13 +1,9 @@
|
||||||
const moduleUpdater = require('./moduleUpdater');
|
|
||||||
const updater = require('./updater');
|
const updater = require('./updater');
|
||||||
|
|
||||||
const settings = require('../appSettings').getSettings();
|
|
||||||
const buildInfo = require('../utils/buildInfo');
|
const buildInfo = require('../utils/buildInfo');
|
||||||
const Constants = require('../Constants');
|
const Constants = require('../Constants');
|
||||||
|
|
||||||
const { fatal, handled } = require('../errorHandler');
|
const { fatal, handled } = require('../errorHandler');
|
||||||
const firstRun = require('../firstRun');
|
|
||||||
const autoStart = require('../autoStart');
|
|
||||||
const splash = require('../splash');
|
const splash = require('../splash');
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,14 +11,14 @@ exports.update = (startMin, done, show) => {
|
||||||
if (updater.tryInitUpdater(buildInfo, Constants.NEW_UPDATE_ENDPOINT)) {
|
if (updater.tryInitUpdater(buildInfo, Constants.NEW_UPDATE_ENDPOINT)) {
|
||||||
const inst = updater.getUpdater();
|
const inst = updater.getUpdater();
|
||||||
|
|
||||||
inst.on('host-updated', () => autoStart.update(() => {}));
|
inst.on('host-updated', () => require('../autoStart').update(() => {}));
|
||||||
inst.on('unhandled-exception', fatal);
|
inst.on('unhandled-exception', fatal);
|
||||||
inst.on(updater.INCONSISTENT_INSTALLER_STATE_ERROR, fatal);
|
inst.on(updater.INCONSISTENT_INSTALLER_STATE_ERROR, fatal);
|
||||||
inst.on('update-error', handled);
|
inst.on('update-error', handled);
|
||||||
|
|
||||||
firstRun.performFirstRunTasks(inst);
|
require('../firstRun').performFirstRunTasks(inst);
|
||||||
} else {
|
} else {
|
||||||
moduleUpdater.init(Constants.UPDATE_ENDPOINT, settings, buildInfo);
|
require('./moduleUpdater').init(Constants.UPDATE_ENDPOINT, require('../appSettings').getSettings(), buildInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
splash.initSplash(startMin);
|
splash.initSplash(startMin);
|
||||||
|
|
Loading…
Reference in New Issue