@serwist/sw 9.0.0-preview.4 → 9.0.0-preview.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/index.js +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/registerRuntimeCaching.ts +1 -1
- package/src/types.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -45,7 +45,7 @@ const registerRuntimeCaching = (...runtimeCachingList)=>{
|
|
|
45
45
|
logger.log("registerRuntimeCaching is disabled in development mode.");
|
|
46
46
|
} else {
|
|
47
47
|
for (const entry of runtimeCachingList){
|
|
48
|
-
registerRoute(entry.
|
|
48
|
+
registerRoute(entry.matcher, entry.handler, entry.method);
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
51
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -12,13 +12,13 @@ export interface RuntimeCaching {
|
|
|
12
12
|
* This match criteria determines whether the configured handler will
|
|
13
13
|
* generate a response for any requests that don't match one of the precached
|
|
14
14
|
* URLs. If multiple `RuntimeCaching` routes are defined, then the first one
|
|
15
|
-
* whose `
|
|
15
|
+
* whose `matcher` matches will be the one that responds.
|
|
16
16
|
*
|
|
17
17
|
* This value directly maps to the first parameter passed to
|
|
18
18
|
* `@serwist/routing.registerRoute`. It's recommended to use a
|
|
19
19
|
* `@serwist/core.RouteMatchCallback` function for greatest flexibility.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
matcher: RegExp | string | RouteMatchCallback;
|
|
22
22
|
/**
|
|
23
23
|
* This determines how the runtime route will generate a response. It
|
|
24
24
|
* can be a `@serwist/core.RouteHandler` callback function with custom
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;;;;;;OASG;IACH,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,MAAM,WAAW,cAAc;IAC7B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB;;;;;;;;;OASG;IACH,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,kBAAkB,CAAC;IAC9C;;;;OAIG;IACH,OAAO,EAAE,YAAY,CAAC;CACvB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/sw",
|
|
3
|
-
"version": "9.0.0-preview.
|
|
3
|
+
"version": "9.0.0-preview.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "This module makes it easy to get started with the Serwist service worker libraries.",
|
|
6
6
|
"files": [
|
|
@@ -28,23 +28,23 @@
|
|
|
28
28
|
"./package.json": "./package.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@serwist/background-sync": "9.0.0-preview.
|
|
32
|
-
"@serwist/broadcast-update": "9.0.0-preview.
|
|
33
|
-
"@serwist/cacheable-response": "9.0.0-preview.
|
|
34
|
-
"@serwist/core": "9.0.0-preview.
|
|
35
|
-
"@serwist/expiration": "9.0.0-preview.
|
|
36
|
-
"@serwist/google-analytics": "9.0.0-preview.
|
|
37
|
-
"@serwist/navigation-preload": "9.0.0-preview.
|
|
38
|
-
"@serwist/precaching": "9.0.0-preview.
|
|
39
|
-
"@serwist/range-requests": "9.0.0-preview.
|
|
40
|
-
"@serwist/routing": "9.0.0-preview.
|
|
41
|
-
"@serwist/strategies": "9.0.0-preview.
|
|
31
|
+
"@serwist/background-sync": "9.0.0-preview.5",
|
|
32
|
+
"@serwist/broadcast-update": "9.0.0-preview.5",
|
|
33
|
+
"@serwist/cacheable-response": "9.0.0-preview.5",
|
|
34
|
+
"@serwist/core": "9.0.0-preview.5",
|
|
35
|
+
"@serwist/expiration": "9.0.0-preview.5",
|
|
36
|
+
"@serwist/google-analytics": "9.0.0-preview.5",
|
|
37
|
+
"@serwist/navigation-preload": "9.0.0-preview.5",
|
|
38
|
+
"@serwist/precaching": "9.0.0-preview.5",
|
|
39
|
+
"@serwist/range-requests": "9.0.0-preview.5",
|
|
40
|
+
"@serwist/routing": "9.0.0-preview.5",
|
|
41
|
+
"@serwist/strategies": "9.0.0-preview.5"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"rollup": "4.9.6",
|
|
45
45
|
"typescript": "5.4.0-dev.20240206",
|
|
46
|
-
"@serwist/constants": "9.0.0-preview.
|
|
47
|
-
"@serwist/utils": "9.0.0-preview.
|
|
46
|
+
"@serwist/constants": "9.0.0-preview.5",
|
|
47
|
+
"@serwist/utils": "9.0.0-preview.5"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"typescript": ">=5.0.0"
|
|
@@ -22,7 +22,7 @@ export const registerRuntimeCaching = (...runtimeCachingList: RuntimeCaching[]):
|
|
|
22
22
|
logger.log("registerRuntimeCaching is disabled in development mode.");
|
|
23
23
|
} else {
|
|
24
24
|
for (const entry of runtimeCachingList) {
|
|
25
|
-
registerRoute(entry.
|
|
25
|
+
registerRoute(entry.matcher, entry.handler, entry.method);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
};
|
package/src/types.ts
CHANGED
|
@@ -13,13 +13,13 @@ export interface RuntimeCaching {
|
|
|
13
13
|
* This match criteria determines whether the configured handler will
|
|
14
14
|
* generate a response for any requests that don't match one of the precached
|
|
15
15
|
* URLs. If multiple `RuntimeCaching` routes are defined, then the first one
|
|
16
|
-
* whose `
|
|
16
|
+
* whose `matcher` matches will be the one that responds.
|
|
17
17
|
*
|
|
18
18
|
* This value directly maps to the first parameter passed to
|
|
19
19
|
* `@serwist/routing.registerRoute`. It's recommended to use a
|
|
20
20
|
* `@serwist/core.RouteMatchCallback` function for greatest flexibility.
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
matcher: RegExp | string | RouteMatchCallback;
|
|
23
23
|
/**
|
|
24
24
|
* This determines how the runtime route will generate a response. It
|
|
25
25
|
* can be a `@serwist/core.RouteHandler` callback function with custom
|