serwist 9.0.8 → 9.1.0-preview.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": "serwist",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.1.0-preview.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A Swiss Army knife for service workers.",
|
|
6
6
|
"files": [
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"idb": "8.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"rollup": "4.
|
|
56
|
-
"typescript": "5.6.
|
|
57
|
-
"@serwist/configs": "9.0.
|
|
58
|
-
"@serwist/utils": "9.0.
|
|
55
|
+
"rollup": "4.24.3",
|
|
56
|
+
"typescript": "5.6.3",
|
|
57
|
+
"@serwist/configs": "9.1.0-preview.0",
|
|
58
|
+
"@serwist/utils": "9.1.0-preview.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"typescript": ">=5.0.0"
|
|
@@ -35,7 +35,7 @@ export interface PrecacheFallbackPluginOptions {
|
|
|
35
35
|
*/
|
|
36
36
|
fallbackUrls: (string | PrecacheFallbackEntry)[];
|
|
37
37
|
/**
|
|
38
|
-
* An optional {@linkcode PrecacheController} instance. If not provided,
|
|
38
|
+
* An optional {@linkcode PrecacheController} instance. If not provided,
|
|
39
39
|
* the default {@linkcode PrecacheController} will be used.
|
|
40
40
|
*/
|
|
41
41
|
precacheController?: PrecacheController;
|
|
@@ -145,7 +145,7 @@ export class ExpirationPlugin implements SerwistPlugin {
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
/**
|
|
148
|
-
* A lifecycle callback that will be triggered automatically when a
|
|
148
|
+
* A lifecycle callback that will be triggered automatically when a
|
|
149
149
|
* response is about to be returned from a [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).
|
|
150
150
|
* It allows the response to be inspected for freshness and
|
|
151
151
|
* prevents it from being used if the response's `Date` header value is
|
package/src/types.ts
CHANGED
|
@@ -27,13 +27,13 @@ export interface RouteMatchCallbackOptions {
|
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* The match callback is used to determine if a route should apply for a
|
|
30
|
-
* particular URL and request.
|
|
31
|
-
*
|
|
30
|
+
* particular URL and request.
|
|
31
|
+
*
|
|
32
32
|
* When matching occurs in response to a `fetch` event from the client, the `event`
|
|
33
33
|
* object is also supplied. However, since the match callback can be invoked outside
|
|
34
34
|
* of a `fetch` event, matching logic should not assume the `event` object will always
|
|
35
35
|
* be available.
|
|
36
|
-
*
|
|
36
|
+
*
|
|
37
37
|
* If the match callback returns a truthy value, the matching route's
|
|
38
38
|
* handler will be invoked immediately. If the value returned is a non-empty array
|
|
39
39
|
* or object, that value will be the handler's `options.params` argument.
|
|
@@ -77,7 +77,7 @@ export interface ManualHandlerCallbackOptions {
|
|
|
77
77
|
export type HandlerCallbackOptions = RouteHandlerCallbackOptions | ManualHandlerCallbackOptions;
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
|
-
* The "handler" callback is invoked whenever a request is matched to a
|
|
80
|
+
* The "handler" callback is invoked whenever a request is matched to a
|
|
81
81
|
* {@linkcode Route} via its {@linkcode RouteMatchCallback} This handler
|
|
82
82
|
* callback should return a promise that resolves to a response.
|
|
83
83
|
*
|
|
@@ -87,7 +87,7 @@ export type HandlerCallbackOptions = RouteHandlerCallbackOptions | ManualHandler
|
|
|
87
87
|
export type RouteHandlerCallback = (options: RouteHandlerCallbackOptions) => Promise<Response>;
|
|
88
88
|
|
|
89
89
|
/**
|
|
90
|
-
* The "handler" callback is invoked whenever a request is matched to a
|
|
90
|
+
* The "handler" callback is invoked whenever a request is matched to a
|
|
91
91
|
* {@linkcode Route} via its {@linkcode RouteMatchCallback} This handler
|
|
92
92
|
* callback should return a promise that resolves to a response.
|
|
93
93
|
*
|