@serwist/svelte 9.0.0-preview.13 → 9.0.0-preview.15

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.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="@sveltejs/kit" />
2
2
  import type { PrecacheEntry } from "@serwist/precaching";
3
3
  import type { RuntimeCaching } from "@serwist/sw";
4
- import { base as basePath, build as immutableAssets, files as staticAssets, prerendered as prerenderedRoutes, version as serviceWorkerVersion } from "$service-worker";
4
+ import { base as basePath, build as immutableAssets, prerendered as prerenderedRoutes, version as serviceWorkerVersion, files as staticAssets } from "$service-worker";
5
5
  export { basePath, immutableAssets, staticAssets, prerenderedRoutes, serviceWorkerVersion };
6
6
  export type StaticRevisions = string | {
7
7
  [url: string]: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.worker.d.ts","sourceRoot":"","sources":["../src/index.worker.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EACL,IAAI,IAAI,QAAQ,EAChB,KAAK,IAAI,eAAe,EACxB,KAAK,IAAI,YAAY,EACrB,WAAW,IAAI,iBAAiB,EAChC,OAAO,IAAI,oBAAoB,EAChC,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;AAE5F,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,aAAa,EAAE,KAAK;IAC7D,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CACjC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;CACjC,CAAC;AAEF,MAAM,WAAW,0BAA0B;IACzC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CAC1C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,sGAM7B,0BAA0B,KAAQ,aAAa,EAAE,GAAG,SA2CtD,CAAC;AAEF,eAAO,MAAM,0BAA0B,UAAgC,CAAC;AAExE,eAAO,MAAM,YAAY,EAAE,cAAc,EA4GxC,CAAC"}
@@ -55,7 +55,8 @@ const defaultCache = [
55
55
  plugins: [
56
56
  new ExpirationPlugin({
57
57
  maxEntries: 4,
58
- maxAgeSeconds: 365 * 24 * 60 * 60
58
+ maxAgeSeconds: 365 * 24 * 60 * 60,
59
+ maxAgeFrom: "last-used"
59
60
  })
60
61
  ]
61
62
  })
@@ -67,7 +68,8 @@ const defaultCache = [
67
68
  plugins: [
68
69
  new ExpirationPlugin({
69
70
  maxEntries: 4,
70
- maxAgeSeconds: 7 * 24 * 60 * 60
71
+ maxAgeSeconds: 7 * 24 * 60 * 60,
72
+ maxAgeFrom: "last-used"
71
73
  })
72
74
  ]
73
75
  })
@@ -79,7 +81,8 @@ const defaultCache = [
79
81
  plugins: [
80
82
  new ExpirationPlugin({
81
83
  maxEntries: 64,
82
- maxAgeSeconds: 24 * 60 * 60
84
+ maxAgeSeconds: 24 * 60 * 60,
85
+ maxAgeFrom: "last-used"
83
86
  })
84
87
  ]
85
88
  })
@@ -91,7 +94,8 @@ const defaultCache = [
91
94
  plugins: [
92
95
  new ExpirationPlugin({
93
96
  maxEntries: 32,
94
- maxAgeSeconds: 24 * 60 * 60
97
+ maxAgeSeconds: 24 * 60 * 60,
98
+ maxAgeFrom: "last-used"
95
99
  })
96
100
  ]
97
101
  })
@@ -103,7 +107,8 @@ const defaultCache = [
103
107
  plugins: [
104
108
  new ExpirationPlugin({
105
109
  maxEntries: 32,
106
- maxAgeSeconds: 24 * 60 * 60
110
+ maxAgeSeconds: 24 * 60 * 60,
111
+ maxAgeFrom: "last-used"
107
112
  })
108
113
  ]
109
114
  })
@@ -115,7 +120,8 @@ const defaultCache = [
115
120
  plugins: [
116
121
  new ExpirationPlugin({
117
122
  maxEntries: 32,
118
- maxAgeSeconds: 24 * 60 * 60
123
+ maxAgeSeconds: 24 * 60 * 60,
124
+ maxAgeFrom: "last-used"
119
125
  })
120
126
  ]
121
127
  })
@@ -128,7 +134,8 @@ const defaultCache = [
128
134
  plugins: [
129
135
  new ExpirationPlugin({
130
136
  maxEntries: 16,
131
- maxAgeSeconds: 24 * 60 * 60
137
+ maxAgeSeconds: 24 * 60 * 60,
138
+ maxAgeFrom: "last-used"
132
139
  })
133
140
  ],
134
141
  networkTimeoutSeconds: 10
@@ -141,7 +148,8 @@ const defaultCache = [
141
148
  plugins: [
142
149
  new ExpirationPlugin({
143
150
  maxEntries: 32,
144
- maxAgeSeconds: 24 * 60 * 60
151
+ maxAgeSeconds: 24 * 60 * 60,
152
+ maxAgeFrom: "last-used"
145
153
  })
146
154
  ],
147
155
  networkTimeoutSeconds: 10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/svelte",
3
- "version": "9.0.0-preview.13",
3
+ "version": "9.0.0-preview.15",
4
4
  "type": "module",
5
5
  "description": "A module that complements SvelteKit's built-in service worker support.",
6
6
  "files": [
@@ -40,21 +40,21 @@
40
40
  "./package.json": "./package.json"
41
41
  },
42
42
  "dependencies": {
43
- "@serwist/core": "9.0.0-preview.13",
44
- "@serwist/expiration": "9.0.0-preview.13",
45
- "@serwist/strategies": "9.0.0-preview.13"
43
+ "@serwist/core": "9.0.0-preview.15",
44
+ "@serwist/expiration": "9.0.0-preview.15",
45
+ "@serwist/strategies": "9.0.0-preview.15"
46
46
  },
47
47
  "devDependencies": {
48
- "@sveltejs/kit": "2.5.2",
49
- "rollup": "4.12.0",
50
- "@serwist/constants": "9.0.0-preview.13",
51
- "@serwist/precaching": "9.0.0-preview.13",
52
- "@serwist/sw": "9.0.0-preview.13"
48
+ "@sveltejs/kit": "2.5.4",
49
+ "rollup": "4.13.0",
50
+ "@serwist/constants": "9.0.0-preview.15",
51
+ "@serwist/precaching": "9.0.0-preview.15",
52
+ "@serwist/sw": "9.0.0-preview.15"
53
53
  },
54
54
  "peerDependencies": {
55
55
  "@sveltejs/kit": ">=2.0.0",
56
56
  "typescript": ">=5.0.0",
57
- "@serwist/sw": "9.0.0-preview.13"
57
+ "@serwist/sw": "9.0.0-preview.15"
58
58
  },
59
59
  "peerDependenciesMeta": {
60
60
  "@serwist/sw": {
@@ -7,9 +7,9 @@ import type { RuntimeCaching } from "@serwist/sw";
7
7
  import {
8
8
  base as basePath,
9
9
  build as immutableAssets,
10
- files as staticAssets,
11
10
  prerendered as prerenderedRoutes,
12
11
  version as serviceWorkerVersion,
12
+ files as staticAssets,
13
13
  } from "$service-worker";
14
14
 
15
15
  export { basePath, immutableAssets, staticAssets, prerenderedRoutes, serviceWorkerVersion };
@@ -131,6 +131,7 @@ export const defaultCache: RuntimeCaching[] = [
131
131
  new ExpirationPlugin({
132
132
  maxEntries: 4,
133
133
  maxAgeSeconds: 365 * 24 * 60 * 60, // 365 days
134
+ maxAgeFrom: "last-used",
134
135
  }),
135
136
  ],
136
137
  }),
@@ -143,6 +144,7 @@ export const defaultCache: RuntimeCaching[] = [
143
144
  new ExpirationPlugin({
144
145
  maxEntries: 4,
145
146
  maxAgeSeconds: 7 * 24 * 60 * 60, // 7 days
147
+ maxAgeFrom: "last-used",
146
148
  }),
147
149
  ],
148
150
  }),
@@ -155,6 +157,7 @@ export const defaultCache: RuntimeCaching[] = [
155
157
  new ExpirationPlugin({
156
158
  maxEntries: 64,
157
159
  maxAgeSeconds: 24 * 60 * 60, // 24 hours
160
+ maxAgeFrom: "last-used",
158
161
  }),
159
162
  ],
160
163
  }),
@@ -167,6 +170,7 @@ export const defaultCache: RuntimeCaching[] = [
167
170
  new ExpirationPlugin({
168
171
  maxEntries: 32,
169
172
  maxAgeSeconds: 24 * 60 * 60, // 24 hours
173
+ maxAgeFrom: "last-used",
170
174
  }),
171
175
  ],
172
176
  }),
@@ -179,6 +183,7 @@ export const defaultCache: RuntimeCaching[] = [
179
183
  new ExpirationPlugin({
180
184
  maxEntries: 32,
181
185
  maxAgeSeconds: 24 * 60 * 60, // 24 hours
186
+ maxAgeFrom: "last-used",
182
187
  }),
183
188
  ],
184
189
  }),
@@ -191,6 +196,7 @@ export const defaultCache: RuntimeCaching[] = [
191
196
  new ExpirationPlugin({
192
197
  maxEntries: 32,
193
198
  maxAgeSeconds: 24 * 60 * 60, // 24 hours
199
+ maxAgeFrom: "last-used",
194
200
  }),
195
201
  ],
196
202
  }),
@@ -204,6 +210,7 @@ export const defaultCache: RuntimeCaching[] = [
204
210
  new ExpirationPlugin({
205
211
  maxEntries: 16,
206
212
  maxAgeSeconds: 24 * 60 * 60, // 24 hours
213
+ maxAgeFrom: "last-used",
207
214
  }),
208
215
  ],
209
216
  networkTimeoutSeconds: 10, // fallback to cache if API does not response within 10 seconds
@@ -217,6 +224,7 @@ export const defaultCache: RuntimeCaching[] = [
217
224
  new ExpirationPlugin({
218
225
  maxEntries: 32,
219
226
  maxAgeSeconds: 24 * 60 * 60, // 24 hours
227
+ maxAgeFrom: "last-used",
220
228
  }),
221
229
  ],
222
230
  networkTimeoutSeconds: 10,