@ultimat3/pwa 31.46.0 → 31.47.1
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/README.md +12 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -7,7 +7,13 @@ the second copy is the one nobody updates.
|
|
|
7
7
|
`bun add @ultimat3/pwa` · guide: [PWA And Offline](https://github.com/developerz-ai/ultimate/wiki/PWA-And-Offline)
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
|
-
|
|
10
|
+
import { generateServiceWorker, type PwaRoute } from '@ultimat3/pwa';
|
|
11
|
+
|
|
12
|
+
declare const routes: readonly PwaRoute[]; // `x build` derives these from the route table
|
|
13
|
+
declare const config: Parameters<typeof generateServiceWorker>[1];
|
|
14
|
+
declare const buildId: string;
|
|
15
|
+
|
|
16
|
+
const { source, precache, warnings } = generateServiceWorker(routes, config, buildId);
|
|
11
17
|
```
|
|
12
18
|
|
|
13
19
|
## Browser entry: `@ultimat3/pwa/client`
|
|
@@ -79,6 +85,11 @@ and the app dies with a blank screen and no error anyone can act on.
|
|
|
79
85
|
// The generated worker posts this to every page it controls, on activation — and this is the
|
|
80
86
|
// whole message, which `version-skew.test.ts` holds the interface to.
|
|
81
87
|
// { type: 'AppUpdateAvailable', to: BUILD_ID }
|
|
88
|
+
import { detectSkew } from '@ultimat3/pwa/client';
|
|
89
|
+
|
|
90
|
+
declare const message: { readonly to: string };
|
|
91
|
+
declare const clientBuildId: string;
|
|
92
|
+
|
|
82
93
|
detectSkew(clientBuildId, message.to); // 'current' | 'stale' | 'unknown'
|
|
83
94
|
```
|
|
84
95
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/pwa",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.47.1",
|
|
4
4
|
"description": "Generated service worker, web manifest, icons, push and version-skew handling.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ultimate",
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"test": "bun test"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@ultimat3/action": "31.
|
|
49
|
-
"@ultimat3/core": "31.
|
|
50
|
-
"@ultimat3/i18n": "31.
|
|
51
|
-
"@ultimat3/policy": "31.
|
|
52
|
-
"@ultimat3/schema": "31.
|
|
48
|
+
"@ultimat3/action": "31.47.1",
|
|
49
|
+
"@ultimat3/core": "31.47.1",
|
|
50
|
+
"@ultimat3/i18n": "31.47.1",
|
|
51
|
+
"@ultimat3/policy": "31.47.1",
|
|
52
|
+
"@ultimat3/schema": "31.47.1"
|
|
53
53
|
}
|
|
54
54
|
}
|