@hkdigital/lib-sveltekit 0.1.73 → 0.1.74
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.
@@ -2,33 +2,34 @@ declare const _default: {};
|
|
2
2
|
export default _default;
|
3
3
|
export type CacheEntry = {
|
4
4
|
/**
|
5
|
-
*
|
5
|
+
* - Cached Response object
|
6
6
|
*/
|
7
7
|
response: Response;
|
8
8
|
/**
|
9
|
-
* Cache metadata
|
9
|
+
* - Cache entry metadata
|
10
10
|
*/
|
11
11
|
metadata: any;
|
12
12
|
/**
|
13
|
-
*
|
13
|
+
* - Original URL
|
14
14
|
*/
|
15
15
|
url: string;
|
16
16
|
/**
|
17
|
-
* When the entry was cached
|
17
|
+
* - When the entry was cached
|
18
18
|
*/
|
19
19
|
timestamp: number;
|
20
20
|
/**
|
21
|
-
*
|
21
|
+
* - Expiration timestamp (null if no expiration)
|
22
22
|
*/
|
23
23
|
expires: number | null;
|
24
24
|
/**
|
25
|
-
* ETag
|
25
|
+
* - ETag header if present
|
26
26
|
*/
|
27
27
|
etag: string | null;
|
28
28
|
/**
|
29
|
-
* Last-Modified
|
29
|
+
* - Last-Modified header if present
|
30
30
|
*/
|
31
31
|
lastModified: string | null;
|
32
|
+
cacheVersion: string | null;
|
32
33
|
};
|
33
34
|
export type CacheStorage = {
|
34
35
|
/**
|
@@ -48,3 +49,19 @@ export type CacheStorage = {
|
|
48
49
|
*/
|
49
50
|
clear: () => Promise<void>;
|
50
51
|
};
|
52
|
+
export type IDBRequestEvent = {
|
53
|
+
/**
|
54
|
+
* - The request that generated the event
|
55
|
+
*/
|
56
|
+
target: IDBRequest;
|
57
|
+
};
|
58
|
+
export type IDBVersionChangeEvent = {
|
59
|
+
/**
|
60
|
+
* - The request that generated the event
|
61
|
+
*/
|
62
|
+
target: IDBOpenDBRequest;
|
63
|
+
/**
|
64
|
+
* - The transaction for database upgrade
|
65
|
+
*/
|
66
|
+
transaction?: IDBTransaction;
|
67
|
+
};
|
@@ -1,13 +1,14 @@
|
|
1
1
|
|
2
2
|
/**
|
3
3
|
* @typedef {Object} CacheEntry
|
4
|
-
* @property {Response} response
|
5
|
-
* @property {Object} metadata Cache metadata
|
6
|
-
* @property {string} url
|
7
|
-
* @property {number} timestamp When the entry was cached
|
8
|
-
* @property {number|null} expires
|
9
|
-
* @property {string|null} etag ETag
|
10
|
-
* @property {string|null} lastModified Last-Modified
|
4
|
+
* @property {Response} response - Cached Response object
|
5
|
+
* @property {Object} metadata - Cache entry metadata
|
6
|
+
* @property {string} url - Original URL
|
7
|
+
* @property {number} timestamp - When the entry was cached
|
8
|
+
* @property {number|null} expires - Expiration timestamp (null if no expiration)
|
9
|
+
* @property {string|null} etag - ETag header if present
|
10
|
+
* @property {string|null} lastModified - Last-Modified header if present
|
11
|
+
* @property {string|null} cacheVersion
|
11
12
|
*/
|
12
13
|
|
13
14
|
/**
|
@@ -22,4 +23,19 @@
|
|
22
23
|
* Clear all cached responses
|
23
24
|
*/
|
24
25
|
|
26
|
+
// > IndexedDB
|
27
|
+
|
28
|
+
/**
|
29
|
+
* @typedef {Object} IDBRequestEvent
|
30
|
+
* @property {IDBRequest} target - The request that generated the event
|
31
|
+
*/
|
32
|
+
|
33
|
+
/**
|
34
|
+
* @typedef {Object} IDBVersionChangeEvent
|
35
|
+
* @property {IDBOpenDBRequest} target - The request that generated the event
|
36
|
+
* @property {IDBTransaction} [target.transaction] - The transaction for database upgrade
|
37
|
+
*/
|
38
|
+
|
39
|
+
// > Export default
|
40
|
+
|
25
41
|
export default {};
|