@blaze-cache/fetch 0.0.0-stage → 0.2.1-beta
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/LICENSE +21 -0
- package/README.md +193 -2
- package/dist/cache-control.d.ts +55 -0
- package/dist/cache-control.d.ts.map +1 -0
- package/dist/cache-control.js +110 -0
- package/dist/cache-control.js.map +1 -0
- package/dist/client.d.ts +21 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +398 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/key.d.ts +23 -0
- package/dist/key.d.ts.map +1 -0
- package/dist/key.js +41 -0
- package/dist/key.js.map +1 -0
- package/dist/request.d.ts +33 -0
- package/dist/request.d.ts.map +1 -0
- package/dist/request.js +55 -0
- package/dist/request.js.map +1 -0
- package/dist/types.d.ts +192 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +49 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.js","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,2FAA2F;AAC3F,MAAM,UAAU,SAAS,CAAC,KAAwB;IAChD,OAAO,OAAO,OAAO,KAAK,WAAW,IAAI,KAAK,YAAY,OAAO,CAAC;AACpE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,KAAwB;IACjD,IAAI,SAAS,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC,GAAG,CAAC;IACvC,MAAM,GAAG,GAAG,KAAK,YAAY,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9D,IAAI,CAAC;QACH,OAAO,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;IAC3B,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,GAAG,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC;QACvC,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC;IAC5D,CAAC;AACH,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,aAAa,CAAC,KAAwB,EAAE,IAAiB;IACvE,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAC9E,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;AAC3C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAC3B,KAAwB,EACxB,IAAiB,EACjB,MAAc;IAEd,OAAO;QACL,GAAG,IAAI;QACP,MAAM;QACN,OAAO,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;QACpF,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;KAClE,CAAC;AACJ,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Value written on the `x-blaze-cache` response header by every response the wrapper returns.
|
|
3
|
+
*
|
|
4
|
+
* * `MISS` — the response came from the network.
|
|
5
|
+
* * `HIT` — served from the cache while still fresh.
|
|
6
|
+
* * `STALE` — served from the cache past its freshness window, only while
|
|
7
|
+
* {@link BlazeFetchOptions.staleWhileRevalidate} is enabled. A background revalidation is
|
|
8
|
+
* already under way, so the *next* request gets a `HIT`.
|
|
9
|
+
*/
|
|
10
|
+
export type BlazeFetchMarker = 'HIT' | 'MISS' | 'STALE';
|
|
11
|
+
/**
|
|
12
|
+
* What the wrapper stores in Blaze Cache for one response.
|
|
13
|
+
*
|
|
14
|
+
* The record is a plain, structured-clone-friendly object: an `ArrayBuffer` body plus
|
|
15
|
+
* primitive metadata, so it survives an IndexedDB round-trip when the cache is configured
|
|
16
|
+
* with persistence.
|
|
17
|
+
*/
|
|
18
|
+
export interface FetchCacheRecord {
|
|
19
|
+
status: number;
|
|
20
|
+
statusText: string;
|
|
21
|
+
/** Response headers as a plain record, names lower-cased (as `Headers` reports them). */
|
|
22
|
+
headers: Record<string, string>;
|
|
23
|
+
/**
|
|
24
|
+
* Raw response body.
|
|
25
|
+
*
|
|
26
|
+
* Empty for statuses that cannot carry one (`204`, `205`, `304`) — those are replayed with
|
|
27
|
+
* a `null` body, exactly like the network sent them.
|
|
28
|
+
*/
|
|
29
|
+
body: ArrayBuffer;
|
|
30
|
+
/** Final URL after redirects — replayed as [`Response.url`](https://developer.mozilla.org/en-US/docs/Web/API/Response/url). */
|
|
31
|
+
url: string;
|
|
32
|
+
/** Whether the stored response followed a redirect. */
|
|
33
|
+
redirected: boolean;
|
|
34
|
+
/** `Date.now()` when the response was received. */
|
|
35
|
+
storedAt: number;
|
|
36
|
+
/** `Date.now()` at which the entry stops being *fresh* and switches to revalidation. */
|
|
37
|
+
freshUntil: number;
|
|
38
|
+
/** `Date.now()` at which the entry stops being served at all (equal to `freshUntil` when stale-while-revalidate is off). */
|
|
39
|
+
staleUntil: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* `RequestInit` as accepted by the wrapper, plus one non-standard escape hatch.
|
|
43
|
+
*
|
|
44
|
+
* Everything the platform defines keeps its meaning; {@link forceRefresh} is additive, and
|
|
45
|
+
* the standard `cache: 'no-cache' | 'reload'` spellings do the same job if you prefer them.
|
|
46
|
+
*/
|
|
47
|
+
export interface BlazeFetchInit extends RequestInit {
|
|
48
|
+
/**
|
|
49
|
+
* Skip the cache **read** and go straight to the network. The fresh response still
|
|
50
|
+
* replaces whatever was stored, so one forced refresh restores a `HIT` afterwards.
|
|
51
|
+
*
|
|
52
|
+
* Standard equivalent: `cache: 'no-cache'`.
|
|
53
|
+
*/
|
|
54
|
+
forceRefresh?: boolean;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* `BlazeFetchInit` as the callbacks receive it — the *effective* request.
|
|
58
|
+
*
|
|
59
|
+
* `headers` is a concrete {@link Headers} (the caller's `init.headers` merged over a
|
|
60
|
+
* `Request`'s own) and `method` is resolved and upper-cased, so a callback never has to
|
|
61
|
+
* reproduce the three-shape `fetch` input handling:
|
|
62
|
+
*
|
|
63
|
+
* ```ts
|
|
64
|
+
* key: (url, init) => `${init.method} ${url}?${init.headers.get('authorization') ?? ''}`,
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export interface BlazeFetchEffectiveInit extends Omit<BlazeFetchInit, 'headers' | 'method'> {
|
|
68
|
+
/** Resolved HTTP method, upper-cased. */
|
|
69
|
+
method: string;
|
|
70
|
+
/** Merged request headers, with `init.headers` winning over a `Request`'s. */
|
|
71
|
+
headers: Headers;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The wrapper's call signature — a drop-in replacement for the global `fetch`.
|
|
75
|
+
*
|
|
76
|
+
* Assignable to `typeof fetch` (proved at compile time in this file), so it drops into
|
|
77
|
+
* anything that expects the platform function:
|
|
78
|
+
*
|
|
79
|
+
* ```ts
|
|
80
|
+
* const blazeFetch = createBlazeFetch(cache);
|
|
81
|
+
* const asFetch: typeof fetch = blazeFetch;
|
|
82
|
+
* window.fetch = blazeFetch;
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
export type BlazeFetch = (input: RequestInfo | URL, init?: BlazeFetchInit) => Promise<Response>;
|
|
86
|
+
/** Options accepted by {@link createBlazeFetch}. All of them are optional. */
|
|
87
|
+
export interface BlazeFetchOptions {
|
|
88
|
+
/**
|
|
89
|
+
* The function performing the real network call. Defaults to the global `fetch`.
|
|
90
|
+
*
|
|
91
|
+
* Pass a stub to test callers without a server — it receives exactly the `input`/`init`
|
|
92
|
+
* the wrapper was called with, never a rewritten request.
|
|
93
|
+
*/
|
|
94
|
+
fetch?: typeof fetch;
|
|
95
|
+
/**
|
|
96
|
+
* Freshness window for a stored response, in milliseconds.
|
|
97
|
+
*
|
|
98
|
+
* Ignored when the response carries `Cache-Control: max-age`, which wins. A response
|
|
99
|
+
* carrying `Age` has that age deducted. Default: `60_000`. A value `<= 0` means
|
|
100
|
+
* "do not store".
|
|
101
|
+
*/
|
|
102
|
+
ttlMs?: number | ((response: Response, url: string, init: BlazeFetchEffectiveInit) => number);
|
|
103
|
+
/**
|
|
104
|
+
* HTTP methods eligible for caching. Default: `['GET']`.
|
|
105
|
+
*
|
|
106
|
+
* Pass `['GET', 'HEAD']` to cache `HEAD` too. Any other method always goes to the network
|
|
107
|
+
* and is never stored. Non-cacheable methods are also never coalesced with an identical
|
|
108
|
+
* in-flight request — replaying a side effect would be worse than repeating one.
|
|
109
|
+
*/
|
|
110
|
+
methods?: readonly string[];
|
|
111
|
+
/**
|
|
112
|
+
* Honour `Cache-Control` on both sides of the exchange. Default: `true`.
|
|
113
|
+
*
|
|
114
|
+
* * request `no-store` → neither read nor write the cache;
|
|
115
|
+
* * request `no-cache` / `max-age=0` → skip the read, still store the response;
|
|
116
|
+
* * response `no-store` → never stored;
|
|
117
|
+
* * response `no-cache` (even per-field, `no-cache="field1"`) → never stored;
|
|
118
|
+
* * response `max-age` → overrides {@link ttlMs}, minus the response's `Age`;
|
|
119
|
+
* * response `stale-while-revalidate` → the stale window, when {@link staleWhileRevalidate} is on;
|
|
120
|
+
* * response `must-revalidate` / `proxy-revalidate` → no stale window, however short the fresh one.
|
|
121
|
+
*
|
|
122
|
+
* Set to `false` to treat `ttlMs` as the only authority. The response's `Vary` header is
|
|
123
|
+
* *always* honoured (see {@link varyHeaders}) — variant correctness is not a preference.
|
|
124
|
+
*/
|
|
125
|
+
cacheControl?: boolean;
|
|
126
|
+
/**
|
|
127
|
+
* Serve responses past their freshness window while refreshing them in the background.
|
|
128
|
+
* Default: `false` (a stale entry simply falls through to the network).
|
|
129
|
+
*
|
|
130
|
+
* * `true` — honour the response's `Cache-Control: stale-while-revalidate=<seconds>`.
|
|
131
|
+
* * a number — that, **plus** the same many milliseconds as a fallback when the response
|
|
132
|
+
* omits the directive, so opting in works against servers that never send it.
|
|
133
|
+
*
|
|
134
|
+
* Such responses are marked `x-blaze-cache: STALE` and revalidated once per key: the
|
|
135
|
+
* refresh is a forced refresh, so it can never re-serve the stale entry to itself. A
|
|
136
|
+
* response carrying `must-revalidate`/`proxy-revalidate` never opens the stale window,
|
|
137
|
+
* and the refresh never inherits the caller's `signal` — it is the wrapper's own work.
|
|
138
|
+
*/
|
|
139
|
+
staleWhileRevalidate?: boolean | number;
|
|
140
|
+
/**
|
|
141
|
+
* Builds the cache key. Receives the resolved absolute `url` and the effective `init`
|
|
142
|
+
* (see {@link BlazeFetchEffectiveInit}).
|
|
143
|
+
*
|
|
144
|
+
* The default is `"<method> <url>"` plus a hash of {@link varyHeaders} — {@link defaultCacheKey}
|
|
145
|
+
* is that default, so you can wrap it and only change the parts you care about. Replacing
|
|
146
|
+
* the key replaces **everything** the default included, so include `init.method` yourself
|
|
147
|
+
* when caching more than one method.
|
|
148
|
+
*/
|
|
149
|
+
key?: (url: string, init: BlazeFetchEffectiveInit) => string;
|
|
150
|
+
/**
|
|
151
|
+
* Decide whether a response is worth storing. Default: only `2xx` responses
|
|
152
|
+
* (the {@link methods} gate has already applied by then).
|
|
153
|
+
*
|
|
154
|
+
* A response this rejects is still returned — it is simply not cached, and still carries
|
|
155
|
+
* `x-blaze-cache: MISS`. A callback that *throws* is treated exactly the same way (after
|
|
156
|
+
* one console warning): a cache-layer failure never fails a response the network answered
|
|
157
|
+
* well.
|
|
158
|
+
*/
|
|
159
|
+
shouldCache?: (response: Response, url: string, init: BlazeFetchEffectiveInit) => boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Tags attached to stored responses. Default: `['fetch', '<method> <url>']`.
|
|
162
|
+
*
|
|
163
|
+
* The first tag lets one call drop the whole wrapper's content
|
|
164
|
+
* (`cache.invalidateTags('fetch')`); the second drops a single resource.
|
|
165
|
+
*/
|
|
166
|
+
tags?: (response: Response, url: string, init: BlazeFetchEffectiveInit) => readonly string[];
|
|
167
|
+
/**
|
|
168
|
+
* Request headers whose values participate in the cache key. Default: `['authorization']`.
|
|
169
|
+
*
|
|
170
|
+
* A personalized response must never be served to a different user just because the URL
|
|
171
|
+
* matched. Values are hashed, never stored verbatim.
|
|
172
|
+
*
|
|
173
|
+
* A response's own `Vary` header is checked against this list before it is stored: a
|
|
174
|
+
* response varying on anything *not* listed cannot be keyed correctly, so it is left
|
|
175
|
+
* uncached — and `Vary: *` is never stored at all (RFC 9111 §3).
|
|
176
|
+
*/
|
|
177
|
+
varyHeaders?: readonly string[];
|
|
178
|
+
/**
|
|
179
|
+
* Response header set to `HIT` / `MISS` / `STALE`. Default: `'x-blaze-cache'`.
|
|
180
|
+
* Pass `false` to disable the marker entirely.
|
|
181
|
+
*/
|
|
182
|
+
markerHeader?: string | false;
|
|
183
|
+
}
|
|
184
|
+
/** The slice of a cache the wrapper needs — deliberately structural. */
|
|
185
|
+
export interface BlazeFetchCacheLike {
|
|
186
|
+
get(key: string): FetchCacheRecord | undefined;
|
|
187
|
+
set(key: string, value: FetchCacheRecord, options?: {
|
|
188
|
+
ttlMs?: number;
|
|
189
|
+
tags?: readonly string[];
|
|
190
|
+
}): void;
|
|
191
|
+
}
|
|
192
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d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"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cache/fetch",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.1-beta",
|
|
4
|
+
"description": "Drop-in fetch() replacement backed by a WebAssembly cache — TTLs, Cache-Control, stale-while-revalidate and an x-blaze-cache HIT/MISS marker",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"fetch",
|
|
7
|
+
"http",
|
|
8
|
+
"request",
|
|
9
|
+
"cache",
|
|
10
|
+
"caching",
|
|
11
|
+
"stale-while-revalidate",
|
|
12
|
+
"cache-control",
|
|
13
|
+
"webassembly",
|
|
14
|
+
"wasm",
|
|
15
|
+
"ttl"
|
|
16
|
+
],
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/blaze-cache/blaze-cache.git",
|
|
21
|
+
"directory": "packages/fetch"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://blaze-cache.github.io/docs/",
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": false,
|
|
28
|
+
"type": "module",
|
|
29
|
+
"main": "dist/index.js",
|
|
30
|
+
"types": "dist/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"import": "./dist/index.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist"
|
|
39
|
+
],
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@blaze-cache/core": "0.2.1-beta"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"typescript": "^5.9.3"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc -p tsconfig.json",
|
|
48
|
+
"test": "pnpm run build && node --test",
|
|
49
|
+
"test:live": "pnpm run build && BLAZE_CACHE_LIVE=1 node --test test/live.test.mjs",
|
|
50
|
+
"typecheck": "tsc -p tsconfig.typecheck.json"
|
|
51
|
+
}
|
|
6
52
|
}
|