@ultimat3/pwa 31.31.0 → 31.32.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ultimat3/pwa",
3
- "version": "31.31.0",
3
+ "version": "31.32.0",
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.31.0",
49
- "@ultimat3/core": "31.31.0",
50
- "@ultimat3/i18n": "31.31.0",
51
- "@ultimat3/policy": "31.31.0",
52
- "@ultimat3/schema": "31.31.0"
48
+ "@ultimat3/action": "31.32.0",
49
+ "@ultimat3/core": "31.32.0",
50
+ "@ultimat3/i18n": "31.32.0",
51
+ "@ultimat3/policy": "31.32.0",
52
+ "@ultimat3/schema": "31.32.0"
53
53
  }
54
54
  }
package/src/strategies.ts CHANGED
@@ -90,7 +90,8 @@ export function strategyFor(route: PwaRoute): StrategyName {
90
90
  if (route.strategy !== undefined) return route.strategy;
91
91
  // `network-only` is a declaration that this URL must never be answered from a cache.
92
92
  if (route.offline === 'network-only' || route.personal === true) return 'network-only';
93
- return MODE_STRATEGY[route.mode];
93
+ // Own keys only: a mode that is not one is never cached — the safe answer for an unknown page.
94
+ return Object.hasOwn(MODE_STRATEGY, route.mode) ? MODE_STRATEGY[route.mode] : 'network-only';
94
95
  }
95
96
 
96
97
  export interface StrategyEnv {