serwist 9.0.0-preview.26 → 9.0.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.
@@ -15,7 +15,7 @@ export declare class StorableRequest {
15
15
  private readonly _requestData;
16
16
  /**
17
17
  * Converts a Request object to a plain object that can be structured
18
- * cloned or JSON-stringified.
18
+ * cloned or stringified to JSON.
19
19
  *
20
20
  * @param request
21
21
  * @returns
@@ -25,12 +25,12 @@ export declare class StorableRequest {
25
25
  * Accepts an object of request data that can be used to construct a
26
26
  * `Request` but can also be stored in IndexedDB.
27
27
  *
28
- * @param requestData An object of request data that includes the `url` plus any relevant properties of
29
- * [requestInit](https://fetch.spec.whatwg.org/#requestinit).
28
+ * @param requestData An object of request data that includes the `url` plus any relevant property of
29
+ * [`requestInit`](https://fetch.spec.whatwg.org/#requestinit).
30
30
  */
31
31
  constructor(requestData: RequestData);
32
32
  /**
33
- * Returns a deep clone of the instances `_requestData` object.
33
+ * Returns a deep clone of the instance's `requestData` object.
34
34
  *
35
35
  * @returns
36
36
  */
@@ -29,10 +29,6 @@ export interface PrecacheFallbackPluginOptions {
29
29
  * It does this by intercepting the `handlerDidError` plugin callback
30
30
  * and returning a precached response, taking the expected revision parameter
31
31
  * into account automatically.
32
- *
33
- * Unless you explicitly pass in a `PrecacheController` instance to the
34
- * constructor, the default instance will be used. Generally speaking, most
35
- * developers will end up using the default.
36
32
  */
37
33
  export declare class PrecacheFallbackPlugin implements SerwistPlugin {
38
34
  private readonly _fallbackUrls;
@@ -1 +1 @@
1
- {"version":3,"file":"PrecacheFallbackPlugin.d.ts","sourceRoot":"","sources":["../../../src/lib/precaching/PrecacheFallbackPlugin.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,EAAE,4BAA4B,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAElF,MAAM,WAAW,qBAAqB;IACpC;;;OA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gBACS,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,6BAA6B;IAKpE;;;;OAIG;IACG,eAAe,CAAC,KAAK,EAAE,4BAA4B;CAgB1D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "serwist",
3
- "version": "9.0.0-preview.26",
3
+ "version": "9.0.0",
4
4
  "type": "module",
5
5
  "description": "A Swiss Army knife for service workers.",
6
6
  "files": [
@@ -51,8 +51,8 @@
51
51
  "devDependencies": {
52
52
  "rollup": "4.14.3",
53
53
  "typescript": "5.5.0-dev.20240415",
54
- "@serwist/configs": "9.0.0-preview.26",
55
- "@serwist/utils": "9.0.0-preview.26"
54
+ "@serwist/configs": "9.0.0",
55
+ "@serwist/utils": "9.0.0"
56
56
  },
57
57
  "peerDependencies": {
58
58
  "typescript": ">=5.0.0"
@@ -41,7 +41,7 @@ export class StorableRequest {
41
41
 
42
42
  /**
43
43
  * Converts a Request object to a plain object that can be structured
44
- * cloned or JSON-stringified.
44
+ * cloned or stringified to JSON.
45
45
  *
46
46
  * @param request
47
47
  * @returns
@@ -79,8 +79,8 @@ export class StorableRequest {
79
79
  * Accepts an object of request data that can be used to construct a
80
80
  * `Request` but can also be stored in IndexedDB.
81
81
  *
82
- * @param requestData An object of request data that includes the `url` plus any relevant properties of
83
- * [requestInit](https://fetch.spec.whatwg.org/#requestinit).
82
+ * @param requestData An object of request data that includes the `url` plus any relevant property of
83
+ * [`requestInit`](https://fetch.spec.whatwg.org/#requestinit).
84
84
  */
85
85
  constructor(requestData: RequestData) {
86
86
  if (process.env.NODE_ENV !== "production") {
@@ -108,7 +108,7 @@ export class StorableRequest {
108
108
  }
109
109
 
110
110
  /**
111
- * Returns a deep clone of the instances `_requestData` object.
111
+ * Returns a deep clone of the instance's `requestData` object.
112
112
  *
113
113
  * @returns
114
114
  */
@@ -40,10 +40,6 @@ export interface PrecacheFallbackPluginOptions {
40
40
  * It does this by intercepting the `handlerDidError` plugin callback
41
41
  * and returning a precached response, taking the expected revision parameter
42
42
  * into account automatically.
43
- *
44
- * Unless you explicitly pass in a `PrecacheController` instance to the
45
- * constructor, the default instance will be used. Generally speaking, most
46
- * developers will end up using the default.
47
43
  */
48
44
  export class PrecacheFallbackPlugin implements SerwistPlugin {
49
45
  private readonly _fallbackUrls: (string | PrecacheFallbackEntry)[];
@@ -36,8 +36,8 @@ export interface StrategyOptions {
36
36
 
37
37
  /**
38
38
  * Abstract class for implementing runtime caching strategies.
39
- *
40
- * Custom strategies should extend this class and leverage `StrategyHandler`, which will ensure all relevant cache options,
39
+ *
40
+ * Custom strategies should extend this class and leverage `StrategyHandler`, which will ensure all relevant cache options,
41
41
  * fetch options, and plugins are used (per the current strategy instance), to perform all fetching and caching logic.
42
42
  */
43
43
  export abstract class Strategy implements RouteHandlerObject {
@@ -87,8 +87,8 @@ export abstract class Strategy implements RouteHandlerObject {
87
87
  }
88
88
 
89
89
  /**
90
- * Similar to `handle()`, but instead of just returning a `Promise` that
91
- * resolves to a `Response`, it will return an tuple of `[response, done]` promises,
90
+ * Similar to `handle()`, but instead of just returning a `Promise` that
91
+ * resolves to a `Response`, it will return an tuple of `[response, done]` promises,
92
92
  * where `response` is equivalent to what `handle()` returns, and `done` is a
93
93
  * `Promise` that will resolve once all promises added to `event.waitUntil()` as a part
94
94
  * of performing the strategy have completed.