@serwist/sw 8.3.0 → 8.4.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/README.md CHANGED
@@ -1 +1 @@
1
- This module's documentation can be found at https://serwist.vercel.app/docs/sw
1
+ This module's documentation can be found at https://serwist.pages.dev/docs/sw
package/dist/index.cjs CHANGED
@@ -101,7 +101,10 @@ const registerRuntimeCaching = (...runtimeCachingList)=>{
101
101
  }
102
102
  };
103
103
 
104
- const installSerwist = ({ precacheEntries, precacheOptions, cleanupOutdatedCaches, skipWaiting: shouldSkipWaiting = false, importScripts: scriptsToImport, navigationPreload: navigationPreload$1 = false, cacheId, clientsClaim: shouldClaimClients = false, runtimeCaching, offlineAnalyticsConfig, disableDevLogs: shouldDisableDevLogs, fallbacks: fallbacksOptions, ...options })=>{
104
+ /**
105
+ * A function that abstracts away the core APIs of Serwist.
106
+ * @param options - `installSerwist` options.
107
+ */ const installSerwist = ({ precacheEntries, precacheOptions, cleanupOutdatedCaches, skipWaiting: shouldSkipWaiting = false, importScripts: scriptsToImport, navigationPreload: navigationPreload$1 = false, cacheId, clientsClaim: shouldClaimClients = false, runtimeCaching, offlineAnalyticsConfig, disableDevLogs: shouldDisableDevLogs, fallbacks: fallbacksOptions, ...options })=>{
105
108
  if (!!scriptsToImport && scriptsToImport.length > 0) self.importScripts(...scriptsToImport);
106
109
  if (navigationPreload$1) navigationPreload.enable();
107
110
  if (cacheId !== undefined) core.setCacheNameDetails({
package/dist/index.d.cts CHANGED
@@ -16,6 +16,10 @@ export type SerwistOptions = HandlePrecachingOptions & {
16
16
  disableDevLogs?: boolean;
17
17
  fallbacks?: Omit<FallbacksOptions, "runtimeCaching">;
18
18
  };
19
+ /**
20
+ * A function that abstracts away the core APIs of Serwist.
21
+ * @param options - `installSerwist` options.
22
+ */
19
23
  export declare const installSerwist: ({ precacheEntries, precacheOptions, cleanupOutdatedCaches, skipWaiting: shouldSkipWaiting, importScripts: scriptsToImport, navigationPreload, cacheId, clientsClaim: shouldClaimClients, runtimeCaching, offlineAnalyticsConfig, disableDevLogs: shouldDisableDevLogs, fallbacks: fallbacksOptions, ...options }: SerwistOptions) => void;
20
24
  export { disableDevLogs, fallbacks, handlePrecaching, registerRuntimeCaching };
21
25
  export type { FallbackEntry, FallbackMatcher, FallbacksOptions, HandlePrecachingOptions };
package/dist/index.d.ts CHANGED
@@ -16,6 +16,10 @@ export type SerwistOptions = HandlePrecachingOptions & {
16
16
  disableDevLogs?: boolean;
17
17
  fallbacks?: Omit<FallbacksOptions, "runtimeCaching">;
18
18
  };
19
+ /**
20
+ * A function that abstracts away the core APIs of Serwist.
21
+ * @param options - `installSerwist` options.
22
+ */
19
23
  export declare const installSerwist: ({ precacheEntries, precacheOptions, cleanupOutdatedCaches, skipWaiting: shouldSkipWaiting, importScripts: scriptsToImport, navigationPreload, cacheId, clientsClaim: shouldClaimClients, runtimeCaching, offlineAnalyticsConfig, disableDevLogs: shouldDisableDevLogs, fallbacks: fallbacksOptions, ...options }: SerwistOptions) => void;
20
24
  export { disableDevLogs, fallbacks, handlePrecaching, registerRuntimeCaching };
21
25
  export type { FallbackEntry, FallbackMatcher, FallbacksOptions, HandlePrecachingOptions };
package/dist/index.js CHANGED
@@ -99,7 +99,10 @@ const registerRuntimeCaching = (...runtimeCachingList)=>{
99
99
  }
100
100
  };
101
101
 
102
- const installSerwist = ({ precacheEntries, precacheOptions, cleanupOutdatedCaches, skipWaiting: shouldSkipWaiting = false, importScripts: scriptsToImport, navigationPreload = false, cacheId, clientsClaim: shouldClaimClients = false, runtimeCaching, offlineAnalyticsConfig, disableDevLogs: shouldDisableDevLogs, fallbacks: fallbacksOptions, ...options })=>{
102
+ /**
103
+ * A function that abstracts away the core APIs of Serwist.
104
+ * @param options - `installSerwist` options.
105
+ */ const installSerwist = ({ precacheEntries, precacheOptions, cleanupOutdatedCaches, skipWaiting: shouldSkipWaiting = false, importScripts: scriptsToImport, navigationPreload = false, cacheId, clientsClaim: shouldClaimClients = false, runtimeCaching, offlineAnalyticsConfig, disableDevLogs: shouldDisableDevLogs, fallbacks: fallbacksOptions, ...options })=>{
103
106
  if (!!scriptsToImport && scriptsToImport.length > 0) self.importScripts(...scriptsToImport);
104
107
  if (navigationPreload) enable();
105
108
  if (cacheId !== undefined) setCacheNameDetails({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serwist/sw",
3
- "version": "8.3.0",
3
+ "version": "8.4.0",
4
4
  "type": "module",
5
5
  "description": "This module makes it easy to get started with the Serwist service worker libraries.",
6
6
  "files": [
@@ -17,7 +17,7 @@
17
17
  "license": "MIT",
18
18
  "repository": "serwist/serwist",
19
19
  "bugs": "https://github.com/serwist/serwist/issues",
20
- "homepage": "https://serwist.vercel.app",
20
+ "homepage": "https://serwist.pages.dev",
21
21
  "module": "./dist/index.js",
22
22
  "main": "./dist/index.cjs",
23
23
  "types": "./dist/index.d.ts",
@@ -35,25 +35,26 @@
35
35
  "./package.json": "./package.json"
36
36
  },
37
37
  "dependencies": {
38
- "@serwist/background-sync": "8.3.0",
39
- "@serwist/broadcast-update": "8.3.0",
40
- "@serwist/cacheable-response": "8.3.0",
41
- "@serwist/core": "8.3.0",
42
- "@serwist/expiration": "8.3.0",
43
- "@serwist/google-analytics": "8.3.0",
44
- "@serwist/navigation-preload": "8.3.0",
45
- "@serwist/precaching": "8.3.0",
46
- "@serwist/range-requests": "8.3.0",
47
- "@serwist/routing": "8.3.0",
48
- "@serwist/strategies": "8.3.0"
38
+ "@serwist/background-sync": "8.4.0",
39
+ "@serwist/broadcast-update": "8.4.0",
40
+ "@serwist/cacheable-response": "8.4.0",
41
+ "@serwist/core": "8.4.0",
42
+ "@serwist/expiration": "8.4.0",
43
+ "@serwist/google-analytics": "8.4.0",
44
+ "@serwist/navigation-preload": "8.4.0",
45
+ "@serwist/precaching": "8.4.0",
46
+ "@serwist/range-requests": "8.4.0",
47
+ "@serwist/routing": "8.4.0",
48
+ "@serwist/strategies": "8.4.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "rollup": "4.9.1",
52
- "@serwist/build": "8.3.0",
53
- "@serwist/constants": "8.3.0"
52
+ "@serwist/build": "8.4.0",
53
+ "@serwist/constants": "8.4.0"
54
54
  },
55
55
  "scripts": {
56
56
  "build": "rimraf dist && cross-env NODE_ENV=production rollup --config rollup.config.js",
57
+ "dev": "rollup --config rollup.config.js --watch",
57
58
  "lint": "eslint src --ext ts,tsx,js,jsx,cjs,mjs",
58
59
  "typecheck": "tsc"
59
60
  }