serwist 9.0.2 → 9.0.3

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.
Files changed (127) hide show
  1. package/dist/NavigationRoute.d.ts +2 -2
  2. package/dist/PrecacheRoute.d.ts +2 -3
  3. package/dist/PrecacheRoute.d.ts.map +1 -1
  4. package/dist/RegExpRoute.d.ts +2 -2
  5. package/dist/Route.d.ts +4 -4
  6. package/dist/Serwist.d.ts +19 -19
  7. package/dist/chunks/printInstallDetails.js +6 -10
  8. package/dist/copyResponse.d.ts.map +1 -1
  9. package/dist/legacy/PrecacheController.d.ts +1 -1
  10. package/dist/legacy/PrecacheFallbackPlugin.d.ts +6 -7
  11. package/dist/legacy/PrecacheFallbackPlugin.d.ts.map +1 -1
  12. package/dist/legacy/PrecacheRoute.d.ts +3 -3
  13. package/dist/legacy/Router.d.ts +23 -23
  14. package/dist/legacy/addRoute.d.ts +6 -8
  15. package/dist/legacy/addRoute.d.ts.map +1 -1
  16. package/dist/legacy/createHandlerBoundToURL.d.ts +5 -6
  17. package/dist/legacy/createHandlerBoundToURL.d.ts.map +1 -1
  18. package/dist/legacy/fallbacks.d.ts +3 -3
  19. package/dist/legacy/handlePrecaching.d.ts +3 -3
  20. package/dist/legacy/initializeGoogleAnalytics.d.ts +1 -1
  21. package/dist/legacy/installSerwist.d.ts +4 -4
  22. package/dist/legacy/matchPrecache.d.ts +4 -4
  23. package/dist/legacy/matchPrecache.d.ts.map +1 -1
  24. package/dist/legacy/precache.d.ts +2 -2
  25. package/dist/legacy/precache.d.ts.map +1 -1
  26. package/dist/legacy/precacheAndRoute.d.ts +3 -4
  27. package/dist/legacy/precacheAndRoute.d.ts.map +1 -1
  28. package/dist/legacy/registerRoute.d.ts +6 -6
  29. package/dist/legacy/registerRoute.d.ts.map +1 -1
  30. package/dist/legacy/registerRuntimeCaching.d.ts +1 -1
  31. package/dist/legacy/setCatchHandler.d.ts +2 -2
  32. package/dist/legacy/setDefaultHandler.d.ts +3 -3
  33. package/dist/legacy/singletonPrecacheController.d.ts +7 -7
  34. package/dist/legacy/singletonRouter.d.ts +9 -9
  35. package/dist/legacy/unregisterRoute.d.ts +1 -1
  36. package/dist/legacy/unregisterRoute.d.ts.map +1 -1
  37. package/dist/lib/backgroundSync/BackgroundSyncPlugin.d.ts +3 -3
  38. package/dist/lib/backgroundSync/BackgroundSyncQueue.d.ts +1 -1
  39. package/dist/lib/backgroundSync/StorableRequest.d.ts +1 -1
  40. package/dist/lib/broadcastUpdate/BroadcastCacheUpdate.d.ts +1 -2
  41. package/dist/lib/broadcastUpdate/BroadcastCacheUpdate.d.ts.map +1 -1
  42. package/dist/lib/broadcastUpdate/BroadcastUpdatePlugin.d.ts +4 -7
  43. package/dist/lib/broadcastUpdate/BroadcastUpdatePlugin.d.ts.map +1 -1
  44. package/dist/lib/broadcastUpdate/types.d.ts +2 -1
  45. package/dist/lib/broadcastUpdate/types.d.ts.map +1 -1
  46. package/dist/lib/cacheableResponse/CacheableResponse.d.ts +6 -6
  47. package/dist/lib/cacheableResponse/CacheableResponsePlugin.d.ts +2 -2
  48. package/dist/lib/expiration/CacheExpiration.d.ts +2 -2
  49. package/dist/lib/expiration/ExpirationPlugin.d.ts +11 -11
  50. package/dist/lib/expiration/ExpirationPlugin.d.ts.map +1 -1
  51. package/dist/lib/precaching/PrecacheFallbackPlugin.d.ts +4 -4
  52. package/dist/lib/rangeRequests/RangeRequestsPlugin.d.ts +3 -4
  53. package/dist/lib/rangeRequests/RangeRequestsPlugin.d.ts.map +1 -1
  54. package/dist/lib/rangeRequests/createPartialResponse.d.ts +7 -7
  55. package/dist/lib/rangeRequests/createPartialResponse.d.ts.map +1 -1
  56. package/dist/lib/rangeRequests/utils/parseRangeHeader.d.ts +2 -2
  57. package/dist/lib/strategies/CacheFirst.d.ts +1 -1
  58. package/dist/lib/strategies/CacheOnly.d.ts +1 -1
  59. package/dist/lib/strategies/NetworkFirst.d.ts +1 -1
  60. package/dist/lib/strategies/NetworkOnly.d.ts +1 -1
  61. package/dist/lib/strategies/PrecacheStrategy.d.ts +3 -3
  62. package/dist/lib/strategies/PrecacheStrategy.d.ts.map +1 -1
  63. package/dist/lib/strategies/StaleWhileRevalidate.d.ts +1 -1
  64. package/dist/lib/strategies/Strategy.d.ts +7 -7
  65. package/dist/lib/strategies/StrategyHandler.d.ts +12 -13
  66. package/dist/lib/strategies/StrategyHandler.d.ts.map +1 -1
  67. package/dist/types.d.ts +37 -36
  68. package/dist/types.d.ts.map +1 -1
  69. package/dist/utils/cacheNames.d.ts +1 -1
  70. package/dist/utils/cacheNames.d.ts.map +1 -1
  71. package/dist/utils/canConstructResponseFromBodyStream.d.ts +2 -2
  72. package/dist/utils/deleteOutdatedCaches.d.ts.map +1 -1
  73. package/dist/utils/executeQuotaErrorCallbacks.d.ts.map +1 -1
  74. package/dist/utils/parseRoute.d.ts +8 -8
  75. package/dist/utils/waitUntil.d.ts.map +1 -1
  76. package/package.json +5 -5
  77. package/src/NavigationRoute.ts +2 -2
  78. package/src/PrecacheRoute.ts +2 -3
  79. package/src/RegExpRoute.ts +2 -2
  80. package/src/Route.ts +4 -4
  81. package/src/Serwist.ts +19 -19
  82. package/src/legacy/PrecacheController.ts +1 -1
  83. package/src/legacy/PrecacheFallbackPlugin.ts +6 -7
  84. package/src/legacy/PrecacheRoute.ts +3 -3
  85. package/src/legacy/Router.ts +23 -23
  86. package/src/legacy/addRoute.ts +6 -8
  87. package/src/legacy/createHandlerBoundToURL.ts +6 -6
  88. package/src/legacy/fallbacks.ts +3 -3
  89. package/src/legacy/handlePrecaching.ts +3 -3
  90. package/src/legacy/initializeGoogleAnalytics.ts +1 -1
  91. package/src/legacy/installSerwist.ts +4 -4
  92. package/src/legacy/matchPrecache.ts +5 -4
  93. package/src/legacy/precache.ts +4 -2
  94. package/src/legacy/precacheAndRoute.ts +3 -4
  95. package/src/legacy/registerRoute.ts +8 -7
  96. package/src/legacy/registerRuntimeCaching.ts +1 -1
  97. package/src/legacy/setCatchHandler.ts +2 -2
  98. package/src/legacy/setDefaultHandler.ts +3 -3
  99. package/src/legacy/singletonPrecacheController.ts +7 -7
  100. package/src/legacy/singletonRouter.ts +9 -9
  101. package/src/legacy/unregisterRoute.ts +2 -1
  102. package/src/lib/backgroundSync/BackgroundSyncPlugin.ts +3 -3
  103. package/src/lib/backgroundSync/BackgroundSyncQueue.ts +1 -1
  104. package/src/lib/backgroundSync/StorableRequest.ts +1 -1
  105. package/src/lib/broadcastUpdate/BroadcastCacheUpdate.ts +1 -2
  106. package/src/lib/broadcastUpdate/BroadcastUpdatePlugin.ts +4 -7
  107. package/src/lib/broadcastUpdate/types.ts +2 -1
  108. package/src/lib/cacheableResponse/CacheableResponse.ts +6 -6
  109. package/src/lib/cacheableResponse/CacheableResponsePlugin.ts +2 -2
  110. package/src/lib/expiration/CacheExpiration.ts +2 -2
  111. package/src/lib/expiration/ExpirationPlugin.ts +12 -11
  112. package/src/lib/precaching/PrecacheFallbackPlugin.ts +4 -4
  113. package/src/lib/rangeRequests/RangeRequestsPlugin.ts +3 -4
  114. package/src/lib/rangeRequests/createPartialResponse.ts +7 -7
  115. package/src/lib/rangeRequests/utils/parseRangeHeader.ts +2 -2
  116. package/src/lib/strategies/CacheFirst.ts +1 -1
  117. package/src/lib/strategies/CacheOnly.ts +1 -1
  118. package/src/lib/strategies/NetworkFirst.ts +1 -1
  119. package/src/lib/strategies/NetworkOnly.ts +1 -1
  120. package/src/lib/strategies/PrecacheStrategy.ts +4 -3
  121. package/src/lib/strategies/StaleWhileRevalidate.ts +1 -1
  122. package/src/lib/strategies/Strategy.ts +7 -7
  123. package/src/lib/strategies/StrategyHandler.ts +21 -25
  124. package/src/types.ts +39 -36
  125. package/src/utils/cacheNames.ts +2 -1
  126. package/src/utils/canConstructResponseFromBodyStream.ts +2 -2
  127. package/src/utils/parseRoute.ts +8 -8
@@ -1,12 +1,12 @@
1
1
  import type { RouteHandler } from "../types.js";
2
2
  /**
3
- * Defines a default `handler` that's called when no routes explicitly
3
+ * Defines a default handler that's called when no routes explicitly
4
4
  * match the incoming request.
5
5
  *
6
- * Without a default `handler`, unmatched requests will go against the
6
+ * Without a default handler, unmatched requests will go against the
7
7
  * network as if there were no service worker present.
8
8
  *
9
- * @param handler A callback function that returns a Promise resulting in a Response.
9
+ * @param handler A callback function that returns a promise resulting in a response.
10
10
  * @deprecated
11
11
  */
12
12
  export declare const setDefaultHandler: (handler: RouteHandler) => void;
@@ -1,17 +1,17 @@
1
1
  import { PrecacheController } from "./PrecacheController.js";
2
2
  /**
3
- * Creates a new, singleton `PrecacheController` if one does not exist. If one does
3
+ * Creates a new, singleton {@linkcode PrecacheController} if one does not exist. If one does
4
4
  * already exist, that instance is returned. This instance is used by Serwist's
5
- * `PrecacheController`-dependent functions and classes unless you provide a different
6
- * `Router` to them.
5
+ * {@linkcode PrecacheController}-dependent functions and classes unless you provide a different
6
+ * {@linkcode PrecacheController} to them.
7
7
  *
8
- * @returns The singleton `PrecacheController`.
8
+ * @returns The singleton {@linkcode PrecacheController}.
9
9
  * @deprecated
10
10
  */
11
11
  export declare const getSingletonPrecacheController: () => PrecacheController;
12
12
  /**
13
- * Changes the singleton `PrecacheController` to a different instance. This is meant for when you do not
14
- * want to pass your own `PrecacheController` to every one of Serwist's `PrecacheController`-dependent
13
+ * Changes the singleton {@linkcode PrecacheController} to a different instance. This is meant for when you do not
14
+ * want to pass your own {@linkcode PrecacheController} to every one of Serwist's {@linkcode PrecacheController}-dependent
15
15
  * functions and classes.
16
16
  *
17
17
  * It is highly recommended that you call this before anything else, if you plan on doing so.
@@ -27,7 +27,7 @@ export declare const getSingletonPrecacheController: () => PrecacheController;
27
27
  * // Do something with your controller...
28
28
  * ```
29
29
  * @param router
30
- * @returns The new singleton `PrecacheController`.
30
+ * @returns The new singleton {@linkcode PrecacheController}.
31
31
  * @deprecated
32
32
  */
33
33
  export declare const setSingletonPrecacheController: (precacheController: PrecacheController) => PrecacheController;
@@ -1,19 +1,19 @@
1
1
  import { Router } from "./Router.js";
2
2
  /**
3
- * Creates a new, singleton `Router` if one does not exist. If one does
3
+ * Creates a new, singleton {@linkcode Router} if one does not exist. If one does
4
4
  * already exist, that instance is returned. This instance is used by
5
- * Serwist's `Router`-dependent functions and classes unless you provide
6
- * a different `Router` to them.
5
+ * Serwist's {@linkcode Router}-dependent functions and classes unless you provide
6
+ * a different {@linkcode Router} to them.
7
7
  *
8
- * @returns The singleton `Router`.
8
+ * @returns The singleton {@linkcode Router}.
9
9
  * @deprecated
10
10
  */
11
11
  export declare const getSingletonRouter: () => Router;
12
12
  /**
13
- * Changes the singleton `Router` to a different instance. This is meant for when you do not
14
- * want to pass your own `Router` to every one of Serwist's `Router`-dependent functions and classes.
15
- * If this or `getSingletonRouter` has been called before, it removes the listeners of the
16
- * previous singleton `Router`. It also adds those of the new one, so you need not do that yourself.
13
+ * Changes the singleton {@linkcode Router} to a different instance. This is meant for when you do not
14
+ * want to pass your own {@linkcode Router} to every one of Serwist's {@linkcode Router}-dependent functions and classes.
15
+ * If this or {@linkcode getSingletonRouter} has been called before, it removes the listeners of the
16
+ * previous singleton {@linkcode Router}. It also adds those of the new one, so you need not do that yourself.
17
17
  *
18
18
  * It is highly recommended that you call this before anything else, if you plan on doing so.
19
19
  *
@@ -34,7 +34,7 @@ export declare const getSingletonRouter: () => Router;
34
34
  * );
35
35
  * ```
36
36
  * @param router
37
- * @returns The new singleton `Router`.
37
+ * @returns The new singleton {@linkcode Router}.
38
38
  * @deprecated
39
39
  */
40
40
  export declare const setSingletonRouter: (router: Router) => Router;
@@ -1,6 +1,6 @@
1
1
  import type { Route } from "../Route.js";
2
2
  /**
3
- * Unregisters a route from the singleton `Router` instance.
3
+ * Unregisters a route from the singleton {@linkcode Router} instance.
4
4
  *
5
5
  * @param route The route to unregister.
6
6
  * @deprecated
@@ -1 +1 @@
1
- {"version":3,"file":"unregisterRoute.d.ts","sourceRoot":"","sources":["../../src/legacy/unregisterRoute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGzC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,UAAW,KAAK,KAAG,IAE9C,CAAC"}
1
+ {"version":3,"file":"unregisterRoute.d.ts","sourceRoot":"","sources":["../../src/legacy/unregisterRoute.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIzC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,UAAW,KAAK,KAAG,IAE9C,CAAC"}
@@ -2,14 +2,14 @@ import type { FetchDidFailCallbackParam, SerwistPlugin } from "../../types.js";
2
2
  import type { BackgroundSyncQueueOptions } from "./BackgroundSyncQueue.js";
3
3
  /**
4
4
  * A class implementing the `fetchDidFail` lifecycle callback. This makes it
5
- * easier to add failed requests to a background sync Queue.
5
+ * easier to add failed requests to a {@linkcode BackgroundSyncQueue}.
6
6
  */
7
7
  export declare class BackgroundSyncPlugin implements SerwistPlugin {
8
8
  private readonly _queue;
9
9
  /**
10
- * @param name See the `serwist/plugins.BackgroundSyncQueue`
10
+ * @param name See the {@linkcode BackgroundSyncQueue}
11
11
  * documentation for parameter details.
12
- * @param options See the `serwist/plugins.BackgroundSyncQueue`
12
+ * @param options See the {@linkcode BackgroundSyncQueue}
13
13
  * documentation for parameter details.
14
14
  * @see https://serwist.pages.dev/docs/core/background-sync-queue
15
15
  */
@@ -144,7 +144,7 @@ export declare class BackgroundSyncQueue {
144
144
  _addRequest({ request, metadata, timestamp }: BackgroundSyncQueueEntry, operation: "push" | "unshift"): Promise<void>;
145
145
  /**
146
146
  * Removes and returns the first or last (depending on `operation`) entry
147
- * from the QueueStore that's not older than the `maxRetentionTime`.
147
+ * from the {@linkcode BackgroundSyncQueueStore} that's not older than the `maxRetentionTime`.
148
148
  *
149
149
  * @param operation
150
150
  * @returns
@@ -23,7 +23,7 @@ export declare class StorableRequest {
23
23
  static fromRequest(request: Request): Promise<StorableRequest>;
24
24
  /**
25
25
  * Accepts an object of request data that can be used to construct a
26
- * `Request` but can also be stored in IndexedDB.
26
+ * `Request` object but can also be stored in IndexedDB.
27
27
  *
28
28
  * @param requestData An object of request data that includes the `url` plus any relevant property of
29
29
  * [`requestInit`](https://fetch.spec.whatwg.org/#requestinit).
@@ -12,8 +12,7 @@ export declare class BroadcastCacheUpdate {
12
12
  private readonly _generatePayload;
13
13
  private readonly _notifyAllClients;
14
14
  /**
15
- * Construct a BroadcastCacheUpdate instance with a specific `channelName` to
16
- * broadcast messages on
15
+ * Construct an instance of `BroadcastCacheUpdate`.
17
16
  *
18
17
  * @param options
19
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BroadcastCacheUpdate.d.ts","sourceRoot":"","sources":["../../../src/lib/broadcastUpdate/BroadcastCacheUpdate.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAYlE,OAAO,KAAK,EAAE,2BAA2B,EAAiE,MAAM,YAAY,CAAC;AAuB7H;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAW;IAC3C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA4B;IAC7D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAU;IAE5C;;;;;OAKG;gBACS,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAE,2BAAgC;IAMnG;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,eAAe,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;CA4E3E"}
1
+ {"version":3,"file":"BroadcastCacheUpdate.d.ts","sourceRoot":"","sources":["../../../src/lib/broadcastUpdate/BroadcastCacheUpdate.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAYlE,OAAO,KAAK,EAAE,2BAA2B,EAAiE,MAAM,YAAY,CAAC;AAuB7H;;;;;;GAMG;AACH,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAW;IAC3C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA4B;IAC7D,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAU;IAE5C;;;;OAIG;gBACS,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAE,2BAAgC;IAMnG;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,eAAe,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;CA4E3E"}
@@ -7,18 +7,15 @@ import type { BroadcastCacheUpdateOptions } from "./types.js";
7
7
  export declare class BroadcastUpdatePlugin implements SerwistPlugin {
8
8
  private readonly _broadcastUpdate;
9
9
  /**
10
- * Construct a `serwist.BroadcastCacheUpdate` instance with
11
- * the passed options and calls its `notifyIfUpdated` method whenever the
12
- * plugin's `cacheDidUpdate` callback is invoked.
10
+ * Construct a {@linkcode BroadcastCacheUpdate} instance with
11
+ * the passed options and calls its {@linkcode BroadcastCacheUpdate.notifyIfUpdated}
12
+ * method whenever the plugin's {@linkcode BroadcastUpdatePlugin.cacheDidUpdate} callback
13
+ * is invoked.
13
14
  *
14
15
  * @param options
15
16
  */
16
17
  constructor(options?: BroadcastCacheUpdateOptions);
17
18
  /**
18
- * A "lifecycle" callback that will be triggered automatically by
19
- * `@serwist/build.RuntimeCaching` handlers when an entry is
20
- * added to a cache.
21
- *
22
19
  * @private
23
20
  * @param options The input object to this function.
24
21
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BroadcastUpdatePlugin.d.ts","sourceRoot":"","sources":["../../../src/lib/broadcastUpdate/BroadcastUpdatePlugin.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEjF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAE9D;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,aAAa;IACzD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuB;IAExD;;;;;;OAMG;gBACS,OAAO,CAAC,EAAE,2BAA2B;IAIjD;;;;;;;OAOG;IACH,cAAc,CAAC,OAAO,EAAE,2BAA2B;CAGpD"}
1
+ {"version":3,"file":"BroadcastUpdatePlugin.d.ts","sourceRoot":"","sources":["../../../src/lib/broadcastUpdate/BroadcastUpdatePlugin.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEjF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAE9D;;;GAGG;AACH,qBAAa,qBAAsB,YAAW,aAAa;IACzD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuB;IAExD;;;;;;;OAOG;gBACS,OAAO,CAAC,EAAE,2BAA2B;IAIjD;;;OAGG;IACH,cAAc,CAAC,OAAO,EAAE,2BAA2B;CAGpD"}
@@ -5,7 +5,8 @@ export interface BroadcastCacheUpdateOptions {
5
5
  * A list of headers that will be used to determine whether the responses
6
6
  * differ.
7
7
  *
8
- * @default ['content-length', 'etag', 'last-modified']
8
+ * @default
9
+ * ['content-length', 'etag', 'last-modified']`
9
10
  */
10
11
  headersToCheck?: string[];
11
12
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/broadcastUpdate/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,6BAA6B,EAAE,6BAA6B,EAAE,MAAM,gBAAgB,CAAC;AAEnG,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,2BAA2B,K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ponseOptions {
2
2
  /**
3
- * One or more status codes that a `Response` can have to be considered cacheable.
3
+ * One or more HTTP status codes that a response can have to be considered cacheable.
4
4
  */
5
5
  statuses?: number[];
6
6
  /**
7
- * A mapping of header names and expected values that a `Response` can have and be
7
+ * A mapping of header names and expected values that a response can have and be
8
8
  * considered cacheable. If multiple headers are provided, only one needs to be present.
9
9
  */
10
10
  headers?: HeadersInit;
11
11
  }
12
12
  /**
13
13
  * Allows you to set up rules determining what status codes and/or headers need
14
- * to be present in order for a [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response)
14
+ * to be present in order for a [response](https://developer.mozilla.org/en-US/docs/Web/API/Response)
15
15
  * to be considered cacheable.
16
16
  */
17
17
  export declare class CacheableResponse {
18
18
  private readonly _statuses?;
19
19
  private readonly _headers?;
20
20
  /**
21
- * To construct a new CacheableResponse instance you must provide at least
21
+ * To construct a new `CacheableResponse` instance you must provide at least
22
22
  * one of the `config` properties.
23
23
  *
24
24
  * If both `statuses` and `headers` are specified, then both conditions must
25
- * be met for the `Response` to be considered cacheable.
25
+ * be met for the response to be considered cacheable.
26
26
  *
27
27
  * @param config
28
28
  */
@@ -32,7 +32,7 @@ export declare class CacheableResponse {
32
32
  *
33
33
  * @param response The response whose cacheability is being
34
34
  * checked.
35
- * @returns `true` if the `Response` is cacheable, and `false`
35
+ * @returns `true` if the response is cacheable, and `false`
36
36
  * otherwise.
37
37
  */
38
38
  isResponseCacheable(response: Response): boolean;
@@ -8,11 +8,11 @@ import type { CacheableResponseOptions } from "./CacheableResponse.js";
8
8
  export declare class CacheableResponsePlugin implements SerwistPlugin {
9
9
  private readonly _cacheableResponse;
10
10
  /**
11
- * To construct a new CacheableResponsePlugin instance you must provide at
11
+ * To construct a new `CacheableResponsePlugin` instance you must provide at
12
12
  * least one of the `config` properties.
13
13
  *
14
14
  * If both `statuses` and `headers` are specified, then both conditions must
15
- * be met for the `Response` to be considered cacheable.
15
+ * be met for the response to be considered cacheable.
16
16
  *
17
17
  * @param config
18
18
  */
@@ -1,6 +1,6 @@
1
1
  interface CacheExpirationConfig {
2
2
  /**
3
- * The maximum number of entries to cache. Entries used the least will
3
+ * The maximum number of entries to cache. Entries used least recently will
4
4
  * be removed as the maximum is reached.
5
5
  */
6
6
  maxEntries?: number;
@@ -27,7 +27,7 @@ export declare class CacheExpiration {
27
27
  private readonly _cacheName;
28
28
  private readonly _timestampModel;
29
29
  /**
30
- * To construct a new CacheExpiration instance you must provide at least
30
+ * To construct a new `CacheExpiration` instance you must provide at least
31
31
  * one of the `config` properties.
32
32
  *
33
33
  * @param cacheName Name of the cache to apply restrictions to.
@@ -1,8 +1,9 @@
1
1
  import type { CacheDidUpdateCallbackParam, CachedResponseWillBeUsedCallbackParam, SerwistPlugin } from "../../types.js";
2
2
  export interface ExpirationPluginOptions {
3
3
  /**
4
- * The maximum number of entries to cache. Entries used the least will be removed
5
- * as the maximum is reached.
4
+ * The maximum number of entries to cache. Entries used (if `maxAgeFrom` is
5
+ * `"last-used"`) or fetched from the network (if `maxAgeFrom` is `"last-fetched"`)
6
+ * least recently will be removed as the maximum is reached.
6
7
  */
7
8
  maxEntries?: number;
8
9
  /**
@@ -27,10 +28,10 @@ export interface ExpirationPluginOptions {
27
28
  purgeOnQuotaError?: boolean;
28
29
  }
29
30
  /**
30
- * This plugin can be used in a `serwist/strategies` Strategy to regularly enforce a
31
+ * This plugin can be used in a {@linkcode Strategy} to regularly enforce a
31
32
  * limit on the age and/or the number of cached requests.
32
33
  *
33
- * It can only be used with Strategy instances that have a custom `cacheName` property set.
34
+ * It can only be used with {@linkcode Strategy} instances that have a custom `cacheName` property set.
34
35
  * In other words, it can't be used to expire entries in strategies that use the default runtime
35
36
  * cache name.
36
37
  *
@@ -64,11 +65,10 @@ export declare class ExpirationPlugin implements SerwistPlugin {
64
65
  */
65
66
  private _getCacheExpiration;
66
67
  /**
67
- * A "lifecycle" callback that will be triggered automatically by the
68
- * `serwist/strategies` handlers when a `Response` is about to be returned
69
- * from a [Cache](https://developer.mozilla.org/en-US/docs/Web/API/Cache) to
70
- * the handler. It allows the `Response` to be inspected for freshness and
71
- * prevents it from being used if the `Response`'s `Date` header value is
68
+ * A lifecycle callback that will be triggered automatically when a
69
+ * response is about to be returned from a [`Cache`](https://developer.mozilla.org/en-US/docs/Web/API/Cache).
70
+ * It allows the response to be inspected for freshness and
71
+ * prevents it from being used if the response's `Date` header value is
72
72
  * older than the configured `maxAgeSeconds`.
73
73
  *
74
74
  * @param options
@@ -92,8 +92,8 @@ export declare class ExpirationPlugin implements SerwistPlugin {
92
92
  */
93
93
  private _getDateHeaderTimestamp;
94
94
  /**
95
- * A "lifecycle" callback that will be triggered automatically by the
96
- * `serwist/strategies` handlers when an entry is added to a cache.
95
+ * A lifecycle callback that will be triggered automatically when an entry is added
96
+ * to a cache.
97
97
  *
98
98
  * @param options
99
99
  * @private
@@ -1 +1 @@
1
- {"version":3,"file":"ExpirationPlugin.d.ts","sourceRoot":"","sources":["../../../src/lib/expiration/ExpirationPlugin.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,2BAA2B,EAAE,qCAAqC,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAQxH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC;IAC1C;;;OAGG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC;;OAEG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,qBAAa,gBAAiB,YAAW,aAAa;IACpD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA0B;IAClD,OAAO,CAAC,iBAAiB,CAA+B;IAExD;;OAEG;gBACS,MAAM,GAAE,uBAA4B;IAkDhD;;;;;;;OAOG;IACH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,OAAO,CAAC,oBAAoB;IAwB5B;;;;;;OAMG;IACH,OAAO,CAAC,uBAAuB;IAkB/B;;;;;;OAMG;IACG,cAAc,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,2BAA2B;IAqBxE;;;;;;;;;;;OAWG;IACG,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;CAW9C"}
@@ -18,13 +18,13 @@ export interface PrecacheFallbackPluginOptions {
18
18
  */
19
19
  fallbackUrls: (string | PrecacheFallbackEntry)[];
20
20
  /**
21
- * Your `Serwist` instance.
21
+ * A {@linkcode Serwist} instance.
22
22
  */
23
23
  serwist: Serwist;
24
24
  }
25
25
  /**
26
- * `PrecacheFallbackPlugin` allows you to specify offline fallbacks
27
- * to be used when a given strategy is unable to generate a response.
26
+ * Allows you to specify offline fallbacks to be used when a given strategy
27
+ * is unable to generate a response.
28
28
  *
29
29
  * It does this by intercepting the `handlerDidError` plugin callback
30
30
  * and returning a precached response, taking the expected revision parameter
@@ -34,7 +34,7 @@ export declare class PrecacheFallbackPlugin implements SerwistPlugin {
34
34
  private readonly _fallbackUrls;
35
35
  private readonly _serwist;
36
36
  /**
37
- * Constructs a new `PrecacheFallbackPlugin` with the associated `fallbackUrls`.
37
+ * Constructs a new instance with the associated `fallbackUrls`.
38
38
  *
39
39
  * @param config
40
40
  */
@@ -1,7 +1,6 @@
1
1
  import type { SerwistPlugin } from "../../types.js";
2
2
  /**
3
- * The range request plugin makes it easy for a request with a 'Range' header to
4
- * be fulfilled by a cached response.
3
+ * Makes it easy for a request with a `Range` header to be fulfilled by a cached response.
5
4
  *
6
5
  * It does this by intercepting the `cachedResponseWillBeUsed` plugin callback
7
6
  * and returning the appropriate subset of the cached response body.
@@ -9,8 +8,8 @@ import type { SerwistPlugin } from "../../types.js";
9
8
  export declare class RangeRequestsPlugin implements SerwistPlugin {
10
9
  /**
11
10
  * @param options
12
- * @returns If request contains a 'Range' header, then a
13
- * new response with status 206 whose body is a subset of `cachedResponse` is
11
+ * @returns If request contains a `Range` header, then a
12
+ * partial response whose body is a subset of `cachedResponse` is
14
13
  * returned. Otherwise, `cachedResponse` is returned as-is.
15
14
  * @private
16
15
  */
@@ -1 +1 @@
1
- {"version":3,"file":"RangeRequestsPlugin.d.ts","sourceRoot":"","sources":["../../../src/lib/rangeRequests/RangeRequestsPlugin.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD;;;;;;GAMG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACvD;;;;;;OAMG;IACH,wBAAwB,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAUjE;CACH"}
1
+ {"version":3,"file":"RangeRequestsPlugin.d.ts","sourceRoot":"","sources":["../../../src/lib/rangeRequests/RangeRequestsPlugin.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGpD;;;;;GAKG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACvD;;;;;;OAMG;IACH,wBAAwB,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAUjE;CACH"}
@@ -1,18 +1,18 @@
1
1
  /**
2
- * Given a `Request` and `Response` objects as input, this will return a
3
- * promise for a new `Response`.
2
+ * Given a request and a response, this will return a
3
+ * promise that resolves to a partial response.
4
4
  *
5
- * If the original `Response` already contains partial content (i.e. it has
6
- * a status of 206), then this assumes it already fulfills the `Range:`
5
+ * If the original response already contains partial content (i.e. it has
6
+ * a status of 206), then this assumes it already fulfills the `Range`
7
7
  * requirements, and will return it as-is.
8
8
  *
9
- * @param request A request, which should contain a Range:
9
+ * @param request A request, which should contain a `Range`
10
10
  * header.
11
11
  * @param originalResponse A response.
12
12
  * @returns Either a `206 Partial Content` response, with
13
13
  * the response body set to the slice of content specified by the request's
14
- * `Range:` header, or a `416 Range Not Satisfiable` response if the
15
- * conditions of the `Range:` header can't be met.
14
+ * `Range` header, or a `416 Range Not Satisfiable` response if the
15
+ * conditions of the `Range` header can't be met.
16
16
  */
17
17
  export declare const createPartialResponse: (request: Request, originalResponse: Response) => Promise<Response>;
18
18
  //# sourceMappingURL=createPartialResponse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createPartialResponse.d.ts","sourceRoot":"","sources":["../../../src/lib/rangeRequests/createPartialResponse.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,YAAmB,OAAO,oBAAoB,QAAQ,KAAG,QAAQ,QAAQ,CA8D1G,CAAC"}
1
+ {"version":3,"file":"createPartialResponse.d.ts","sourceRoot":"","sources":["../../../src/lib/rangeRequests/createPartialResponse.ts"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,qBAAqB,YAAmB,OAAO,oBAAoB,QAAQ,KAAG,OAAO,CAAC,QAAQ,CA8D1G,CAAC"}
@@ -1,7 +1,7 @@
1
1
  /**
2
- * @param rangeHeader A Range: header value.
2
+ * @param rangeHeader A `Range` header value.
3
3
  * @returns An object with `start` and `end` properties, reflecting
4
- * the parsed value of the Range: header. If either the `start` or `end` are
4
+ * the parsed value of the `Range` header. If either the `start` or `end` are
5
5
  * omitted, then `null` will be returned.
6
6
  * @private
7
7
  */
@@ -9,7 +9,7 @@ import type { StrategyHandler } from "./StrategyHandler.js";
9
9
  * can be cached for long periods of time.
10
10
  *
11
11
  * If the network request fails, and there is no cache match, this will throw
12
- * a `SerwistError` exception.
12
+ * a {@linkcode SerwistError} exception.
13
13
  */
14
14
  export declare class CacheFirst extends Strategy {
15
15
  /**
@@ -6,7 +6,7 @@ import type { StrategyHandler } from "./StrategyHandler.js";
6
6
  *
7
7
  * This class is useful if you already have your own precaching step.
8
8
  *
9
- * If there is no cache match, this will throw a `SerwistError` exception.
9
+ * If there is no cache match, this will throw a {@linkcode SerwistError} exception.
10
10
  */
11
11
  export declare class CacheOnly extends Strategy {
12
12
  /**
@@ -17,7 +17,7 @@ export interface NetworkFirstOptions extends StrategyOptions {
17
17
  * support [CORS](https://enable-cors.org/).
18
18
  *
19
19
  * If the network request fails, and there is no cache match, this will throw
20
- * a `SerwistError` exception.
20
+ * a {@linkcode SerwistError} exception.
21
21
  */
22
22
  export declare class NetworkFirst extends Strategy {
23
23
  private readonly _networkTimeoutSeconds;
@@ -13,7 +13,7 @@ export interface NetworkOnlyOptions extends Omit<StrategyOptions, "cacheName" |
13
13
  *
14
14
  * This class is useful if you require specific requests to only be fulfilled from the network.
15
15
  *
16
- * If the network request fails, this will throw a `SerwistError` exception.
16
+ * If the network request fails, this will throw a {@linkcode SerwistError} exception.
17
17
  */
18
18
  export declare class NetworkOnly extends Strategy {
19
19
  private readonly _networkTimeoutSeconds;
@@ -10,11 +10,11 @@ interface PrecacheStrategyOptions extends StrategyOptions {
10
10
  fallbackToNetwork?: boolean;
11
11
  }
12
12
  /**
13
- * A `serwist/strategies.Strategy` implementation
14
- * specifically designed to both cache and fetch precached assets.
13
+ * A {@linkcode Strategy} implementation specifically designed to both cache
14
+ * and fetch precached assets.
15
15
  *
16
16
  * Note: an instance of this class is created automatically when creating a
17
- * `Serwist` instance; it's generally not necessary to create this yourself.
17
+ * {@linkcode Serwist} instance; it's generally not necessary to create this yourself.
18
18
  */
19
19
  export declare class PrecacheStrategy extends Strategy {
20
20
  private readonly _fallbackToNetwork;
@@ -1 +1 @@
1
- {"version":3,"file":"PrecacheStrategy.d.ts","sourceRoot":"","sources":["../../../src/lib/strategies/PrecacheStrategy.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAKpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,UAAU,uBAAwB,SAAQ,eAAe;IACvD;;;OAGG;IACH,iBAAiB,CAAC,EA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AM,CAAC,QAAQ,CAAC,sCAAsC,EAAE,aAAa,CAInE;IAEF;;OAEG;gBACS,OAAO,GAAE,uBAA4B;IAcjD;;;;;OAKG;IACG,OAAO,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAkBtE,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAyE3E,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,QAAQ,CAAC;IAqBnF;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,qCAAqC,IAAI,IAAI;CA4B9C"}
@@ -17,7 +17,7 @@ import type { StrategyHandler } from "./StrategyHandler.js";
17
17
  * support [CORS](https://enable-cors.org/).
18
18
  *
19
19
  * If the network request fails, and there is no cache match, this will throw
20
- * a `SerwistError` exception.
20
+ * a {@linkcode SerwistError} exception.
21
21
  */
22
22
  export declare class StaleWhileRevalidate extends Strategy {
23
23
  /**
@@ -44,13 +44,13 @@ export declare abstract class Strategy implements RouteHandlerObject {
44
44
  */
45
45
  constructor(options?: StrategyOptions);
46
46
  /**
47
- * Performs a request strategy and returns a `Promise` that will resolve with
48
- * a `Response`, invoking all relevant plugin callbacks.
47
+ * Performs a request strategy and returns a promise that will resolve to
48
+ * a response, invoking all relevant plugin callbacks.
49
49
  *
50
- * When a strategy instance is registered with a `Route`, this method is automatically
50
+ * When a strategy instance is registered with a route, this method is automatically
51
51
  * called when the route matches.
52
52
  *
53
- * Alternatively, this method can be used in a standalone `FetchEvent`
53
+ * Alternatively, this method can be used in a standalone `fetch` event
54
54
  * listener by passing it to `event.respondWith()`.
55
55
  *
56
56
  * @param options A `FetchEvent` or an object with the properties listed below.
@@ -61,10 +61,10 @@ export declare abstract class Strategy implements RouteHandlerObject {
61
61
  */
62
62
  handle(options: FetchEvent | HandlerCallbackOptions): Promise<Response>;
63
63
  /**
64
- * Similar to `handle()`, but instead of just returning a `Promise` that
65
- * resolves to a `Response`, it will return an tuple of `[response, done]` promises,
64
+ * Similar to `handle()`, but instead of just returning a promise that
65
+ * resolves to a response, it will return an tuple of `[response, done]` promises,
66
66
  * where `response` is equivalent to what `handle()` returns, and `done` is a
67
- * `Promise` that will resolve once all promises added to `event.waitUntil()` as a part
67
+ * promise that will resolve once all promises added to `event.waitUntil()` as a part
68
68
  * of performing the strategy have completed.
69
69
  *
70
70
  * You can await the `done` promise to ensure any extra work performed by