fix(offline): surface degraded/missing preloads, join re-entrant runs, cache manifest to IDB
- loadManifest() goes through DataCache.fetchWithFallback: the file list is written to IDB and survives SW-cache eviction; a run with the reduced fallback set is flagged and shown as degraded (new i18n en/ru/cu). - 404 answers are counted as 'missing' (deployment drift) with a preload-missing diag entry, instead of silently reporting Done. - preload() is re-entrancy safe: concurrent calls join the in-flight run. - versions.json is loaded once per session (was fetched per translation). - Write-through failures in fetchWithFallback()/fetch() log idb-write-fail. - preload-manifest.json SW route is NetworkFirst (fresh coverage online). - Manifest now also covers the shared/lives + shared/commands fallbacks.
This commit is contained in:
1 parent
1201e16d5e
commit
8c442bf7b6
7 files changed
+184
-55
No files matched your search
@@ -14,6 +14,16 @@ export default defineConfig({
|
||||
globIgnores: ['**/data/**'],
|
||||
maximumFileSizeToCacheInBytes: 20 * 1024 * 1024,
|
||||
runtimeCaching: [
|
||||
{
|
||||
// The preload file list must be fresh when online; a stale copy
|
||||
// silently loses coverage. Offline falls back to the SW copy.
|
||||
urlPattern: /\/data\/shared\/preload-manifest\.json$/,
|
||||
handler: 'NetworkFirst',
|
||||
options: {
|
||||
cacheName: 'ponomar-manifest',
|
||||
networkTimeoutSeconds: 3,
|
||||
},
|
||||
},
|
||||
{
|
||||
urlPattern: /\/data\/.*\.json$/,
|
||||
handler: 'StaleWhileRevalidate',
|
||||
|
||||
Reference in new issue
Block a user