31 lines
579 B
TypeScript
31 lines
579 B
TypeScript
import initializeApp from './bootstrap/app'
|
|
import authorize from './bootstrap/authorize'
|
|
import showError from './bootstrap/error'
|
|
import preloader from './bootstrap/preloader'
|
|
import checkUpdates from './bootstrap/updater'
|
|
|
|
(async () => {
|
|
try {
|
|
await checkUpdates()
|
|
|
|
preloader.show()
|
|
|
|
await authorize()
|
|
|
|
initializeApp()
|
|
}
|
|
catch (error) {
|
|
console.error(error)
|
|
|
|
if (error instanceof Error && error.message) {
|
|
showError(error.message)
|
|
}
|
|
else {
|
|
showError('Something went wrong')
|
|
}
|
|
}
|
|
finally {
|
|
preloader.hide()
|
|
}
|
|
})()
|