@serwist/sw 9.0.0-preview.12 → 9.0.0-preview.14
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 +7 -7
- package/dist/installSerwist.d.ts +2 -2
- package/package.json +17 -17
- package/src/installSerwist.ts +10 -10
package/dist/index.js
CHANGED
|
@@ -78,6 +78,13 @@ const installSerwist = ({ precacheEntries, precacheOptions, cleanupOutdatedCache
|
|
|
78
78
|
navigateFallbackDenylist: options.navigateFallbackDenylist
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
|
+
if (offlineAnalyticsConfig !== undefined) {
|
|
82
|
+
if (typeof offlineAnalyticsConfig === "boolean") {
|
|
83
|
+
offlineAnalyticsConfig && initialize();
|
|
84
|
+
} else {
|
|
85
|
+
initialize(offlineAnalyticsConfig);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
81
88
|
if (runtimeCaching !== undefined) {
|
|
82
89
|
if (!("__WB_FORCE_RUNTIME_CACHING" in globalThis)) {
|
|
83
90
|
self.__WB_FORCE_RUNTIME_CACHING = false;
|
|
@@ -94,13 +101,6 @@ const installSerwist = ({ precacheEntries, precacheOptions, cleanupOutdatedCache
|
|
|
94
101
|
registerRuntimeCaching(...runtimeCaching);
|
|
95
102
|
}
|
|
96
103
|
}
|
|
97
|
-
if (offlineAnalyticsConfig !== undefined) {
|
|
98
|
-
if (typeof offlineAnalyticsConfig === "boolean") {
|
|
99
|
-
offlineAnalyticsConfig && initialize();
|
|
100
|
-
} else {
|
|
101
|
-
initialize(offlineAnalyticsConfig);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
104
|
if (disableDevLogs$1) disableDevLogs();
|
|
105
105
|
};
|
|
106
106
|
|
package/dist/installSerwist.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type InstallSerwistOptions = HandlePrecachingOptions & {
|
|
|
17
17
|
*/
|
|
18
18
|
importScripts?: string[];
|
|
19
19
|
/**
|
|
20
|
-
* Enables
|
|
20
|
+
* Enables navigation preloading if it is supported.
|
|
21
21
|
*
|
|
22
22
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/navigationPreload
|
|
23
23
|
*/
|
|
@@ -61,7 +61,7 @@ export type InstallSerwistOptions = HandlePrecachingOptions & {
|
|
|
61
61
|
fallbacks?: Omit<FallbacksOptions, "runtimeCaching">;
|
|
62
62
|
};
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Abstracts away the core APIs of Serwist.
|
|
65
65
|
* @param options - `installSerwist` options.
|
|
66
66
|
*/
|
|
67
67
|
export declare const installSerwist: ({ precacheEntries, precacheOptions, cleanupOutdatedCaches, skipWaiting, importScripts, navigationPreload, cacheId, clientsClaim, runtimeCaching, offlineAnalyticsConfig, disableDevLogs, fallbacks, ...options }: InstallSerwistOptions) => void;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@serwist/sw",
|
|
3
|
-
"version": "9.0.0-preview.
|
|
3
|
+
"version": "9.0.0-preview.14",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "A module that makes it easy to get started with the Serwist service worker libraries.",
|
|
6
6
|
"files": [
|
|
7
7
|
"src",
|
|
8
8
|
"dist"
|
|
@@ -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.14",
|
|
32
|
+
"@serwist/broadcast-update": "9.0.0-preview.14",
|
|
33
|
+
"@serwist/cacheable-response": "9.0.0-preview.14",
|
|
34
|
+
"@serwist/core": "9.0.0-preview.14",
|
|
35
|
+
"@serwist/expiration": "9.0.0-preview.14",
|
|
36
|
+
"@serwist/google-analytics": "9.0.0-preview.14",
|
|
37
|
+
"@serwist/navigation-preload": "9.0.0-preview.14",
|
|
38
|
+
"@serwist/precaching": "9.0.0-preview.14",
|
|
39
|
+
"@serwist/range-requests": "9.0.0-preview.14",
|
|
40
|
+
"@serwist/routing": "9.0.0-preview.14",
|
|
41
|
+
"@serwist/strategies": "9.0.0-preview.14"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"rollup": "4.
|
|
45
|
-
"typescript": "5.
|
|
46
|
-
"@serwist/constants": "9.0.0-preview.
|
|
47
|
-
"@serwist/utils": "9.0.0-preview.
|
|
44
|
+
"rollup": "4.13.0",
|
|
45
|
+
"typescript": "5.5.0-dev.20240312",
|
|
46
|
+
"@serwist/constants": "9.0.0-preview.14",
|
|
47
|
+
"@serwist/utils": "9.0.0-preview.14"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"typescript": ">=5.0.0"
|
package/src/installSerwist.ts
CHANGED
|
@@ -27,7 +27,7 @@ export type InstallSerwistOptions = HandlePrecachingOptions & {
|
|
|
27
27
|
*/
|
|
28
28
|
importScripts?: string[];
|
|
29
29
|
/**
|
|
30
|
-
* Enables
|
|
30
|
+
* Enables navigation preloading if it is supported.
|
|
31
31
|
*
|
|
32
32
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/navigationPreload
|
|
33
33
|
*/
|
|
@@ -72,7 +72,7 @@ export type InstallSerwistOptions = HandlePrecachingOptions & {
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
/**
|
|
75
|
-
*
|
|
75
|
+
* Abstracts away the core APIs of Serwist.
|
|
76
76
|
* @param options - `installSerwist` options.
|
|
77
77
|
*/
|
|
78
78
|
export const installSerwist = ({
|
|
@@ -124,6 +124,14 @@ export const installSerwist = ({
|
|
|
124
124
|
}),
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
+
if (offlineAnalyticsConfig !== undefined) {
|
|
128
|
+
if (typeof offlineAnalyticsConfig === "boolean") {
|
|
129
|
+
offlineAnalyticsConfig && initialize();
|
|
130
|
+
} else {
|
|
131
|
+
initialize(offlineAnalyticsConfig);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
127
135
|
if (runtimeCaching !== undefined) {
|
|
128
136
|
if (!("__WB_FORCE_RUNTIME_CACHING" in globalThis)) {
|
|
129
137
|
self.__WB_FORCE_RUNTIME_CACHING = false;
|
|
@@ -138,13 +146,5 @@ export const installSerwist = ({
|
|
|
138
146
|
}
|
|
139
147
|
}
|
|
140
148
|
|
|
141
|
-
if (offlineAnalyticsConfig !== undefined) {
|
|
142
|
-
if (typeof offlineAnalyticsConfig === "boolean") {
|
|
143
|
-
offlineAnalyticsConfig && initialize();
|
|
144
|
-
} else {
|
|
145
|
-
initialize(offlineAnalyticsConfig);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
149
|
if (disableDevLogs) disableDevLogsImpl();
|
|
150
150
|
};
|