@warp-drive/core 5.6.0-alpha.17 → 5.6.0-alpha.5

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 (219) hide show
  1. package/README.md +7 -8
  2. package/declarations/index.d.ts +3 -14
  3. package/declarations/index.d.ts.map +1 -0
  4. package/declarations/request/-private/context.d.ts +35 -34
  5. package/declarations/request/-private/context.d.ts.map +1 -0
  6. package/declarations/request/-private/debug.d.ts +3 -2
  7. package/declarations/request/-private/debug.d.ts.map +1 -0
  8. package/declarations/request/-private/fetch.d.ts +36 -24
  9. package/declarations/request/-private/fetch.d.ts.map +1 -0
  10. package/declarations/request/-private/future.d.ts +4 -3
  11. package/declarations/request/-private/future.d.ts.map +1 -0
  12. package/declarations/request/-private/manager.d.ts +132 -159
  13. package/declarations/request/-private/manager.d.ts.map +1 -0
  14. package/declarations/request/-private/promise-cache.d.ts +13 -21
  15. package/declarations/request/-private/promise-cache.d.ts.map +1 -0
  16. package/declarations/request/-private/types.d.ts +123 -124
  17. package/declarations/request/-private/types.d.ts.map +1 -0
  18. package/declarations/request/-private/utils.d.ts +9 -8
  19. package/declarations/request/-private/utils.d.ts.map +1 -0
  20. package/declarations/request.d.ts +433 -5
  21. package/declarations/request.d.ts.map +1 -0
  22. package/declarations/types/-private.d.ts +8 -16
  23. package/declarations/types/-private.d.ts.map +1 -0
  24. package/declarations/types/cache/aliases.d.ts +1 -11
  25. package/declarations/types/cache/aliases.d.ts.map +1 -0
  26. package/declarations/types/cache/change.d.ts +5 -4
  27. package/declarations/types/cache/change.d.ts.map +1 -0
  28. package/declarations/types/cache/mutations.d.ts +28 -51
  29. package/declarations/types/cache/mutations.d.ts.map +1 -0
  30. package/declarations/types/cache/operations.d.ts +47 -60
  31. package/declarations/types/cache/operations.d.ts.map +1 -0
  32. package/declarations/types/cache/relationship.d.ts +9 -11
  33. package/declarations/types/cache/relationship.d.ts.map +1 -0
  34. package/declarations/types/cache.d.ts +484 -495
  35. package/declarations/types/cache.d.ts.map +1 -0
  36. package/declarations/types/graph.d.ts +40 -31
  37. package/declarations/types/graph.d.ts.map +1 -0
  38. package/declarations/types/identifier.d.ts +82 -83
  39. package/declarations/types/identifier.d.ts.map +1 -0
  40. package/declarations/types/json/raw.d.ts +2 -1
  41. package/declarations/types/json/raw.d.ts.map +1 -0
  42. package/declarations/types/params.d.ts +5 -4
  43. package/declarations/types/params.d.ts.map +1 -0
  44. package/declarations/types/record.d.ts +76 -117
  45. package/declarations/types/record.d.ts.map +1 -0
  46. package/declarations/types/record.type-test.d.ts +2 -0
  47. package/declarations/types/record.type-test.d.ts.map +1 -0
  48. package/declarations/types/request.d.ts +266 -289
  49. package/declarations/types/request.d.ts.map +1 -0
  50. package/declarations/types/request.type-test.d.ts +2 -0
  51. package/declarations/types/request.type-test.d.ts.map +1 -0
  52. package/declarations/types/runtime.d.ts +9 -8
  53. package/declarations/types/runtime.d.ts.map +1 -0
  54. package/declarations/types/schema/concepts.d.ts +13 -19
  55. package/declarations/types/schema/concepts.d.ts.map +1 -0
  56. package/declarations/types/schema/fields.d.ts +1741 -1712
  57. package/declarations/types/schema/fields.d.ts.map +1 -0
  58. package/declarations/types/schema/fields.type-test.d.ts +1 -0
  59. package/declarations/types/schema/fields.type-test.d.ts.map +1 -0
  60. package/declarations/types/spec/document.d.ts +22 -28
  61. package/declarations/types/spec/document.d.ts.map +1 -0
  62. package/declarations/types/spec/error.d.ts +17 -16
  63. package/declarations/types/spec/error.d.ts.map +1 -0
  64. package/declarations/types/spec/json-api-raw.d.ts +102 -102
  65. package/declarations/types/spec/json-api-raw.d.ts.map +1 -0
  66. package/declarations/types/symbols.d.ts +75 -74
  67. package/declarations/types/symbols.d.ts.map +1 -0
  68. package/declarations/types/utils.d.ts +5 -5
  69. package/declarations/types/utils.d.ts.map +1 -0
  70. package/declarations/types.d.ts +7 -10
  71. package/declarations/types.d.ts.map +1 -0
  72. package/dist/{context-COmAnXUQ.js → context-DE5sFezZ.js} +2 -2
  73. package/dist/context-DE5sFezZ.js.map +1 -0
  74. package/dist/index.js +104 -37
  75. package/dist/index.js.map +1 -0
  76. package/dist/request.js +1 -1
  77. package/dist/request.js.map +1 -0
  78. package/dist/types/-private.js +3 -3
  79. package/dist/types/-private.js.map +1 -0
  80. package/dist/types/cache/aliases.js.map +1 -0
  81. package/dist/types/cache/change.js.map +1 -0
  82. package/dist/types/cache/mutations.js.map +1 -0
  83. package/dist/types/cache/operations.js.map +1 -0
  84. package/dist/types/cache/relationship.js.map +1 -0
  85. package/dist/types/cache.js.map +1 -0
  86. package/dist/types/graph.js.map +1 -0
  87. package/dist/types/identifier.js.map +1 -0
  88. package/dist/types/json/raw.js.map +1 -0
  89. package/dist/types/params.js.map +1 -0
  90. package/dist/types/record.js +1 -1
  91. package/dist/types/record.js.map +1 -0
  92. package/dist/types/request.js +2 -2
  93. package/dist/types/request.js.map +1 -0
  94. package/dist/types/runtime.js +1 -1
  95. package/dist/types/runtime.js.map +1 -0
  96. package/dist/types/schema/concepts.js.map +1 -0
  97. package/dist/types/schema/fields.js +41 -8
  98. package/dist/types/schema/fields.js.map +1 -0
  99. package/dist/types/schema/fields.type-test.js.map +1 -0
  100. package/dist/types/spec/document.js.map +1 -0
  101. package/dist/types/spec/error.js.map +1 -0
  102. package/dist/types/spec/json-api-raw.js.map +1 -0
  103. package/dist/types/symbols.js +3 -3
  104. package/dist/types/symbols.js.map +1 -0
  105. package/dist/types/utils.js.map +1 -0
  106. package/dist/types.js.map +1 -0
  107. package/package.json +8 -11
  108. package/cjs-dist/addon-shim.cjs +0 -1
  109. package/cjs-dist/cjs-set-config.cjs +0 -1
  110. package/declarations/build-config/babel-macros.d.ts +0 -1
  111. package/declarations/build-config/canary-features.d.ts +0 -1
  112. package/declarations/build-config/debugging.d.ts +0 -1
  113. package/declarations/build-config/deprecations.d.ts +0 -1
  114. package/declarations/build-config/env.d.ts +0 -1
  115. package/declarations/build-config/macros.d.ts +0 -1
  116. package/declarations/build-config.d.ts +0 -1
  117. package/declarations/configure.d.ts +0 -7
  118. package/declarations/graph/-private/-diff.d.ts +0 -32
  119. package/declarations/graph/-private/-edge-definition.d.ts +0 -148
  120. package/declarations/graph/-private/-state.d.ts +0 -96
  121. package/declarations/graph/-private/-utils.d.ts +0 -31
  122. package/declarations/graph/-private/coerce-id.d.ts +0 -10
  123. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +0 -18
  124. package/declarations/graph/-private/edges/collection.d.ts +0 -39
  125. package/declarations/graph/-private/edges/implicit.d.ts +0 -43
  126. package/declarations/graph/-private/edges/resource.d.ts +0 -24
  127. package/declarations/graph/-private/graph.d.ts +0 -90
  128. package/declarations/graph/-private/normalize-link.d.ts +0 -8
  129. package/declarations/graph/-private/operations/add-to-related-records.d.ts +0 -4
  130. package/declarations/graph/-private/operations/merge-identifier.d.ts +0 -3
  131. package/declarations/graph/-private/operations/remove-from-related-records.d.ts +0 -4
  132. package/declarations/graph/-private/operations/replace-related-record.d.ts +0 -3
  133. package/declarations/graph/-private/operations/replace-related-records.d.ts +0 -62
  134. package/declarations/graph/-private/operations/update-relationship.d.ts +0 -13
  135. package/declarations/graph/-private.d.ts +0 -13
  136. package/declarations/reactive/-private/document.d.ts +0 -146
  137. package/declarations/reactive/-private/fields/compute.d.ts +0 -43
  138. package/declarations/reactive/-private/fields/extension.d.ts +0 -8
  139. package/declarations/reactive/-private/fields/managed-array.d.ts +0 -22
  140. package/declarations/reactive/-private/fields/managed-object.d.ts +0 -21
  141. package/declarations/reactive/-private/fields/many-array-manager.d.ts +0 -19
  142. package/declarations/reactive/-private/hooks.d.ts +0 -5
  143. package/declarations/reactive/-private/record.d.ts +0 -64
  144. package/declarations/reactive/-private/schema.d.ts +0 -271
  145. package/declarations/reactive/-private/symbols.d.ts +0 -36
  146. package/declarations/reactive/-private.d.ts +0 -1
  147. package/declarations/reactive.d.ts +0 -4
  148. package/declarations/store/-private/cache-handler/handler.d.ts +0 -62
  149. package/declarations/store/-private/cache-handler/types.d.ts +0 -98
  150. package/declarations/store/-private/cache-handler/utils.d.ts +0 -32
  151. package/declarations/store/-private/caches/cache-utils.d.ts +0 -12
  152. package/declarations/store/-private/caches/identifier-cache.d.ts +0 -304
  153. package/declarations/store/-private/caches/instance-cache.d.ts +0 -65
  154. package/declarations/store/-private/caches/resource-utils.d.ts +0 -9
  155. package/declarations/store/-private/debug/utils.d.ts +0 -6
  156. package/declarations/store/-private/default-cache-policy.d.ts +0 -384
  157. package/declarations/store/-private/legacy-model-support/record-reference.d.ts +0 -159
  158. package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts +0 -17
  159. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +0 -25
  160. package/declarations/store/-private/managers/cache-manager.d.ts +0 -443
  161. package/declarations/store/-private/managers/notification-manager.d.ts +0 -98
  162. package/declarations/store/-private/managers/record-array-manager.d.ts +0 -97
  163. package/declarations/store/-private/network/request-cache.d.ts +0 -107
  164. package/declarations/store/-private/new-core-tmp/promise-state.d.ts +0 -263
  165. package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +0 -176
  166. package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +0 -169
  167. package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +0 -35
  168. package/declarations/store/-private/new-core-tmp/request-state.d.ts +0 -277
  169. package/declarations/store/-private/new-core-tmp/request-subscription.d.ts +0 -261
  170. package/declarations/store/-private/record-arrays/identifier-array.d.ts +0 -147
  171. package/declarations/store/-private/record-arrays/many-array.d.ts +0 -197
  172. package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +0 -126
  173. package/declarations/store/-private/store-service.d.ts +0 -1605
  174. package/declarations/store/-private/utils/coerce-id.d.ts +0 -10
  175. package/declarations/store/-private/utils/construct-resource.d.ts +0 -6
  176. package/declarations/store/-private/utils/is-non-empty-string.d.ts +0 -1
  177. package/declarations/store/-private/utils/normalize-model-name.d.ts +0 -1
  178. package/declarations/store/-private/utils/uuid-polyfill.d.ts +0 -1
  179. package/declarations/store/-private.d.ts +0 -31
  180. package/declarations/store/-types/q/cache-capabilities-manager.d.ts +0 -99
  181. package/declarations/store/-types/q/ds-model.d.ts +0 -21
  182. package/declarations/store/-types/q/identifier.d.ts +0 -20
  183. package/declarations/store/-types/q/record-instance.d.ts +0 -23
  184. package/declarations/store/-types/q/schema-service.d.ts +0 -354
  185. package/declarations/store/-types/q/store.d.ts +0 -32
  186. package/declarations/store.d.ts +0 -1
  187. package/declarations/utils/string.d.ts +0 -48
  188. package/dist/build-config/babel-macros.js +0 -1
  189. package/dist/build-config/canary-features.js +0 -1
  190. package/dist/build-config/debugging.js +0 -1
  191. package/dist/build-config/deprecations.js +0 -1
  192. package/dist/build-config/env.js +0 -1
  193. package/dist/build-config/macros.js +0 -1
  194. package/dist/build-config.js +0 -1
  195. package/dist/configure-B48bFHOl.js +0 -181
  196. package/dist/configure.js +0 -1
  197. package/dist/graph/-private.js +0 -3372
  198. package/dist/handler-C2T-IyJK.js +0 -339
  199. package/dist/reactive/-private.js +0 -1
  200. package/dist/reactive.js +0 -1988
  201. package/dist/request-state-CjLph1LP.js +0 -8139
  202. package/dist/store/-private.js +0 -3
  203. package/dist/store.js +0 -545
  204. package/dist/symbols-SIstXMLI.js +0 -44
  205. package/dist/utils/string.js +0 -92
  206. package/logos/NCC-1701-a-blue.svg +0 -4
  207. package/logos/NCC-1701-a-gold.svg +0 -4
  208. package/logos/NCC-1701-a-gold_100.svg +0 -1
  209. package/logos/NCC-1701-a-gold_base-64.txt +0 -1
  210. package/logos/NCC-1701-a.svg +0 -4
  211. package/logos/README.md +0 -4
  212. package/logos/docs-badge.svg +0 -2
  213. package/logos/ember-data-logo-dark.svg +0 -12
  214. package/logos/ember-data-logo-light.svg +0 -12
  215. package/logos/github-header.svg +0 -444
  216. package/logos/social1.png +0 -0
  217. package/logos/social2.png +0 -0
  218. package/logos/warp-drive-logo-dark.svg +0 -4
  219. package/logos/warp-drive-logo-gold.svg +0 -4
@@ -1,5 +1,433 @@
1
- export { createDeferred } from "./request/-private/future.js";
2
- export type { Future, Handler, CacheHandler, NextFn, Deferred, ManagedRequestPriority } from "./request/-private/types.js";
3
- export { setPromiseResult, getPromiseResult } from "./request/-private/promise-cache.js";
4
- export type { Awaitable } from "./request/-private/promise-cache.js";
5
- export type { Context } from "./request/-private/context.js";
1
+ /**
2
+ *
3
+ <p align="center">
4
+ <img
5
+ class="project-logo"
6
+ src="https://raw.githubusercontent.com/emberjs/data/4612c9354e4c54d53327ec2cf21955075ce21294/ember-data-logo-light.svg#gh-light-mode-only"
7
+ alt="EmberData RequestManager"
8
+ width="240px"
9
+ title="EmberData RequestManager"
10
+ />
11
+ </p>
12
+
13
+ <p align="center">⚡️ a simple abstraction over fetch to enable easy management of request/response flows</p>
14
+
15
+ This package provides [*Ember*‍**Data**](https://github.com/emberjs/data/)'s `RequestManager`, a framework agnostic library that can be integrated with any Javascript application to make [fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) happen.
16
+
17
+ - [Installation](#installation)
18
+ - [Basic Usage](#🚀-basic-usage)
19
+ - [Architecture](#🪜-architecture)
20
+ - [Usage](#usage)
21
+ - [Making Requests](#making-requests)
22
+ - [Using The Response](#using-the-response)
23
+ - [Request Handlers](#handling-requests)
24
+ - [Handling Errors](#handling-errors)
25
+ - [Handling Abort](#handling-abort)
26
+ - [Stream Currying](#stream-currying)
27
+ - [Automatic Currying](#automatic-currying-of-stream-and-response)
28
+ - [Using as a Service](#using-as-a-service)
29
+ - [Using with `@ember-data/store`](#using-with-ember-datastore)
30
+ - [Using with `ember-data`](#using-with-ember-data)
31
+
32
+ ---
33
+
34
+ ## Installation
35
+
36
+ Install using your javascript package manager of choice. For instance with [pnpm](https://pnpm.io/)
37
+
38
+ ```no-highlight
39
+ pnpm add @ember-data/request
40
+ ```
41
+
42
+ ---
43
+
44
+ ## 🚀 Basic Usage
45
+
46
+ A `RequestManager` provides a request/response flow in which configured handlers are successively given the opportunity to handle, modify, or pass-along a request.
47
+
48
+ The RequestManager on its own does not know how to fulfill requests. For this we must register at least one handler. A basic `Fetch` handler is provided that will take the request options provided and execute `fetch`.
49
+
50
+ ```ts
51
+ import RequestManager from '@ember-data/request';
52
+ import Fetch from '@ember-data/request/fetch';
53
+ import { apiUrl } from './config';
54
+
55
+ // ... create manager and add our Fetch handler
56
+ const manager = new RequestManager()
57
+ .use([Fetch]);
58
+
59
+ // ... execute a request
60
+ const response = await manager.request({
61
+ url: `${apiUrl}/users`
62
+ });
63
+ ```
64
+
65
+ ---
66
+
67
+ ## 🪜 Architecture
68
+
69
+ A `RequestManager` receives a request and manages fulfillment via configured handlers. It may be used standalone from the rest of *Ember*‍**Data** and is not specific to any library or framework.
70
+
71
+ Each handler may choose to fulfill the request using some source of data or to pass the request along to other handlers.
72
+
73
+ The same or a separate instance of a `RequestManager` may also be used to fulfill requests issued by [*Ember*‍**Data**{Store}](https://github.com/emberjs/data/tree/main/packages/store)
74
+
75
+ When the same instance is used by both this allows for simple coordination throughout the application. Requests issued by the Store will use the in-memory cache
76
+ and return hydrated responses, requests issued directly to the RequestManager
77
+ will skip the in-memory cache and return raw responses.
78
+
79
+ ---
80
+
81
+ ## Usage
82
+
83
+ ```ts
84
+ const userList = await manager.request({
85
+ url: `/api/v1/users.list`
86
+ });
87
+
88
+ const users = userList.content;
89
+ ```
90
+
91
+ ---
92
+
93
+ ### Making Requests
94
+
95
+ `RequestManager` has a single asyncronous method as it's API: `request`
96
+
97
+ ```ts
98
+ class RequestManager {
99
+ request<T>(req: RequestInfo): Future<T>;
100
+ }
101
+ ```
102
+
103
+ `manager.request(<RequestInfo>)` accepts an object containing the information
104
+ necessary for the request to be handled successfully.
105
+
106
+ These options extend the [options](https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters) provided to `fetch`, and can accept a [`Request`](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request). All properties accepted by Request options and fetch options are valid.
107
+
108
+ ```ts
109
+ interface RequestInfo extends FetchOptions {
110
+ op?: string;
111
+ store?: Store;
112
+
113
+ url: string;
114
+ // data that a handler should convert into
115
+ // the query (GET) or body (POST)
116
+ data?: Record<string, unknown>;
117
+
118
+ // options specifically intended for handlers
119
+ // to utilize to process the request
120
+ options?: Record<string, unknown>;
121
+ }
122
+ ```
123
+
124
+ > **note**
125
+ > providing a `signal` is unnecessary as an `AbortController` is automatically provided if none is present.
126
+
127
+ ---
128
+
129
+ #### Using the Response
130
+
131
+ `manager.request` returns a `Future`, which allows access to limited information about the request while it is still pending and fulfills with the final state when the request completes and the response has been read.
132
+
133
+ ```ts
134
+ const usersFuture = manager.request({
135
+ url: `/api/v1/users.list`
136
+ });
137
+ ```
138
+
139
+ A `Future` is cancellable via `abort`.
140
+
141
+ ```ts
142
+ usersFuture.abort();
143
+ ```
144
+
145
+ Handlers may *optionally* expose a ReadableStream to the `Future` for streaming data; however, when doing so the handler should not resolve until it has fully read the response stream itself.
146
+
147
+ ```ts
148
+ interface Future<T> extends Promise<StructuredDocument<T>> {
149
+ abort(): void;
150
+
151
+ async getStream(): ReadableStream | null;
152
+ }
153
+ ```
154
+
155
+ A Future resolves or rejects with a `StructuredDocument`.
156
+
157
+ ```ts
158
+ interface StructuredDocument<T> {
159
+ request: RequestInfo;
160
+ response: ResponseInfo | null;
161
+ content?: T;
162
+ error?: Error;
163
+ }
164
+ ```
165
+
166
+ The `RequestInfo` specified by `document.request` is the same as originally provided to `manager.request`. If any handler fulfilled this request using different request info it is not represented here. This contract helps to ensure that `retry` and `caching` are possible since the original arguments are correctly preserved. This also allows handlers to "fork" the request or fulfill from multiple sources without the details of fulfillment muddying the original request.
167
+
168
+ The `ResponseInfo` is a serializable fulfilled subset of a [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response) if set via `setResponse`. If no response was ever set this will be `null`.
169
+
170
+ ```ts
171
+ interface ResponseInfo {
172
+ headers?: Record<string, string>;
173
+ ok?: boolean;
174
+ redirected?: boolean;
175
+ status?: HTTPStatusCode;
176
+ statusText?: string;
177
+ type?: 'basic' | 'cors';
178
+ url?: string;
179
+ }
180
+ ```
181
+
182
+ ---
183
+
184
+ ### Request Handlers
185
+
186
+ Requests are fulfilled by handlers. A handler receives the request context
187
+ as well as a `next` function with which to pass along a request to the next
188
+ handler if it so chooses.
189
+
190
+ A handler may be any object with a `request` method. This allows both stateful and non-stateful
191
+ handlers to be utilized.
192
+
193
+ If a handler calls `next`, it receives a `Future` which resolves to a `StructuredDocument`
194
+ that it can then compose how it sees fit with its own response.
195
+
196
+ ```ts
197
+
198
+ type NextFn<P> = (req: RequestInfo) => Future<P>;
199
+
200
+ interface Handler {
201
+ async request<T>(context: RequestContext, next: NextFn<P>): T;
202
+ }
203
+ ```
204
+
205
+ `RequestContext` contains a readonly version of the RequestInfo as well as a few methods for building up the `StructuredDocument` and `Future` that will be part of the response.
206
+
207
+ ```ts
208
+ interface RequestContext<T> {
209
+ readonly request: RequestInfo;
210
+
211
+ setStream(stream: ReadableStream | Promise<ReadableStream>): void;
212
+ setResponse(response: Response | ResponseInfo): void;
213
+ }
214
+ ```
215
+
216
+ A basic `fetch` handler with support for streaming content updates while
217
+ the download is still underway might look like the following, where we use
218
+ [`response.clone()`](https://developer.mozilla.org/en-US/docs/Web/API/Response/clone) to `tee` the `ReadableStream` into two streams.
219
+
220
+ A more efficient handler might read from the response stream, building up the
221
+ response content before passing along the chunk downstream.
222
+
223
+ ```ts
224
+ const FetchHandler = {
225
+ async request(context) {
226
+ const response = await fetch(context.request);
227
+ context.setResponse(reponse);
228
+ context.setStream(response.clone().body);
229
+
230
+ return response.json();
231
+ }
232
+ }
233
+ ```
234
+
235
+ Request handlers are registered by configuring the manager via `use`
236
+
237
+ ```ts
238
+ manager.use([Handler1, Handler2])
239
+ ```
240
+
241
+ Handlers will be invoked in the order they are registered ("fifo", first-in first-out), and may only be registered up until the first request is made. It is recommended but not required to register all handlers at one time in order to ensure explicitly visible handler ordering.
242
+
243
+ ---
244
+
245
+ #### Handling Errors
246
+
247
+ Each handler in the chain can catch errors from upstream and choose to
248
+ either handle the error, re-throw the error, or throw a new error.
249
+
250
+ ```ts
251
+ const MAX_RETRIES = 5;
252
+
253
+ const Handler = {
254
+ async request(context, next) {
255
+ let attempts = 0;
256
+
257
+ while (attempts < MAX_RETRIES) {
258
+ attempts++;
259
+ try {
260
+ const response = await next(context.request);
261
+ return response;
262
+ } catch (e) {
263
+ if (isTimeoutError(e) && attempts < MAX_RETRIES) {
264
+ // retry request
265
+ continue;
266
+ }
267
+ // rethrow if it is not a timeout error
268
+ throw e;
269
+ }
270
+ }
271
+ }
272
+ }
273
+ ```
274
+
275
+ ---
276
+
277
+ #### Handling Abort
278
+
279
+ Aborting a request will reject the current handler in the chain. However,
280
+ every handler can potentially catch this error. If your handler needs to
281
+ separate AbortError from other Error types, it is recommended to check
282
+ `context.request.signal.aborted` (or if a custom controller was supplied `controller.signal.aborted`).
283
+
284
+ In this manner it is possible for a request to recover from an abort and
285
+ still proceed; however, as a best practice this should be used for necessary
286
+ cleanup only and the original AbortError rethrown if the abort signal comes
287
+ from the root controller.
288
+
289
+ **AbortControllers are Always Present and Always Entangled**
290
+
291
+ If the initial request does not supply an [AbortController](https://developer.mozilla.org/en-US/docs/Web/API/AbortController), one will be generated.
292
+
293
+ The [signal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) for this controller is automatically added to the request passed into the first handler.
294
+
295
+ Each handler has the option to supply a new controller to the request when calling `next`. If a new controller is provided it will be automatically
296
+ entangled with the root controller. If the root controller aborts, so will
297
+ any entangled controllers.
298
+
299
+ If an entangled controller aborts, the root controller will not abort. This
300
+ allows for advanced request-flow scenarios to abort subsections of the request tree without aborting the entire request.
301
+
302
+ ---
303
+
304
+ #### Stream Currying
305
+
306
+ `RequestManager.request` and `next` differ from `fetch` in one **crucial detail** in that the outer Promise resolves only once the response stream has been processed.
307
+
308
+ For context, it helps to understand a few of the use-cases that RequestManager
309
+ is intended to allow.
310
+
311
+ - to manage and return streaming content (such as video files)
312
+ - to fulfill a request from multiple sources or by splitting one request into multiple requests
313
+ - for instance one API call for a user and another for the user's friends
314
+ - or e.g. fulfilling part of the request from one source (one API, in-memory, localStorage, IndexedDB
315
+ etc.) and the rest from another source (a different API, a WebWorker, etc.)
316
+ - to coalesce multiple requests
317
+ - to decorate a request with additional info
318
+ - e.g. an Auth handler that ensures the correct tokens or headers or cookies are attached.
319
+
320
+
321
+ `await fetch(<req>)` resolves at the moment headers are received. This allows for the body of the request to be processed as a stream by application
322
+ code *while chunks are still being received by the browser*.
323
+
324
+ When an app chooses to `await response.json()` what occurs is the browser reads the stream to completion and then returns the result. Additionally, this stream may only be read **once**.
325
+
326
+ The `RequestManager` preserves this ability to subscribe to and utilize the stream by either the application or the handler – thereby delivering the full power and flexibility of native APIs – without restricting developers in ways that lead to complicated workarounds.
327
+
328
+ Each handler may call `setStream` only once, but may do so *at any time* until the promise that the handler returns has resolved. The associated promise returned by calling `future.getStream` will resolve with the stream set by `setStream` if that method is called, or `null` if that method
329
+ has not been called by the time that the handler's request method has resolved.
330
+
331
+ Handlers that do not create a stream of their own, but which call `next`, should defensively pipe the stream forward. While this is not required (see automatic currying below) it is better to do so in most cases as otherwise the stream may not become available to downstream handlers or the application until the upstream handler has fully read it.
332
+
333
+ ```ts
334
+ context.setStream(future.getStream());
335
+ ```
336
+
337
+ Handlers that either call `next` multiple times or otherwise have reason to create multiple fetch requests should either choose to return no stream, meaningfully combine the streams, or select a single prioritized stream.
338
+
339
+ Of course, any handler may choose to read and handle the stream, and return either no stream or a different stream in the process.
340
+
341
+ ---
342
+
343
+ #### Automatic Currying of Stream and Response
344
+
345
+ In order to simplify the common case for handlers which decorate a request, if `next` is called only a single time and `setResponse` was never called by the handler, the response set by the next handler in the chain will be applied to that handler's outcome. For instance, this makes the following pattern possible `return (await next(<req>)).content;`.
346
+
347
+ Similarly, if `next` is called only a single time and neither `setStream` nor `getStream` was called, we automatically curry the stream from the future returned by `next` onto the future returned by the handler.
348
+
349
+ Finally, if the return value of a handler is a `Future`, we curry `content` and `errors` as well, thus enabling the simplest form `return next(<req>)`.
350
+
351
+ In the case of the `Future` being returned, `Stream` proxying is automatic and immediate and does not wait for the `Future` to resolve.
352
+
353
+ ---
354
+
355
+ #### Using with `@ember-data/store`
356
+
357
+ To have a request service unique to a Store:
358
+
359
+ ```ts
360
+ import Store, { CacheHandler } from '@ember-data/store';
361
+ import RequestManager from '@ember-data/request';
362
+ import Fetch from '@ember-data/request/fetch';
363
+
364
+ class extends Store {
365
+ requestManager = new RequestManager()
366
+ .use([Fetch])
367
+ .useCache(CacheHandler);
368
+ }
369
+ ```
370
+
371
+ ---
372
+
373
+ ### Using as a Service
374
+
375
+ Some applications will desire to have a single `RequestManager` instance, which can be achieved using module-state patterns for singletons, or for [Ember](https://emberjs.com) applications by exporting the manager as a [service](https://guides.emberjs.com/release/services/).
376
+
377
+ *services/request.ts*
378
+ ```ts
379
+ import { CacheHandler } from '@ember-data/store';
380
+ import RequestManager from '@ember-data/request';
381
+ import Fetch from '@ember-data/request/fetch';
382
+ import Auth from 'ember-simple-auth/ember-data-handler';
383
+
384
+ export default {
385
+ create() {
386
+ return new RequestManager()
387
+ .use([Auth, Fetch])
388
+ .use(CacheHandler);
389
+ }
390
+ }
391
+ ```
392
+
393
+ ---
394
+
395
+ #### Using with `ember-data`
396
+
397
+ If using the package [ember-data](https://github.com/emberjs/data/tree/main/packages/-ember-data),
398
+ the following configuration will automatically be done in order to preserve the
399
+ legacy [Adapter](https://github.com/emberjs/data/tree/main/packages/adapter) and
400
+ [Serializer](https://github.com/emberjs/data/tree/main/packages/serializer) behavior.
401
+ Additional handlers or a service injection like the above would need to be done by the
402
+ consuming application in order to make broader use of `RequestManager`.
403
+
404
+ ```ts
405
+ import Store from 'ember-data/store';
406
+ import { CacheHandler } from '@ember-data/store';
407
+ import RequestManager from '@ember-data/request';
408
+ import Fetch from '@ember-data/request/fetch';
409
+ import { LegacyNetworkHandler } from '@ember-data/legacy-compat';
410
+
411
+ export default class extends Store {
412
+ requestManager = new RequestManager()
413
+ .use([LegacyNetworkHandler, Fetch])
414
+ .useCache(CacheHandler);
415
+ }
416
+ ```
417
+
418
+ To provide a different configuration, import and extend `ember-data/store`. The
419
+ default configuration will be ignored if the `requestManager` property is set,
420
+ though the store will still register the CacheHandler.
421
+
422
+ For usage of the store's `requestManager` via `store.request(<req>)` see the
423
+ [Store](https://api.emberjs.com/ember-data/release/modules/@ember-data%2Fstore) documentation.
424
+
425
+ *
426
+ * @module
427
+ */
428
+ export { createDeferred } from './request/-private/future.ts';
429
+ export type { Future, Handler, CacheHandler, NextFn, Deferred, ManagedRequestPriority, } from './request/-private/types.ts';
430
+ export { setPromiseResult, getPromiseResult } from './request/-private/promise-cache.ts';
431
+ export type { Awaitable } from './request/-private/promise-cache.ts';
432
+ export type { Context } from './request/-private/context.ts';
433
+ //# sourceMappingURL=request.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../src/request.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0aG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,YAAY,EACV,MAAM,EACN,OAAO,EACP,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACzF,YAAY,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AACrE,YAAY,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC"}
@@ -1,22 +1,14 @@
1
- type UniversalTransientKey = "REQ_ID";
2
- type UniversalKey = `(transient) ${UniversalTransientKey}` | "RequestMap" | "PromiseCache" | "RequestCache" | "SkipCache" | "EnableHydration" | "WarpDriveRuntimeConfig";
3
- type TransientKey = "transactionRef" | "configuredGenerationMethod" | "configuredUpdateMethod" | "configuredForgetMethod" | "configuredResetMethod" | "configuredKeyInfoMethod" | "signalHooks";
4
- type GlobalKey = `(transient) ${TransientKey}` | "AdapterError" | "InvalidError" | "TimeoutError" | "AbortError" | "UnauthorizedError" | "ForbiddenError" | "NotFoundError" | "ConflictError" | "ServerError" | "#{}" | "#[]" | "Signals" | "AvailableShims" | "FAKE_ARR" | "#source" | "#update" | "#notify" | "IS_COLLECTION" | "Touching" | "RequestPromise" | "SaveOp" | "LEGACY_SUPPORT" | "LegacySupport" | "Graphs" | "IS_FROZEN" | "IS_CACHE_HANDLER" | "CONFIG" | "DEBUG_MAP" | "IDENTIFIERS" | "DOCUMENTS" | "CacheForIdentifierCache" | "RecordCache" | "StoreMap" | "Store" | "$type" | "TransformName" | "RequestSignature" | "IS_FUTURE" | "DOC" | "ManagedArrayMap" | "ManagedObjectMap" | "Support" | "SOURCE" | "MUTATE" | "Destroy" | "Identifier" | "Editable" | "EmbeddedPath" | "EmbeddedField" | "Parent" | "Checkout" | "Legacy";
1
+ type UniversalTransientKey = 'REQ_ID';
2
+ type UniversalKey = `(transient) ${UniversalTransientKey}` | 'RequestMap' | 'PromiseCache' | 'RequestCache' | 'SkipCache' | 'EnableHydration' | 'WarpDriveRuntimeConfig';
3
+ type TransientKey = 'transactionRef' | 'configuredGenerationMethod' | 'configuredUpdateMethod' | 'configuredForgetMethod' | 'configuredResetMethod' | 'configuredKeyInfoMethod' | 'signalHooks';
4
+ type GlobalKey = `(transient) ${TransientKey}` | 'AdapterError' | 'InvalidError' | 'TimeoutError' | 'AbortError' | 'UnauthorizedError' | 'ForbiddenError' | 'NotFoundError' | 'ConflictError' | 'ServerError' | '#{}' | '#[]' | 'Signals' | 'AvailableShims' | 'FAKE_ARR' | '#source' | '#update' | '#notify' | 'IS_COLLECTION' | 'Touching' | 'RequestPromise' | 'SaveOp' | 'LEGACY_SUPPORT' | 'LegacySupport' | 'Graphs' | 'IS_FROZEN' | 'IS_CACHE_HANDLER' | 'CONFIG' | 'DEBUG_MAP' | 'IDENTIFIERS' | 'DOCUMENTS' | 'CacheForIdentifierCache' | 'RecordCache' | 'StoreMap' | 'Store' | '$type' | 'TransformName' | 'RequestSignature' | 'IS_FUTURE' | 'DOC' | 'ManagedArrayMap' | 'ManagedObjectMap' | 'Support' | 'SOURCE' | 'MUTATE' | 'Destroy' | 'Identifier' | 'Editable' | 'EmbeddedPath' | 'EmbeddedType' | 'Parent' | 'Checkout' | 'Legacy';
5
5
  type UniqueSymbol<T extends string> = `___(unique) Symbol(${T})`;
6
- type UniqueSymbolOr<
7
- T,
8
- K extends string
9
- > = T extends symbol ? UniqueSymbol<K> : T;
10
- export declare function getOrSetGlobal<
11
- T,
12
- K extends GlobalKey
13
- >(key: K, value: T): UniqueSymbolOr<T, K>;
6
+ type UniqueSymbolOr<T, K extends string> = T extends symbol ? UniqueSymbol<K> : T;
7
+ export declare function getOrSetGlobal<T, K extends GlobalKey>(key: K, value: T): UniqueSymbolOr<T, K>;
14
8
  export declare function peekTransient<T>(key: TransientKey): T | null;
15
9
  export declare function setTransient<T>(key: TransientKey, value: T): T;
16
- export declare function getOrSetUniversal<
17
- T,
18
- K extends UniversalKey
19
- >(key: K, value: T): UniqueSymbolOr<T, K>;
10
+ export declare function getOrSetUniversal<T, K extends UniversalKey>(key: K, value: T): UniqueSymbolOr<T, K>;
20
11
  export declare function peekUniversalTransient<T>(key: UniversalTransientKey): T | null;
21
12
  export declare function setUniversalTransient<T>(key: UniversalTransientKey, value: T): T;
22
13
  export {};
14
+ //# sourceMappingURL=-private.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"-private.d.ts","sourceRoot":"","sources":["../../src/types/-private.ts"],"names":[],"mappings":"AAMA,KAAK,qBAAqB,GAExB,QAAQ,CAAC;AAEX,KAAK,YAAY,GACb,eAAe,qBAAqB,EAAE,GAEtC,YAAY,GACZ,cAAc,GACd,cAAc,GAEd,WAAW,GACX,iBAAiB,GAEjB,wBAAwB,CAAC;AAE7B,KAAK,YAAY,GAEb,gBAAgB,GAEhB,4BAA4B,GAC5B,wBAAwB,GACxB,wBAAwB,GACxB,uBAAuB,GACvB,yBAAyB,GACzB,aAAa,CAAC;AAElB,KAAK,SAAS,GACV,eAAe,YAAY,EAAE,GAE7B,cAAc,GACd,cAAc,GACd,cAAc,GACd,YAAY,GACZ,mBAAmB,GACnB,gBAAgB,GAChB,eAAe,GACf,eAAe,GACf,aAAa,GAEb,KAAK,GACL,KAAK,GACL,SAAS,GAET,gBAAgB,GAEhB,UAAU,GAEV,SAAS,GACT,SAAS,GACT,SAAS,GACT,eAAe,GAEf,UAAU,GACV,gBAAgB,GAEhB,QAAQ,GAER,gBAAgB,GAChB,eAAe,GAEf,QAAQ,GAER,WAAW,GACX,kBAAkB,GAElB,QAAQ,GAER,WAAW,GACX,aAAa,GACb,WAAW,GAEX,yBAAyB,GACzB,aAAa,GACb,UAAU,GAEV,OAAO,GACP,OAAO,GACP,eAAe,GACf,kBAAkB,GAElB,WAAW,GACX,KAAK,GAEL,iBAAiB,GACjB,kBAAkB,GAClB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,YAAY,GACZ,UAAU,GACV,cAAc,GACd,cAAc,GACd,QAAQ,GACR,UAAU,GACV,QAAQ,CAAC;AA8Cb,KAAK,YAAY,CAAC,CAAC,SAAS,MAAM,IAAI,sBAAsB,CAAC,GAAG,CAAC;AACjE,KAAK,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,MAAM,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;AAElF,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,SAAS,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAW7F;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,YAAY,GAAG,CAAC,GAAG,IAAI,CAG5D;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAG9D;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,CAAC,SAAS,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAWnG;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,GAAG,EAAE,qBAAqB,GAAG,CAAC,GAAG,IAAI,CAG9E;AAED,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,GAAG,EAAE,qBAAqB,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAGhF"}
@@ -1,12 +1,2 @@
1
- // The ResourceBlob is an opaque type that must
2
- // satisfy two constraints.
3
- // (1) it should be possible for the IdentifierCache
4
- // to be able to generate a RecordIdentifier for it
5
- // whether by default or due to configuration.
6
- // (2) it should be in a format expected by the Cache.
7
- // This format is Cache declared.
8
- //
9
- // this Opaqueness allows arbitrary storage of any
10
- // serializable / transferable state including such things
11
- // as Buffers and Strings.
12
1
  export type ResourceBlob = unknown;
2
+ //# sourceMappingURL=aliases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aliases.d.ts","sourceRoot":"","sources":["../../../src/types/cache/aliases.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
@@ -1,6 +1,7 @@
1
- import type { StableDocumentIdentifier, StableRecordIdentifier } from "../identifier.js";
1
+ import type { StableDocumentIdentifier, StableRecordIdentifier } from '../identifier.ts';
2
2
  export interface Change {
3
- identifier: StableRecordIdentifier | StableDocumentIdentifier;
4
- op: "upsert" | "remove";
5
- patch?: unknown;
3
+ identifier: StableRecordIdentifier | StableDocumentIdentifier;
4
+ op: 'upsert' | 'remove';
5
+ patch?: unknown;
6
6
  }
7
+ //# sourceMappingURL=change.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"change.d.ts","sourceRoot":"","sources":["../../../src/types/cache/change.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAEzF,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,sBAAsB,GAAG,wBAAwB,CAAC;IAC9D,EAAE,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB"}
@@ -1,62 +1,39 @@
1
- import type { StableRecordIdentifier } from "../identifier.js";
1
+ import type { StableRecordIdentifier } from '../identifier.ts';
2
2
  export interface AddToResourceRelationshipMutation {
3
- op: "add";
4
- record: StableRecordIdentifier;
5
- field: string;
6
- value: StableRecordIdentifier | StableRecordIdentifier[];
7
- index?: number;
3
+ op: 'add';
4
+ record: StableRecordIdentifier;
5
+ field: string;
6
+ value: StableRecordIdentifier | StableRecordIdentifier[];
7
+ index?: number;
8
8
  }
9
9
  export interface RemoveFromResourceRelationshipMutation {
10
- op: "remove";
11
- record: StableRecordIdentifier;
12
- field: string;
13
- value: StableRecordIdentifier | StableRecordIdentifier[];
14
- index?: number;
10
+ op: 'remove';
11
+ record: StableRecordIdentifier;
12
+ field: string;
13
+ value: StableRecordIdentifier | StableRecordIdentifier[];
14
+ index?: number;
15
15
  }
16
16
  export interface ReplaceRelatedRecordMutation {
17
- op: "replaceRelatedRecord";
18
- record: StableRecordIdentifier;
19
- field: string;
20
- // never null if field is a collection
21
- value: StableRecordIdentifier | null;
22
- // if field is a collection,
23
- // the value we are swapping with
24
- prior?: StableRecordIdentifier;
25
- index?: number;
17
+ op: 'replaceRelatedRecord';
18
+ record: StableRecordIdentifier;
19
+ field: string;
20
+ value: StableRecordIdentifier | null;
21
+ prior?: StableRecordIdentifier;
22
+ index?: number;
26
23
  }
27
24
  export interface ReplaceRelatedRecordsMutation {
28
- op: "replaceRelatedRecords";
29
- record: StableRecordIdentifier;
30
- field: string;
31
- // the records to add. If no prior/index
32
- // specified all existing should be removed
33
- value: StableRecordIdentifier[];
34
- // if this is a "splice" the
35
- // records we expect to be removed
36
- prior?: StableRecordIdentifier[];
37
- // if this is a "splice" the
38
- // index to start from
39
- index?: number;
25
+ op: 'replaceRelatedRecords';
26
+ record: StableRecordIdentifier;
27
+ field: string;
28
+ value: StableRecordIdentifier[];
29
+ prior?: StableRecordIdentifier[];
30
+ index?: number;
40
31
  }
41
32
  export interface SortRelatedRecordsMutation {
42
- op: "sortRelatedRecords";
43
- record: StableRecordIdentifier;
44
- field: string;
45
- value: StableRecordIdentifier[];
33
+ op: 'sortRelatedRecords';
34
+ record: StableRecordIdentifier;
35
+ field: string;
36
+ value: StableRecordIdentifier[];
46
37
  }
47
- // A Mutation is an action that updates
48
- // the local state of the Cache in some
49
- // manner.
50
- // Most Mutations are in theory also
51
- // Operations; with the difference being
52
- // that the change should be applied as
53
- // "local" or "dirty" state instead of
54
- // as "remote" or "clean" state.
55
- //
56
- // Note: this RFC does not publicly surface
57
- // any of the mutations listed here as
58
- // "operations", though the (private) Graph
59
- // already expects and utilizes these.
60
- // and we look forward to an RFC that makes
61
- // the Graph a fully public API.
62
38
  export type Mutation = ReplaceRelatedRecordsMutation | ReplaceRelatedRecordMutation | RemoveFromResourceRelationshipMutation | AddToResourceRelationshipMutation | SortRelatedRecordsMutation;
39
+ //# sourceMappingURL=mutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../../src/types/cache/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,MAAM,WAAW,iCAAiC;IAChD,EAAE,EAAE,KAAK,CAAC;IACV,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,sBAAsB,GAAG,sBAAsB,EAAE,CAAC;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sCAAsC;IACrD,EAAE,EAAE,QAAQ,CAAC;IACb,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,sBAAsB,GAAG,sBAAsB,EAAE,CAAC;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,4BAA4B;IAC3C,EAAE,EAAE,sBAAsB,CAAC;IAC3B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IAEd,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAGrC,KAAK,CAAC,EAAE,sBAAsB,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,6BAA6B;IAC5C,EAAE,EAAE,uBAAuB,CAAC;IAC5B,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IAGd,KAAK,EAAE,sBAAsB,EAAE,CAAC;IAGhC,KAAK,CAAC,EAAE,sBAAsB,EAAE,CAAC;IAGjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,oBAAoB,CAAC;IACzB,MAAM,EAAE,sBAAsB,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,sBAAsB,EAAE,CAAC;CACjC;AAgBD,MAAM,MAAM,QAAQ,GAChB,6BAA6B,GAC7B,4BAA4B,GAC5B,sCAAsC,GACtC,iCAAiC,GACjC,0BAA0B,CAAC"}