fix(web): open artifacts outside the installed app context

This commit is contained in:
2026-10-20 20:03:41 +01:00
parent 5014c9e61f
commit 06dddb002a
13 changed files with 388 additions and 92 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
// A shell cache for an installed Pipelines app. The API (the WebSocket proxy and
// artifact files) is never cached; static files prefer the network and fall back
// to the last good copy so an installed app still opens when the server is away.
const CACHE = "pipelines-shell-v7";
const CACHE = "pipelines-shell-v8";
const SHELL = ["/", "/index.html", "/manifest.webmanifest", "/favicon.svg"];
self.addEventListener("install", (event) => {
@@ -18,7 +18,7 @@ self.addEventListener("activate", (event) => {
event.waitUntil(
caches
.keys()
.then((keys) => Promise.all(keys.filter((key) => key !== CACHE).map((key) => caches.delete(key))))
.then((keys) => Promise.all(keys.filter((key) => key.startsWith("pipelines-shell-") && key !== CACHE).map((key) => caches.delete(key))))
.then(() => self.clients.claim()),
);
});