feat(boardwalk): expose the admin build id and show a reload banner when a new build is deployed (quick-261028-rqb)
- boardwalk.BuildID hashes the dist tree plus the binary's build info once
per handler; X-Summer-Build on every response, {prefix}/build.json and the
summer-admin-build meta carry it
- the SPA reads the booted build, re-checks on focus, visibility and every
5 minutes, and shows UpdateBanner on a different build
This commit is contained in:
@@ -2,6 +2,7 @@ import { createApp } from 'vue'
|
||||
import App from './App.vue'
|
||||
import { createAdminRouter } from './app/router'
|
||||
import { onUnauthorized } from './api/client'
|
||||
import { startBuildWatch } from './app/buildUpdate'
|
||||
import { loadFieldTypes } from './app/fieldTypes'
|
||||
import { loadStrings } from './app/i18n'
|
||||
import { expireSession, me } from './state/useAuth'
|
||||
@@ -37,6 +38,9 @@ async function boot(): Promise<void> {
|
||||
app.use(router)
|
||||
await router.isReady()
|
||||
app.mount('#app')
|
||||
// The new-version check; it stays off when the served index carries no
|
||||
// build (the dev server).
|
||||
startBuildWatch()
|
||||
}
|
||||
|
||||
void boot()
|
||||
|
||||
Reference in New Issue
Block a user