@axium/client 0.39.4 → 0.39.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/pwa.d.ts +0 -2
- package/dist/web/service-worker.js +8 -5
- package/lib/tsconfig.json +1 -2
- package/package.json +2 -2
package/dist/web/pwa.d.ts
CHANGED
|
@@ -8,13 +8,11 @@ export type PageMessage = {
|
|
|
8
8
|
export interface WorkerInstalled {
|
|
9
9
|
type: 'install';
|
|
10
10
|
version: string;
|
|
11
|
-
base: string;
|
|
12
11
|
error: string | null;
|
|
13
12
|
}
|
|
14
13
|
export interface WorkerUpdateActivated {
|
|
15
14
|
type: 'update';
|
|
16
15
|
version: string;
|
|
17
|
-
base: string;
|
|
18
16
|
}
|
|
19
17
|
export type WorkerMessage = WorkerInstalled | WorkerUpdateActivated;
|
|
20
18
|
export interface Status {
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { version } from '$app/env';
|
|
2
|
+
import { assets, immutable } from '$app/manifest';
|
|
3
|
+
import { asset, resolve } from '$app/paths';
|
|
2
4
|
const cacheName = 'axium@' + version;
|
|
3
|
-
const versionFile =
|
|
4
|
-
const
|
|
5
|
+
const versionFile = resolve('_app/version.json'), shell = resolve('_axium/shell');
|
|
6
|
+
const build = immutable.map(({ path }) => resolve(path));
|
|
7
|
+
const precache = new Set([...build, ...assets.map(({ path }) => asset(path)), shell]);
|
|
5
8
|
async function install() {
|
|
6
9
|
let error = null;
|
|
7
10
|
try {
|
|
@@ -16,7 +19,7 @@ async function install() {
|
|
|
16
19
|
finally {
|
|
17
20
|
const clients = await globalThis.clients.matchAll({ includeUncontrolled: true, type: 'window' });
|
|
18
21
|
for (const client of clients)
|
|
19
|
-
client.postMessage({ type: 'install', version,
|
|
22
|
+
client.postMessage({ type: 'install', version, error });
|
|
20
23
|
}
|
|
21
24
|
}
|
|
22
25
|
globalThis.addEventListener('install', event => event.waitUntil(install()));
|
|
@@ -25,7 +28,7 @@ async function activate() {
|
|
|
25
28
|
await globalThis.clients.claim();
|
|
26
29
|
const clients = await globalThis.clients.matchAll({ includeUncontrolled: true, type: 'window' });
|
|
27
30
|
for (const client of clients)
|
|
28
|
-
client.postMessage({ type: 'update', version
|
|
31
|
+
client.postMessage({ type: 'update', version });
|
|
29
32
|
}
|
|
30
33
|
globalThis.addEventListener('activate', event => event.waitUntil(activate()));
|
|
31
34
|
async function maybeCached(request) {
|
package/lib/tsconfig.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axium/client",
|
|
3
|
-
"version": "0.39.
|
|
3
|
+
"version": "0.39.5",
|
|
4
4
|
"author": "James Prevett <jp@jamespre.dev>",
|
|
5
5
|
"funding": {
|
|
6
6
|
"type": "individual",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@james-pre/systemd": "^0.2.0",
|
|
62
62
|
"@simplewebauthn/browser": "^14.0.0",
|
|
63
63
|
"commander": "^15.0.0",
|
|
64
|
-
"music-metadata": "^
|
|
64
|
+
"music-metadata": "^12.0.0",
|
|
65
65
|
"socket.io-client": "^4.8.3"
|
|
66
66
|
}
|
|
67
67
|
}
|