@ember-data/legacy-compat 5.6.0-alpha.2 → 5.6.0-alpha.4
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/dist/{-private-Bnt-3W7M.js → -private-CVvkihLY.js} +16 -35
- package/dist/-private-CVvkihLY.js.map +1 -0
- package/dist/-private.js +1 -1
- package/dist/builders.js +0 -31
- package/dist/builders.js.map +1 -1
- package/dist/index.js +5 -14
- package/dist/index.js.map +1 -1
- package/dist/utils.js +1 -23
- package/dist/utils.js.map +1 -1
- package/package.json +15 -18
- package/unstable-preview-types/-private.d.ts +1 -2
- package/unstable-preview-types/-private.d.ts.map +1 -1
- package/unstable-preview-types/builders/find-all.d.ts +0 -6
- package/unstable-preview-types/builders/find-all.d.ts.map +1 -1
- package/unstable-preview-types/builders/find-record.d.ts +0 -6
- package/unstable-preview-types/builders/find-record.d.ts.map +1 -1
- package/unstable-preview-types/builders/query.d.ts +0 -9
- package/unstable-preview-types/builders/query.d.ts.map +1 -1
- package/unstable-preview-types/builders/save-record.d.ts +0 -6
- package/unstable-preview-types/builders/save-record.d.ts.map +1 -1
- package/unstable-preview-types/builders.d.ts +1 -2
- package/unstable-preview-types/builders.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +12 -20
- package/unstable-preview-types/index.d.ts.map +1 -1
- package/unstable-preview-types/legacy-network-handler/minimum-adapter-interface.d.ts +1 -21
- package/unstable-preview-types/legacy-network-handler/minimum-adapter-interface.d.ts.map +1 -1
- package/unstable-preview-types/legacy-network-handler/minimum-serializer-interface.d.ts +1 -10
- package/unstable-preview-types/legacy-network-handler/minimum-serializer-interface.d.ts.map +1 -1
- package/unstable-preview-types/legacy-network-handler/snapshot-record-array.d.ts +2 -7
- package/unstable-preview-types/legacy-network-handler/snapshot-record-array.d.ts.map +1 -1
- package/unstable-preview-types/legacy-network-handler/snapshot.d.ts +1 -10
- package/unstable-preview-types/legacy-network-handler/snapshot.d.ts.map +1 -1
- package/unstable-preview-types/utils.d.ts +0 -21
- package/unstable-preview-types/utils.d.ts.map +1 -1
- package/dist/-private-Bnt-3W7M.js.map +0 -1
|
@@ -4,10 +4,6 @@ import { macroCondition, getGlobalConfig, dependencySatisfies, importSync } from
|
|
|
4
4
|
import { createDeferred } from '@ember-data/request';
|
|
5
5
|
import { getOrSetGlobal } from '@warp-drive/core-types/-private';
|
|
6
6
|
|
|
7
|
-
/**
|
|
8
|
-
@module @ember-data/legacy-compat
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
7
|
/**
|
|
12
8
|
SnapshotRecordArray is not directly instantiable.
|
|
13
9
|
Instances are provided to consuming application's
|
|
@@ -21,8 +17,7 @@ class SnapshotRecordArray {
|
|
|
21
17
|
SnapshotRecordArray is not directly instantiable.
|
|
22
18
|
Instances are provided to consuming application's
|
|
23
19
|
adapters and serializers for certain requests.
|
|
24
|
-
@
|
|
25
|
-
@private
|
|
20
|
+
@private
|
|
26
21
|
@constructor
|
|
27
22
|
@param {Store} store
|
|
28
23
|
@param {String} type
|
|
@@ -49,7 +44,7 @@ class SnapshotRecordArray {
|
|
|
49
44
|
/**
|
|
50
45
|
A hash of adapter options passed into the store method for this request.
|
|
51
46
|
Example
|
|
52
|
-
```app/adapters/post.js
|
|
47
|
+
```js [app/adapters/post.js]
|
|
53
48
|
import MyCustomAdapter from './custom-adapter';
|
|
54
49
|
export default class PostAdapter extends MyCustomAdapter {
|
|
55
50
|
findAll(store, type, sinceToken, snapshotRecordArray) {
|
|
@@ -69,7 +64,7 @@ class SnapshotRecordArray {
|
|
|
69
64
|
/**
|
|
70
65
|
The relationships to include for this request.
|
|
71
66
|
Example
|
|
72
|
-
```app/adapters/application.js
|
|
67
|
+
```js [app/adapters/application.js]
|
|
73
68
|
import Adapter from '@ember-data/adapter';
|
|
74
69
|
export default class ApplicationAdapter extends Adapter {
|
|
75
70
|
findAll(store, type, snapshotRecordArray) {
|
|
@@ -98,7 +93,7 @@ class SnapshotRecordArray {
|
|
|
98
93
|
/**
|
|
99
94
|
Number of records in the array
|
|
100
95
|
Example
|
|
101
|
-
```app/adapters/post.js
|
|
96
|
+
```js [app/adapters/post.js]
|
|
102
97
|
import JSONAPIAdapter from '@ember-data/adapter/json-api';
|
|
103
98
|
export default class PostAdapter extends JSONAPIAdapter {
|
|
104
99
|
shouldReloadAll(store, snapshotRecordArray) {
|
|
@@ -117,7 +112,7 @@ class SnapshotRecordArray {
|
|
|
117
112
|
/**
|
|
118
113
|
Get snapshots of the underlying record array
|
|
119
114
|
Example
|
|
120
|
-
```app/adapters/post.js
|
|
115
|
+
```js [app/adapters/post.js]
|
|
121
116
|
import JSONAPIAdapter from '@ember-data/adapter/json-api';
|
|
122
117
|
export default class PostAdapter extends JSONAPIAdapter {
|
|
123
118
|
shouldReloadAll(store, snapshotArray) {
|
|
@@ -133,8 +128,7 @@ class SnapshotRecordArray {
|
|
|
133
128
|
}
|
|
134
129
|
}
|
|
135
130
|
```
|
|
136
|
-
@
|
|
137
|
-
@public
|
|
131
|
+
@public
|
|
138
132
|
@return {Array} Array of snapshots
|
|
139
133
|
*/
|
|
140
134
|
snapshots() {
|
|
@@ -236,9 +230,6 @@ function normalizeResponseHelper(serializer, store, modelClass, payload, id, req
|
|
|
236
230
|
return normalizedResponse;
|
|
237
231
|
}
|
|
238
232
|
|
|
239
|
-
/**
|
|
240
|
-
@module @ember-data/store
|
|
241
|
-
*/
|
|
242
233
|
/**
|
|
243
234
|
Snapshot is not directly instantiable.
|
|
244
235
|
Instances are provided to a consuming application's
|
|
@@ -252,7 +243,6 @@ function normalizeResponseHelper(serializer, store, modelClass, payload, id, req
|
|
|
252
243
|
*/
|
|
253
244
|
class Snapshot {
|
|
254
245
|
/**
|
|
255
|
-
* @method constructor
|
|
256
246
|
* @constructor
|
|
257
247
|
* @private
|
|
258
248
|
* @param options
|
|
@@ -383,8 +373,7 @@ class Snapshot {
|
|
|
383
373
|
postSnapshot.attr('title'); // => 'Ember.js rocks'
|
|
384
374
|
```
|
|
385
375
|
Note: Values are loaded eagerly and cached when the snapshot is created.
|
|
386
|
-
@
|
|
387
|
-
@param {String} keyName
|
|
376
|
+
@param {String} keyName
|
|
388
377
|
@return {Object} The attribute value or undefined
|
|
389
378
|
@public
|
|
390
379
|
*/
|
|
@@ -406,8 +395,7 @@ class Snapshot {
|
|
|
406
395
|
// store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });
|
|
407
396
|
postSnapshot.attributes(); // => { author: 'Tomster', title: 'Ember.js rocks' }
|
|
408
397
|
```
|
|
409
|
-
@
|
|
410
|
-
@return {Object} All attributes of the current snapshot
|
|
398
|
+
@return {Object} All attributes of the current snapshot
|
|
411
399
|
@public
|
|
412
400
|
*/
|
|
413
401
|
attributes() {
|
|
@@ -424,8 +412,7 @@ class Snapshot {
|
|
|
424
412
|
postModel.set('title', 'Ember.js rocks!');
|
|
425
413
|
postSnapshot.changedAttributes(); // => { title: ['Ember.js rocks', 'Ember.js rocks!'] }
|
|
426
414
|
```
|
|
427
|
-
@
|
|
428
|
-
@return {Object} All changed attributes of the current snapshot
|
|
415
|
+
@return {Object} All changed attributes of the current snapshot
|
|
429
416
|
@public
|
|
430
417
|
*/
|
|
431
418
|
changedAttributes() {
|
|
@@ -461,8 +448,7 @@ class Snapshot {
|
|
|
461
448
|
known but unset, `belongsTo` will return `null`. If the contents of the
|
|
462
449
|
relationship is unknown `belongsTo` will return `undefined`.
|
|
463
450
|
Note: Relationships are loaded lazily and cached upon first access.
|
|
464
|
-
@
|
|
465
|
-
@param {String} keyName
|
|
451
|
+
@param {String} keyName
|
|
466
452
|
@param {Object} [options]
|
|
467
453
|
@public
|
|
468
454
|
@return {(Snapshot|String|null|undefined)} A snapshot or ID of a known
|
|
@@ -547,8 +533,7 @@ class Snapshot {
|
|
|
547
533
|
postSnapshot.hasMany('comments'); // => undefined
|
|
548
534
|
```
|
|
549
535
|
Note: Relationships are loaded lazily and cached upon first access.
|
|
550
|
-
@
|
|
551
|
-
@param {String} keyName
|
|
536
|
+
@param {String} keyName
|
|
552
537
|
@param {Object} [options]
|
|
553
538
|
@public
|
|
554
539
|
@return {(Array|undefined)} An array of snapshots or IDs of a known
|
|
@@ -638,8 +623,7 @@ class Snapshot {
|
|
|
638
623
|
// ...
|
|
639
624
|
});
|
|
640
625
|
```
|
|
641
|
-
@
|
|
642
|
-
@param {Function} callback the callback to execute
|
|
626
|
+
@param {Function} callback the callback to execute
|
|
643
627
|
@param {Object} [binding] the value to which the callback's `this` should be bound
|
|
644
628
|
@public
|
|
645
629
|
*/
|
|
@@ -661,8 +645,7 @@ class Snapshot {
|
|
|
661
645
|
// ...
|
|
662
646
|
});
|
|
663
647
|
```
|
|
664
|
-
@
|
|
665
|
-
@param {Function} callback the callback to execute
|
|
648
|
+
@param {Function} callback the callback to execute
|
|
666
649
|
@param {Object} [binding] the value to which the callback's `this` should be bound
|
|
667
650
|
@public
|
|
668
651
|
*/
|
|
@@ -678,7 +661,7 @@ class Snapshot {
|
|
|
678
661
|
/**
|
|
679
662
|
Serializes the snapshot using the serializer for the model.
|
|
680
663
|
Example
|
|
681
|
-
```app/adapters/application.js
|
|
664
|
+
```js [app/adapters/application.js]
|
|
682
665
|
import Adapter from '@ember-data/adapter';
|
|
683
666
|
export default Adapter.extend({
|
|
684
667
|
createRecord(store, type, snapshot) {
|
|
@@ -691,8 +674,7 @@ class Snapshot {
|
|
|
691
674
|
}
|
|
692
675
|
});
|
|
693
676
|
```
|
|
694
|
-
@
|
|
695
|
-
@param {Object} options
|
|
677
|
+
@param {Object} options
|
|
696
678
|
@return {Object} an object whose values are primitive JSON values only
|
|
697
679
|
@public
|
|
698
680
|
*/
|
|
@@ -1200,8 +1182,7 @@ function _flushPendingSave(store, pending) {
|
|
|
1200
1182
|
* Utilities - often temporary - for maintaining backwards compatibility with
|
|
1201
1183
|
* older parts of EmberData.
|
|
1202
1184
|
*
|
|
1203
|
-
@module
|
|
1204
|
-
@main @ember-data/legacy-compat
|
|
1185
|
+
@module
|
|
1205
1186
|
*/
|
|
1206
1187
|
function upgradeStore(store) {}
|
|
1207
1188
|
export { FetchManager as F, SaveOp as S, assertIdentifierHasId as a, SnapshotRecordArray as b, Snapshot as c, iterateData as i, normalizeResponseHelper as n, payloadIsNotBlank as p, upgradeStore as u };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"-private-CVvkihLY.js","sources":["../src/legacy-network-handler/snapshot-record-array.ts","../src/legacy-network-handler/identifier-has-id.ts","../src/legacy-network-handler/legacy-data-utils.ts","../src/legacy-network-handler/serializer-response.ts","../src/legacy-network-handler/snapshot.ts","../src/legacy-network-handler/fetch-manager.ts","../src/-private.ts"],"sourcesContent":["import type Store from '@ember-data/store';\nimport type { LiveArray } from '@ember-data/store/-private';\nimport { SOURCE } from '@ember-data/store/-private';\nimport type { FindAllOptions, ModelSchema } from '@ember-data/store/types';\nimport type { StableRecordIdentifier } from '@warp-drive/core-types';\n\nimport { upgradeStore } from '../-private';\nimport type { Snapshot } from './snapshot';\n/**\n SnapshotRecordArray is not directly instantiable.\n Instances are provided to consuming application's\n adapters for certain `findAll` requests.\n\n @class SnapshotRecordArray\n @public\n*/\nexport class SnapshotRecordArray {\n declare _snapshots: Snapshot[] | null;\n declare _type: ModelSchema | null;\n declare modelName: string;\n declare __store: Store;\n\n declare adapterOptions?: Record<string, unknown>;\n declare include?: string | string[];\n\n /**\n SnapshotRecordArray is not directly instantiable.\n Instances are provided to consuming application's\n adapters and serializers for certain requests.\n\n @private\n @constructor\n @param {Store} store\n @param {String} type\n @param options\n */\n constructor(store: Store, type: string, options: FindAllOptions = {}) {\n this.__store = store;\n /**\n An array of snapshots\n @private\n @property _snapshots\n @type {Array}\n */\n this._snapshots = null;\n\n /**\n The modelName of the underlying records for the snapshots in the array, as a Model\n @property modelName\n @public\n @type {Model}\n */\n this.modelName = type;\n\n /**\n A hash of adapter options passed into the store method for this request.\n\n Example\n\n ```js [app/adapters/post.js]\n import MyCustomAdapter from './custom-adapter';\n\n export default class PostAdapter extends MyCustomAdapter {\n findAll(store, type, sinceToken, snapshotRecordArray) {\n if (snapshotRecordArray.adapterOptions.subscribe) {\n // ...\n }\n // ...\n }\n }\n ```\n\n @property adapterOptions\n @public\n @type {Object}\n */\n this.adapterOptions = options.adapterOptions;\n\n /**\n The relationships to include for this request.\n\n Example\n\n ```js [app/adapters/application.js]\n import Adapter from '@ember-data/adapter';\n\n export default class ApplicationAdapter extends Adapter {\n findAll(store, type, snapshotRecordArray) {\n let url = `/${type.modelName}?include=${encodeURIComponent(snapshotRecordArray.include)}`;\n\n return fetch(url).then((response) => response.json())\n }\n }\n ```\n\n @property include\n @public\n @type {String|Array}\n */\n this.include = options.include;\n }\n\n /**\n An array of records\n\n @property _recordArray\n @private\n @type {Array}\n */\n get _recordArray(): LiveArray {\n return this.__store.peekAll(this.modelName);\n }\n\n /**\n Number of records in the array\n\n Example\n\n ```js [app/adapters/post.js]\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n\n export default class PostAdapter extends JSONAPIAdapter {\n shouldReloadAll(store, snapshotRecordArray) {\n return !snapshotRecordArray.length;\n }\n });\n ```\n\n @property length\n @public\n @type {Number}\n */\n get length(): number {\n return this._recordArray.length;\n }\n\n /**\n Get snapshots of the underlying record array\n\n Example\n\n ```js [app/adapters/post.js]\n import JSONAPIAdapter from '@ember-data/adapter/json-api';\n\n export default class PostAdapter extends JSONAPIAdapter {\n shouldReloadAll(store, snapshotArray) {\n let snapshots = snapshotArray.snapshots();\n\n return snapshots.any(function(ticketSnapshot) {\n let timeDiff = moment().diff(ticketSnapshot.attr('lastAccessedAt'), 'minutes');\n if (timeDiff > 20) {\n return true;\n } else {\n return false;\n }\n });\n }\n }\n ```\n\n @public\n @return {Array} Array of snapshots\n */\n snapshots() {\n if (this._snapshots !== null) {\n return this._snapshots;\n }\n upgradeStore(this.__store);\n\n const { _fetchManager } = this.__store;\n this._snapshots = this._recordArray[SOURCE].map((identifier: StableRecordIdentifier) =>\n _fetchManager.createSnapshot(identifier)\n );\n\n return this._snapshots;\n }\n}\n","import { assert } from '@warp-drive/build-config/macros';\nimport type { StableExistingRecordIdentifier } from '@warp-drive/core-types/identifier';\n\nexport function assertIdentifierHasId(identifier: unknown): asserts identifier is StableExistingRecordIdentifier {\n assert(\n `Attempted to schedule a fetch for a record without an id.`,\n identifier && (identifier as StableExistingRecordIdentifier).id !== null\n );\n}\n","import type { AdapterPayload } from './minimum-adapter-interface';\n\ntype IteratorCB<T> = ((o: T, index: number) => T) | ((o: T) => T);\n\nexport function iterateData<T>(data: T[] | T, fn: IteratorCB<T>) {\n if (Array.isArray(data)) {\n return data.map(fn);\n } else {\n return fn(data, 0);\n }\n}\n\nexport function payloadIsNotBlank<T>(adapterPayload: T | AdapterPayload): adapterPayload is AdapterPayload {\n if (Array.isArray(adapterPayload)) {\n return true;\n } else {\n return Object.keys(adapterPayload || {}).length !== 0;\n }\n}\n","import type Store from '@ember-data/store';\nimport type { ModelSchema } from '@ember-data/store/types';\nimport { DEBUG } from '@warp-drive/build-config/env';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { JsonApiDocument } from '@warp-drive/core-types/spec/json-api-raw';\n\nimport type { AdapterPayload } from './minimum-adapter-interface';\nimport type { MinimumSerializerInterface, RequestType } from './minimum-serializer-interface';\n\n/**\n This is a helper method that validates a JSON API top-level document\n\n The format of a document is described here:\n http://jsonapi.org/format/#document-top-level\n\n @internal\n*/\nfunction validateDocumentStructure(doc?: AdapterPayload | JsonApiDocument): asserts doc is JsonApiDocument {\n if (DEBUG) {\n const errors: string[] = [];\n if (!doc || typeof doc !== 'object') {\n errors.push('Top level of a JSON API document must be an object');\n } else {\n if (!('data' in doc) && !('errors' in doc) && !('meta' in doc)) {\n errors.push('One or more of the following keys must be present: \"data\", \"errors\", \"meta\".');\n } else {\n if ('data' in doc && 'errors' in doc) {\n errors.push('Top level keys \"errors\" and \"data\" cannot both be present in a JSON API document');\n }\n }\n if ('data' in doc) {\n if (!(doc.data === null || Array.isArray(doc.data) || typeof doc.data === 'object')) {\n errors.push('data must be null, an object, or an array');\n }\n }\n if ('meta' in doc) {\n if (typeof doc.meta !== 'object') {\n errors.push('meta must be an object');\n }\n }\n if ('errors' in doc) {\n if (!Array.isArray(doc.errors)) {\n errors.push('errors must be an array');\n }\n }\n if ('links' in doc) {\n if (typeof doc.links !== 'object') {\n errors.push('links must be an object');\n }\n }\n if ('jsonapi' in doc) {\n if (typeof doc.jsonapi !== 'object') {\n errors.push('jsonapi must be an object');\n }\n }\n if ('included' in doc) {\n if (typeof doc.included !== 'object') {\n errors.push('included must be an array');\n }\n }\n }\n\n assert(\n `Response must be normalized to a valid JSON API document:\\n\\t* ${errors.join('\\n\\t* ')}`,\n errors.length === 0\n );\n }\n}\n\nexport function normalizeResponseHelper(\n serializer: MinimumSerializerInterface | null,\n store: Store,\n modelClass: ModelSchema,\n payload: AdapterPayload,\n id: string | null,\n requestType: RequestType\n): JsonApiDocument {\n const normalizedResponse = serializer\n ? serializer.normalizeResponse(store, modelClass, payload, id, requestType)\n : payload;\n\n validateDocumentStructure(normalizedResponse);\n\n return normalizedResponse;\n}\n","import { dependencySatisfies, importSync } from '@embroider/macros';\n\nimport type { CollectionEdge, ResourceEdge } from '@ember-data/graph/-private';\nimport type Store from '@ember-data/store';\nimport type { FindRecordOptions } from '@ember-data/store/types';\nimport { DEBUG } from '@warp-drive/build-config/env';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { StableRecordIdentifier } from '@warp-drive/core-types';\nimport type { ChangedAttributesHash } from '@warp-drive/core-types/cache';\nimport type { CollectionRelationship } from '@warp-drive/core-types/cache/relationship';\nimport type { Value } from '@warp-drive/core-types/json/raw';\nimport type { TypedRecordInstance, TypeFromInstance } from '@warp-drive/core-types/record';\nimport type { LegacyAttributeField, LegacyRelationshipField } from '@warp-drive/core-types/schema/fields';\n\nimport { upgradeStore } from '../-private';\nimport type { SerializerOptions } from './minimum-serializer-interface';\n\ntype RecordId = string | null;\n\n/**\n Snapshot is not directly instantiable.\n Instances are provided to a consuming application's\n adapters and serializers for certain requests.\n\n Snapshots are only available when using `@ember-data/legacy-compat`\n for legacy compatibility with adapters and serializers.\n\n @class Snapshot\n @public\n*/\nexport class Snapshot<R = unknown> {\n declare __attributes: Record<keyof R & string, unknown> | null;\n declare _belongsToRelationships: Record<string, Snapshot>;\n declare _belongsToIds: Record<string, RecordId>;\n declare _hasManyRelationships: Record<string, Snapshot[]>;\n declare _hasManyIds: Record<string, RecordId[]>;\n declare _changedAttributes: ChangedAttributesHash;\n\n declare identifier: StableRecordIdentifier<R extends TypedRecordInstance ? TypeFromInstance<R> : string>;\n declare modelName: R extends TypedRecordInstance ? TypeFromInstance<R> : string;\n declare id: string | null;\n declare include?: string | string[];\n declare adapterOptions?: Record<string, unknown>;\n declare _store: Store;\n\n /**\n * @constructor\n * @private\n * @param options\n * @param identifier\n * @param _store\n */\n constructor(\n options: FindRecordOptions,\n identifier: StableRecordIdentifier<R extends TypedRecordInstance ? TypeFromInstance<R> : string>,\n store: Store\n ) {\n this._store = store;\n\n this.__attributes = null;\n this._belongsToRelationships = Object.create(null) as Record<string, Snapshot>;\n this._belongsToIds = Object.create(null) as Record<string, RecordId>;\n this._hasManyRelationships = Object.create(null) as Record<string, Snapshot[]>;\n this._hasManyIds = Object.create(null) as Record<string, RecordId[]>;\n\n const hasRecord = !!store._instanceCache.peek(identifier);\n this.modelName = identifier.type;\n\n /**\n The unique RecordIdentifier associated with this Snapshot.\n\n @property identifier\n @public\n @type {StableRecordIdentifier}\n */\n this.identifier = identifier;\n\n /*\n If the we do not yet have a record, then we are\n likely a snapshot being provided to a find request, so we\n populate __attributes lazily. Else, to preserve the \"moment\n in time\" in which a snapshot is created, we greedily grab\n the values.\n */\n if (hasRecord) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n this._attributes;\n }\n\n /**\n The id of the snapshot's underlying record\n\n Example\n\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postSnapshot.id; // => '1'\n ```\n\n @property id\n @type {String}\n @public\n */\n this.id = identifier.id;\n\n /**\n A hash of adapter options\n @property adapterOptions\n @type {Object}\n @public\n */\n this.adapterOptions = options.adapterOptions;\n\n /**\n If `include` was passed to the options hash for the request, the value\n would be available here.\n\n @property include\n @type {String|Array}\n @public\n */\n this.include = options.include;\n\n /**\n The name of the type of the underlying record for this snapshot, as a string.\n\n @property modelName\n @type {String}\n @public\n */\n this.modelName = identifier.type;\n if (hasRecord) {\n const cache = this._store.cache;\n this._changedAttributes = cache.changedAttrs(identifier);\n }\n }\n\n /**\n The underlying record for this snapshot. Can be used to access methods and\n properties defined on the record.\n\n Example\n\n ```javascript\n let json = snapshot.record.toJSON();\n ```\n\n @property record\n @type {Model}\n @public\n */\n get record(): R | null {\n const record = this._store.peekRecord<R>(this.identifier);\n assert(\n `Record ${this.identifier.type} ${this.identifier.id} (${this.identifier.lid}) is not yet loaded and thus cannot be accessed from the Snapshot during serialization`,\n record !== null\n );\n return record;\n }\n\n get _attributes(): Record<keyof R & string, unknown> {\n if (this.__attributes !== null) {\n return this.__attributes;\n }\n const attributes = (this.__attributes = Object.create(null) as Record<string, unknown>);\n const { identifier } = this;\n const attrs = this._store.schema.fields(identifier);\n const cache = this._store.cache;\n\n attrs.forEach((field, keyName) => {\n if (field.kind === 'attribute') {\n attributes[keyName] = cache.getAttr(identifier, keyName);\n }\n });\n\n return attributes;\n }\n\n get isNew(): boolean {\n const cache = this._store.cache;\n return cache?.isNew(this.identifier) || false;\n }\n\n /**\n Returns the value of an attribute.\n\n Example\n\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postSnapshot.attr('author'); // => 'Tomster'\n postSnapshot.attr('title'); // => 'Ember.js rocks'\n ```\n\n Note: Values are loaded eagerly and cached when the snapshot is created.\n\n @param {String} keyName\n @return {Object} The attribute value or undefined\n @public\n */\n attr(keyName: keyof R & string): unknown {\n if (keyName in this._attributes) {\n return this._attributes[keyName];\n }\n assert(`Model '${this.identifier.lid}' has no attribute named '${keyName}' defined.`, false);\n }\n\n /**\n Returns all attributes and their corresponding values.\n\n Example\n\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postSnapshot.attributes(); // => { author: 'Tomster', title: 'Ember.js rocks' }\n ```\n\n @return {Object} All attributes of the current snapshot\n @public\n */\n attributes(): Record<keyof R & string, unknown> {\n return { ...this._attributes };\n }\n\n /**\n Returns all changed attributes and their old and new values.\n\n Example\n\n ```javascript\n // store.push('post', { id: 1, author: 'Tomster', title: 'Ember.js rocks' });\n postModel.set('title', 'Ember.js rocks!');\n postSnapshot.changedAttributes(); // => { title: ['Ember.js rocks', 'Ember.js rocks!'] }\n ```\n\n @return {Object} All changed attributes of the current snapshot\n @public\n */\n changedAttributes(): ChangedAttributesHash {\n const changedAttributes = Object.create(null) as ChangedAttributesHash;\n if (!this._changedAttributes) {\n return changedAttributes;\n }\n\n const changedAttributeKeys = Object.keys(this._changedAttributes);\n\n for (let i = 0, length = changedAttributeKeys.length; i < length; i++) {\n const key = changedAttributeKeys[i];\n changedAttributes[key] = this._changedAttributes[key].slice() as [Value | undefined, Value];\n }\n\n return changedAttributes;\n }\n\n /**\n Returns the current value of a belongsTo relationship.\n\n `belongsTo` takes an optional hash of options as a second parameter,\n currently supported options are:\n\n - `id`: set to `true` if you only want the ID of the related record to be\n returned.\n\n Example\n\n ```javascript\n // store.push('post', { id: 1, title: 'Hello World' });\n // store.createRecord('comment', { body: 'Lorem ipsum', post: post });\n commentSnapshot.belongsTo('post'); // => Snapshot\n commentSnapshot.belongsTo('post', { id: true }); // => '1'\n\n // store.push('comment', { id: 1, body: 'Lorem ipsum' });\n commentSnapshot.belongsTo('post'); // => undefined\n ```\n\n Calling `belongsTo` will return a new Snapshot as long as there's any known\n data for the relationship available, such as an ID. If the relationship is\n known but unset, `belongsTo` will return `null`. If the contents of the\n relationship is unknown `belongsTo` will return `undefined`.\n\n Note: Relationships are loaded lazily and cached upon first access.\n\n @param {String} keyName\n @param {Object} [options]\n @public\n @return {(Snapshot|String|null|undefined)} A snapshot or ID of a known\n relationship or null if the relationship is known but unset. undefined\n will be returned if the contents of the relationship is unknown.\n */\n belongsTo(keyName: string, options?: { id?: boolean }): Snapshot | RecordId | undefined {\n const returnModeIsId = !!(options && options.id);\n let result: Snapshot | RecordId | undefined;\n const store = this._store;\n\n if (returnModeIsId === true && keyName in this._belongsToIds) {\n return this._belongsToIds[keyName];\n }\n\n if (returnModeIsId === false && keyName in this._belongsToRelationships) {\n return this._belongsToRelationships[keyName];\n }\n\n const relationshipMeta = store.schema.fields({ type: this.modelName }).get(keyName);\n assert(\n `Model '${this.identifier.lid}' has no belongsTo relationship named '${keyName}' defined.`,\n relationshipMeta && relationshipMeta.kind === 'belongsTo'\n );\n\n assert(\n `snapshot.belongsTo only supported when using the package @ember-data/graph`,\n dependencySatisfies('@ember-data/graph', '*')\n );\n\n const graphFor = (importSync('@ember-data/graph/-private') as typeof import('@ember-data/graph/-private')).graphFor;\n const { identifier } = this;\n\n if (DEBUG) {\n const relationship = graphFor(this._store).get(identifier, keyName) as ResourceEdge;\n assert(\n `You looked up the ${keyName} belongsTo relationship for { type: ${identifier.type}, id: ${\n identifier.id || ''\n }, lid: ${identifier.lid} but no such relationship was found.`,\n relationship\n );\n assert(\n `You looked up the ${keyName} belongsTo relationship for { type: ${identifier.type}, id: ${\n identifier.id || ''\n }, lid: ${identifier.lid} but that relationship is a hasMany.`,\n relationship.definition.kind === 'belongsTo'\n );\n }\n\n const value = graphFor(this._store).getData(identifier, keyName);\n const data = value && value.data;\n upgradeStore(store);\n\n const inverseIdentifier = data ? store.identifierCache.getOrCreateRecordIdentifier(data) : null;\n\n if (value && value.data !== undefined) {\n const cache = store.cache;\n\n if (inverseIdentifier && !cache.isDeleted(inverseIdentifier)) {\n if (returnModeIsId) {\n result = inverseIdentifier.id;\n } else {\n result = store._fetchManager.createSnapshot(inverseIdentifier);\n }\n } else {\n result = null;\n }\n }\n\n if (returnModeIsId) {\n this._belongsToIds[keyName] = result as RecordId;\n } else {\n this._belongsToRelationships[keyName] = result as Snapshot;\n }\n\n return result;\n }\n\n /**\n Returns the current value of a hasMany relationship.\n\n `hasMany` takes an optional hash of options as a second parameter,\n currently supported options are:\n\n - `ids`: set to `true` if you only want the IDs of the related records to be\n returned.\n\n Example\n\n ```javascript\n // store.push('post', { id: 1, title: 'Hello World', comments: [2, 3] });\n postSnapshot.hasMany('comments'); // => [Snapshot, Snapshot]\n postSnapshot.hasMany('comments', { ids: true }); // => ['2', '3']\n\n // store.push('post', { id: 1, title: 'Hello World' });\n postSnapshot.hasMany('comments'); // => undefined\n ```\n\n Note: Relationships are loaded lazily and cached upon first access.\n\n @param {String} keyName\n @param {Object} [options]\n @public\n @return {(Array|undefined)} An array of snapshots or IDs of a known\n relationship or an empty array if the relationship is known but unset.\n undefined will be returned if the contents of the relationship is unknown.\n */\n hasMany(keyName: string, options?: { ids?: boolean }): RecordId[] | Snapshot[] | undefined {\n const returnModeIsIds = !!(options && options.ids);\n let results: RecordId[] | Snapshot[] | undefined;\n const cachedIds: RecordId[] | undefined = this._hasManyIds[keyName];\n const cachedSnapshots: Snapshot[] | undefined = this._hasManyRelationships[keyName];\n\n if (returnModeIsIds === true && keyName in this._hasManyIds) {\n return cachedIds;\n }\n\n if (returnModeIsIds === false && keyName in this._hasManyRelationships) {\n return cachedSnapshots;\n }\n\n const store = this._store;\n upgradeStore(store);\n const relationshipMeta = store.schema.fields({ type: this.modelName }).get(keyName);\n assert(\n `Model '${this.identifier.lid}' has no hasMany relationship named '${keyName}' defined.`,\n relationshipMeta && relationshipMeta.kind === 'hasMany'\n );\n\n // TODO @runspired it seems this code branch would not work with CUSTOM_MODEL_CLASSes\n // this check is not a regression in behavior because relationships don't currently\n // function without access to intimate API contracts between RecordData and Model.\n // This is a requirement we should fix as soon as the relationship layer does not require\n // this intimate API usage.\n assert(\n `snapshot.hasMany only supported when using the package @ember-data/graph`,\n dependencySatisfies('@ember-data/graph', '*')\n );\n\n const graphFor = (importSync('@ember-data/graph/-private') as typeof import('@ember-data/graph/-private')).graphFor;\n const { identifier } = this;\n if (DEBUG) {\n const relationship = graphFor(this._store).get(identifier, keyName) as CollectionEdge;\n assert(\n `You looked up the ${keyName} hasMany relationship for { type: ${identifier.type}, id: ${\n identifier.id || ''\n }, lid: ${identifier.lid} but no such relationship was found.`,\n relationship\n );\n assert(\n `You looked up the ${keyName} hasMany relationship for { type: ${identifier.type}, id: ${\n identifier.id || ''\n }, lid: ${identifier.lid} but that relationship is a belongsTo.`,\n relationship.definition.kind === 'hasMany'\n );\n }\n\n const value = graphFor(this._store).getData(identifier, keyName) as CollectionRelationship;\n\n if (value.data) {\n results = [];\n value.data.forEach((member) => {\n const inverseIdentifier = store.identifierCache.getOrCreateRecordIdentifier(member);\n const cache = store.cache;\n\n if (!cache.isDeleted(inverseIdentifier)) {\n if (returnModeIsIds) {\n (results as RecordId[]).push(inverseIdentifier.id);\n } else {\n (results as Snapshot[]).push(store._fetchManager.createSnapshot(inverseIdentifier));\n }\n }\n });\n }\n\n // we assign even if `undefined` so that we don't reprocess the relationship\n // on next access. This works with the `keyName in` checks above.\n if (returnModeIsIds) {\n this._hasManyIds[keyName] = results as RecordId[];\n } else {\n this._hasManyRelationships[keyName] = results as Snapshot[];\n }\n\n return results;\n }\n\n /**\n Iterates through all the attributes of the model, calling the passed\n function on each attribute.\n\n Example\n\n ```javascript\n snapshot.eachAttribute(function(name, meta) {\n // ...\n });\n ```\n\n @param {Function} callback the callback to execute\n @param {Object} [binding] the value to which the callback's `this` should be bound\n @public\n */\n eachAttribute(callback: (key: string, meta: LegacyAttributeField) => void, binding?: unknown): void {\n const fields = this._store.schema.fields(this.identifier);\n fields.forEach((field, key) => {\n if (field.kind === 'attribute') {\n callback.call(binding, key, field);\n }\n });\n }\n\n /**\n Iterates through all the relationships of the model, calling the passed\n function on each relationship.\n\n Example\n\n ```javascript\n snapshot.eachRelationship(function(name, relationship) {\n // ...\n });\n ```\n\n @param {Function} callback the callback to execute\n @param {Object} [binding] the value to which the callback's `this` should be bound\n @public\n */\n eachRelationship(callback: (key: string, meta: LegacyRelationshipField) => void, binding?: unknown): void {\n const fields = this._store.schema.fields(this.identifier);\n fields.forEach((field, key) => {\n if (field.kind === 'belongsTo' || field.kind === 'hasMany') {\n callback.call(binding, key, field);\n }\n });\n }\n\n /**\n Serializes the snapshot using the serializer for the model.\n\n Example\n\n ```js [app/adapters/application.js]\n import Adapter from '@ember-data/adapter';\n\n export default Adapter.extend({\n createRecord(store, type, snapshot) {\n let data = snapshot.serialize({ includeId: true });\n let url = `/${type.modelName}`;\n\n return fetch(url, {\n method: 'POST',\n body: data,\n }).then((response) => response.json())\n }\n });\n ```\n\n @param {Object} options\n @return {Object} an object whose values are primitive JSON values only\n @public\n */\n serialize(options?: SerializerOptions): unknown {\n upgradeStore(this._store);\n const serializer = this._store.serializerFor(this.modelName);\n assert(`Cannot serialize record, no serializer found`, serializer);\n return serializer.serialize(this, options);\n }\n}\n","import { warn } from '@ember/debug';\n\nimport { dependencySatisfies, importSync, macroCondition } from '@embroider/macros';\n\nimport { createDeferred } from '@ember-data/request';\nimport type Store from '@ember-data/store';\nimport type {\n FindRecordQuery,\n InstanceCache,\n Request,\n RequestStateService,\n SaveRecordMutation,\n} from '@ember-data/store/-private';\nimport { coerceId } from '@ember-data/store/-private';\nimport type { FindRecordOptions, ModelSchema } from '@ember-data/store/types';\nimport { DEBUG, TESTING } from '@warp-drive/build-config/env';\nimport { assert } from '@warp-drive/build-config/macros';\nimport { getOrSetGlobal } from '@warp-drive/core-types/-private';\nimport type { StableExistingRecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier';\nimport type { TypeFromInstance } from '@warp-drive/core-types/record';\nimport type { ImmutableRequestInfo } from '@warp-drive/core-types/request';\nimport type { CollectionResourceDocument, SingleResourceDocument } from '@warp-drive/core-types/spec/json-api-raw';\n\nimport { upgradeStore } from '../-private';\nimport { assertIdentifierHasId } from './identifier-has-id';\nimport { payloadIsNotBlank } from './legacy-data-utils';\nimport type { AdapterPayload, MinimumAdapterInterface } from './minimum-adapter-interface';\nimport type { MinimumSerializerInterface } from './minimum-serializer-interface';\nimport { normalizeResponseHelper } from './serializer-response';\nimport { Snapshot } from './snapshot';\n\ntype Deferred<T> = ReturnType<typeof createDeferred<T>>;\ntype AdapterErrors = Error & { errors?: string[]; isAdapterError?: true };\ntype SerializerWithParseErrors = MinimumSerializerInterface & {\n extractErrors?(store: Store, modelClass: ModelSchema, error: AdapterErrors, recordId: string | null): unknown;\n};\n\nexport const SaveOp = getOrSetGlobal('SaveOp', Symbol('SaveOp'));\n\nexport type FetchMutationOptions = FindRecordOptions & { [SaveOp]: 'createRecord' | 'deleteRecord' | 'updateRecord' };\n\ninterface PendingFetchItem {\n identifier: StableExistingRecordIdentifier;\n queryRequest: Request;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n resolver: Deferred<any>;\n options: FindRecordOptions;\n trace?: unknown;\n promise: Promise<StableExistingRecordIdentifier>;\n}\n\ninterface PendingSaveItem {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n resolver: Deferred<any>;\n snapshot: Snapshot;\n identifier: StableRecordIdentifier;\n options: FetchMutationOptions;\n queryRequest: Request;\n}\n\nexport class FetchManager {\n declare isDestroyed: boolean;\n declare requestCache: RequestStateService;\n // fetches pending in the runloop, waiting to be coalesced\n declare _pendingFetch: Map<string, Map<StableExistingRecordIdentifier, PendingFetchItem[]>>;\n declare _store: Store;\n\n constructor(store: Store) {\n this._store = store;\n // used to keep track of all the find requests that need to be coalesced\n this._pendingFetch = new Map();\n this.requestCache = store.getRequestStateService();\n this.isDestroyed = false;\n }\n\n createSnapshot<T>(identifier: StableRecordIdentifier<TypeFromInstance<T>>, options?: FindRecordOptions): Snapshot<T>;\n createSnapshot(identifier: StableRecordIdentifier, options?: FindRecordOptions): Snapshot;\n createSnapshot(identifier: StableRecordIdentifier, options: FindRecordOptions = {}): Snapshot {\n return new Snapshot(options, identifier, this._store);\n }\n\n /**\n This method is called by `record.save`, and gets passed a\n resolver for the promise that `record.save` returns.\n\n It schedules saving to happen at the end of the run loop.\n\n @internal\n */\n scheduleSave(\n identifier: StableRecordIdentifier,\n options: FetchMutationOptions\n ): Promise<null | SingleResourceDocument> {\n const resolver = createDeferred<SingleResourceDocument | null>();\n const query: SaveRecordMutation = {\n op: 'saveRecord',\n recordIdentifier: identifier,\n options,\n };\n\n const queryRequest: Request = {\n data: [query],\n };\n\n const snapshot = this.createSnapshot(identifier, options);\n const pendingSaveItem: PendingSaveItem = {\n snapshot: snapshot,\n resolver: resolver,\n identifier,\n options,\n queryRequest,\n };\n\n const monitored = this.requestCache._enqueue(resolver.promise, pendingSaveItem.queryRequest);\n _flushPendingSave(this._store, pendingSaveItem);\n\n return monitored;\n }\n\n scheduleFetch(\n identifier: StableExistingRecordIdentifier,\n options: FindRecordOptions,\n request: ImmutableRequestInfo\n ): Promise<StableExistingRecordIdentifier> {\n const query: FindRecordQuery = {\n op: 'findRecord',\n recordIdentifier: identifier,\n options,\n };\n\n const queryRequest: Request = {\n data: [query],\n };\n\n const pendingFetch = this.getPendingFetch(identifier, options);\n if (pendingFetch) {\n return pendingFetch;\n }\n\n const modelName = identifier.type;\n\n const resolver = createDeferred<SingleResourceDocument>();\n const pendingFetchItem: PendingFetchItem = {\n identifier,\n resolver,\n options,\n queryRequest,\n } as PendingFetchItem;\n\n const resolverPromise = resolver.promise;\n const store = this._store;\n const isInitialLoad = !store._instanceCache.recordIsLoaded(identifier); // we don't use isLoading directly because we are the request\n\n const monitored = this.requestCache._enqueue(resolverPromise, pendingFetchItem.queryRequest);\n let promise = monitored.then(\n (payload) => {\n // ensure that regardless of id returned we assign to the correct record\n if (payload.data && !Array.isArray(payload.data)) {\n payload.data.lid = identifier.lid;\n }\n\n // additional data received in the payload\n // may result in the merging of identifiers (and thus records)\n const potentiallyNewIm = store._push(payload, options.reload);\n if (potentiallyNewIm && !Array.isArray(potentiallyNewIm)) {\n return potentiallyNewIm;\n }\n\n return identifier;\n },\n (error) => {\n assert(`Async Leak Detected: Expected the store to not be destroyed`, !store.isDestroyed);\n const cache = store.cache;\n if (!cache || cache.isEmpty(identifier) || isInitialLoad) {\n let isReleasable = true;\n if (macroCondition(dependencySatisfies('@ember-data/graph', '*'))) {\n if (!cache) {\n const graphFor = (importSync('@ember-data/graph/-private') as typeof import('@ember-data/graph/-private'))\n .graphFor;\n const graph = graphFor(store);\n isReleasable = graph.isReleasable(identifier);\n if (!isReleasable) {\n graph.unload(identifier, true);\n }\n }\n }\n if (cache || isReleasable) {\n store._enableAsyncFlush = true;\n store._instanceCache.unloadRecord(identifier);\n store._enableAsyncFlush = null;\n }\n }\n throw error;\n }\n );\n\n if (this._pendingFetch.size === 0) {\n void new Promise((resolve) => setTimeout(resolve, 0)).then(() => {\n this.flushAllPendingFetches();\n });\n }\n\n const fetchesByType = this._pendingFetch;\n let fetchesById = fetchesByType.get(modelName);\n\n if (!fetchesById) {\n fetchesById = new Map();\n fetchesByType.set(modelName, fetchesById);\n }\n\n let requestsForIdentifier = fetchesById.get(identifier);\n if (!requestsForIdentifier) {\n requestsForIdentifier = [];\n fetchesById.set(identifier, requestsForIdentifier);\n }\n\n requestsForIdentifier.push(pendingFetchItem);\n\n if (TESTING) {\n if (!request.disableTestWaiter) {\n const { waitForPromise } = importSync('@ember/test-waiters') as {\n waitForPromise: <T>(promise: Promise<T>) => Promise<T>;\n };\n promise = waitForPromise(promise);\n }\n }\n\n pendingFetchItem.promise = promise;\n return promise;\n }\n\n getPendingFetch(identifier: StableExistingRecordIdentifier, options: FindRecordOptions) {\n const pendingFetches = this._pendingFetch.get(identifier.type)?.get(identifier);\n\n // We already have a pending fetch for this\n if (pendingFetches) {\n const matchingPendingFetch = pendingFetches.find((fetch) => isSameRequest(options, fetch.options));\n if (matchingPendingFetch) {\n return matchingPendingFetch.promise;\n }\n }\n }\n\n flushAllPendingFetches() {\n if (this.isDestroyed) {\n return;\n }\n\n const store = this._store;\n this._pendingFetch.forEach((fetchItem, type) => _flushPendingFetchForType(store, fetchItem, type));\n this._pendingFetch.clear();\n }\n\n fetchDataIfNeededForIdentifier(\n identifier: StableExistingRecordIdentifier,\n options: FindRecordOptions = {},\n request: ImmutableRequestInfo\n ): Promise<StableExistingRecordIdentifier> {\n // pre-loading will change the isEmpty value\n const isEmpty = _isEmpty(this._store._instanceCache, identifier);\n const isLoading = _isLoading(this._store._instanceCache, identifier);\n\n let promise: Promise<StableExistingRecordIdentifier>;\n if (isEmpty) {\n assertIdentifierHasId(identifier);\n\n if (DEBUG) {\n promise = this.scheduleFetch(identifier, Object.assign({}, options, { reload: true }), request);\n } else {\n options.reload = true;\n promise = this.scheduleFetch(identifier, options, request);\n }\n } else if (isLoading) {\n promise = this.getPendingFetch(identifier, options)!;\n assert(`Expected to find a pending request for a record in the loading state, but found none`, promise);\n } else {\n promise = Promise.resolve(identifier);\n }\n\n return promise;\n }\n\n destroy() {\n this.isDestroyed = true;\n }\n}\n\nfunction _isEmpty(instanceCache: InstanceCache, identifier: StableRecordIdentifier): boolean {\n const cache = instanceCache.cache;\n if (!cache) {\n return true;\n }\n const isNew = cache.isNew(identifier);\n const isDeleted = cache.isDeleted(identifier);\n const isEmpty = cache.isEmpty(identifier);\n\n return (!isNew || isDeleted) && isEmpty;\n}\n\nfunction _isLoading(cache: InstanceCache, identifier: StableRecordIdentifier): boolean {\n const req = cache.store.getRequestStateService();\n // const fulfilled = req.getLastRequestForRecord(identifier);\n const isLoaded = cache.recordIsLoaded(identifier);\n\n return (\n !isLoaded &&\n // fulfilled === null &&\n req.getPendingRequestsForRecord(identifier).some((r) => r.type === 'query')\n );\n}\n\nfunction includesSatisfies(current: undefined | string | string[], existing: undefined | string | string[]): boolean {\n // if we have no includes we are good\n if (!current?.length) {\n return true;\n }\n\n // if we are here we have includes,\n // and if existing has no includes then we will need a new request\n if (!existing?.length) {\n return false;\n }\n\n const arrCurrent = (Array.isArray(current) ? current : current.split(',')).sort();\n const arrExisting = (Array.isArray(existing) ? existing : existing.split(',')).sort();\n\n // includes are identical\n if (arrCurrent.join(',') === arrExisting.join(',')) {\n return true;\n }\n\n // if all of current includes are in existing includes then we are good\n // so if we find one that is not in existing then we need a new request\n for (let i = 0; i < arrCurrent.length; i++) {\n if (!arrExisting.includes(arrCurrent[i])) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction optionsSatisfies(current: object | undefined, existing: object | undefined): boolean {\n return !current || current === existing || Object.keys(current).length === 0;\n}\n\n// this function helps resolve whether we have a pending request that we should use instead\nfunction isSameRequest(options: FindRecordOptions = {}, existingOptions: FindRecordOptions = {}) {\n return (\n optionsSatisfies(options.adapterOptions, existingOptions.adapterOptions) &&\n includesSatisfies(options.include, existingOptions.include)\n );\n}\n\nfunction _findMany(\n store: Store,\n adapter: MinimumAdapterInterface,\n modelName: string,\n snapshots: Snapshot[]\n): Promise<CollectionResourceDocument> {\n const modelClass = store.modelFor(modelName); // `adapter.findMany` gets the modelClass still\n const promise = Promise.resolve().then(() => {\n const ids = snapshots.map((s) => s.id!);\n assert(\n `Cannot fetch a record without an id`,\n ids.every((v) => v !== null)\n );\n // eslint-disable-next-line @typescript-eslint/unbound-method\n assert(`Expected this adapter to implement findMany for coalescing`, adapter.findMany);\n const ret = adapter.findMany(store, modelClass, ids, snapshots);\n assert('adapter.findMany returned undefined, this was very likely a mistake', ret !== undefined);\n return ret;\n });\n upgradeStore(store);\n\n return promise.then((adapterPayload) => {\n assert(\n `You made a 'findMany' request for '${modelName}' records with ids '[${snapshots\n .map((s) => s.id!)\n .join(',')}]', but the adapter's response did not have any data`,\n !!payloadIsNotBlank(adapterPayload)\n );\n const serializer = store.serializerFor(modelName);\n const payload = normalizeResponseHelper(serializer, store, modelClass, adapterPayload, null, 'findMany');\n return payload as CollectionResourceDocument;\n });\n}\n\nfunction rejectFetchedItems(fetchMap: Map<Snapshot, PendingFetchItem>, snapshots: Snapshot[], error?: Error) {\n for (let i = 0, l = snapshots.length; i < l; i++) {\n const snapshot = snapshots[i];\n const pair = fetchMap.get(snapshot);\n\n if (pair) {\n pair.resolver.reject(\n error ||\n new Error(\n `Expected: '<${\n snapshot.modelName\n }:${snapshot.id!}>' to be present in the adapter provided payload, but it was not found.`\n )\n );\n }\n }\n}\n\nfunction handleFoundRecords(\n store: Store,\n fetchMap: Map<Snapshot, PendingFetchItem>,\n snapshots: Snapshot[],\n coalescedPayload: CollectionResourceDocument\n) {\n /*\n It is possible that the same ID is included multiple times\n via multiple snapshots. This happens when more than one\n options hash was supplied, each of which must be uniquely\n accounted for.\n\n However, since we can't map from response to a specific\n options object, we resolve all snapshots by id with\n the first response we see.\n */\n const snapshotsById = new Map<string, Snapshot[]>();\n for (let i = 0; i < snapshots.length; i++) {\n const id = snapshots[i].id!;\n let snapshotGroup = snapshotsById.get(id);\n if (!snapshotGroup) {\n snapshotGroup = [];\n snapshotsById.set(id, snapshotGroup);\n }\n snapshotGroup.push(snapshots[i]);\n }\n\n const included = Array.isArray(coalescedPayload.included) ? coalescedPayload.included : [];\n\n // resolve found records\n const resources = coalescedPayload.data;\n for (let i = 0, l = resources.length; i < l; i++) {\n const resource = resources[i];\n const snapshotGroup = snapshotsById.get(resource.id);\n snapshotsById.delete(resource.id);\n\n if (!snapshotGroup) {\n // TODO consider whether this should be a deprecation/assertion\n included.push(resource);\n } else {\n snapshotGroup.forEach((snapshot) => {\n const pair = fetchMap.get(snapshot)!;\n const resolver = pair.resolver;\n resolver.resolve({ data: resource });\n });\n }\n }\n\n if (included.length > 0) {\n store._push({ data: null, included }, true);\n }\n\n if (snapshotsById.size === 0) {\n return;\n }\n\n // reject missing records\n const rejected: Snapshot[] = [];\n snapshotsById.forEach((snapshotArray) => {\n rejected.push(...snapshotArray);\n });\n warn(\n 'Ember Data expected to find records with the following ids in the adapter response from findMany but they were missing: [ \"' +\n [...snapshotsById.values()].map((r) => r[0].id).join('\", \"') +\n '\" ]',\n {\n id: 'ds.store.missing-records-from-adapter',\n }\n );\n\n rejectFetchedItems(fetchMap, rejected);\n}\n\nfunction _fetchRecord(store: Store, adapter: MinimumAdapterInterface, fetchItem: PendingFetchItem) {\n upgradeStore(store);\n const identifier = fetchItem.identifier;\n const modelName = identifier.type;\n\n assert(`You tried to find a record but you have no adapter (for ${modelName})`, adapter);\n assert(\n `You tried to find a record but your adapter (for ${modelName}) does not implement 'findRecord'`,\n typeof adapter.findRecord === 'function'\n );\n\n const snapshot = store._fetchManager.createSnapshot(identifier, fetchItem.options);\n const klass = store.modelFor(identifier.type);\n const id = identifier.id;\n\n let promise = Promise.resolve().then(() => {\n return adapter.findRecord(store, klass, identifier.id, snapshot);\n });\n\n promise = promise.then((adapterPayload) => {\n assert(`Async Leak Detected: Expected the store to not be destroyed`, !(store.isDestroyed || store.isDestroying));\n assert(\n `You made a 'findRecord' request for a '${modelName}' with id '${id}', but the adapter's response did not have any data`,\n !!payloadIsNotBlank(adapterPayload)\n );\n const serializer = store.serializerFor(modelName);\n const payload = normalizeResponseHelper(serializer, store, klass, adapterPayload, id, 'findRecord');\n assert(\n `Ember Data expected the primary data returned from a 'findRecord' response to be an object but instead it found an array.`,\n !Array.isArray(payload.data)\n );\n assert(\n `The 'findRecord' request for ${modelName}:${id} resolved indicating success but contained no primary data. To indicate a 404 not found you should either reject the promise returned by the adapter's findRecord method or throw a NotFoundError.`,\n 'data' in payload && payload.data !== null && typeof payload.data === 'object'\n );\n\n warn(\n `You requested a record of type '${modelName}' with id '${id}' but the adapter returned a payload with primary data having an id of '${payload.data.id}'. Use 'store.findRecord()' when the requested id is the same as the one returned by the adapter. In other cases use 'store.queryRecord()' instead.`,\n coerceId(payload.data.id) === coerceId(id),\n {\n id: 'ds.store.findRecord.id-mismatch',\n }\n );\n\n return payload;\n }) as Promise<AdapterPayload>;\n\n fetchItem.resolver.resolve(promise);\n}\n\nfunction _processCoalescedGroup(\n store: Store,\n fetchMap: Map<Snapshot, PendingFetchItem>,\n group: Snapshot[],\n adapter: MinimumAdapterInterface,\n modelName: string\n) {\n if (group.length > 1) {\n _findMany(store, adapter, modelName, group)\n .then((payloads: CollectionResourceDocument) => {\n handleFoundRecords(store, fetchMap, group, payloads);\n })\n .catch((error: Error) => {\n rejectFetchedItems(fetchMap, group, error);\n });\n } else if (group.length === 1) {\n _fetchRecord(store, adapter, fetchMap.get(group[0])!);\n } else {\n assert(\"You cannot return an empty array from adapter's method groupRecordsForFindMany\", false);\n }\n}\n\nfunction _flushPendingFetchForType(\n store: Store,\n pendingFetchMap: Map<StableExistingRecordIdentifier, PendingFetchItem[]>,\n modelName: string\n) {\n upgradeStore(store);\n const adapter = store.adapterFor(modelName);\n const shouldCoalesce = !!adapter.findMany && adapter.coalesceFindRequests;\n\n if (shouldCoalesce) {\n const pendingFetchItems: PendingFetchItem[] = [];\n pendingFetchMap.forEach((requestsForIdentifier, identifier) => {\n if (requestsForIdentifier.length > 1) {\n return;\n }\n\n // remove this entry from the map so it's not processed again\n pendingFetchMap.delete(identifier);\n pendingFetchItems.push(requestsForIdentifier[0]);\n });\n\n const totalItems = pendingFetchItems.length;\n\n if (totalItems > 1) {\n const snapshots = new Array<Snapshot>(totalItems);\n const fetchMap = new Map<Snapshot, PendingFetchItem>();\n for (let i = 0; i < totalItems; i++) {\n const fetchItem = pendingFetchItems[i];\n snapshots[i] = store._fetchManager.createSnapshot(fetchItem.identifier, fetchItem.options);\n fetchMap.set(snapshots[i], fetchItem);\n }\n\n let groups: Snapshot[][];\n if (adapter.groupRecordsForFindMany) {\n groups = adapter.groupRecordsForFindMany(store, snapshots);\n } else {\n groups = [snapshots];\n }\n\n for (let i = 0, l = groups.length; i < l; i++) {\n _processCoalescedGroup(store, fetchMap, groups[i], adapter, modelName);\n }\n } else if (totalItems === 1) {\n _fetchRecord(store, adapter, pendingFetchItems[0]);\n }\n }\n\n pendingFetchMap.forEach((pendingFetchItems) => {\n pendingFetchItems.forEach((pendingFetchItem) => {\n _fetchRecord(store, adapter, pendingFetchItem);\n });\n });\n}\n\nfunction _flushPendingSave(store: Store, pending: PendingSaveItem) {\n const { snapshot, resolver, identifier, options } = pending;\n upgradeStore(store);\n const adapter = store.adapterFor(identifier.type);\n const operation = options[SaveOp];\n\n const modelName = snapshot.modelName;\n const modelClass = store.modelFor(modelName);\n\n assert(`You tried to update a record but you have no adapter (for ${modelName})`, adapter);\n assert(\n `You tried to update a record but your adapter (for ${modelName}) does not implement '${operation}'`,\n typeof adapter[operation] === 'function'\n );\n\n let promise: Promise<AdapterPayload> = Promise.resolve().then(() => adapter[operation](store, modelClass, snapshot));\n const serializer: SerializerWithParseErrors | null = store.serializerFor(modelName);\n\n assert(\n `Your adapter's '${operation}' method must return a value, but it returned 'undefined'`,\n promise !== undefined\n );\n\n promise = promise.then((adapterPayload) => {\n if (adapterPayload) {\n return normalizeResponseHelper(serializer, store, modelClass, adapterPayload, snapshot.id, operation);\n }\n }) as Promise<AdapterPayload>;\n\n resolver.resolve(promise);\n}\n","import type Store from '@ember-data/store';\n\nimport type { CompatStore } from '.';\n\n/**\n * Utilities - often temporary - for maintaining backwards compatibility with\n * older parts of EmberData.\n *\n @module\n*/\nexport { SnapshotRecordArray } from './legacy-network-handler/snapshot-record-array';\nexport { SaveOp } from './legacy-network-handler/fetch-manager';\nexport { FetchManager } from './legacy-network-handler/fetch-manager';\nexport { Snapshot } from './legacy-network-handler/snapshot';\n\nexport function upgradeStore(store: Store): asserts store is CompatStore {}\n"],"names":["SnapshotRecordArray","constructor","store","type","options","__store","_snapshots","modelName","adapterOptions","include","_recordArray","peekAll","length","snapshots","upgradeStore","_fetchManager","SOURCE","map","identifier","createSnapshot","assertIdentifierHasId","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","Error","id","iterateData","data","fn","Array","isArray","payloadIsNotBlank","adapterPayload","Object","keys","validateDocumentStructure","doc","errors","push","meta","links","jsonapi","included","join","normalizeResponseHelper","serializer","modelClass","payload","requestType","normalizedResponse","normalizeResponse","Snapshot","_store","__attributes","_belongsToRelationships","create","_belongsToIds","_hasManyRelationships","_hasManyIds","hasRecord","_instanceCache","peek","_attributes","cache","_changedAttributes","changedAttrs","record","peekRecord","lid","attributes","attrs","schema","fields","forEach","field","keyName","kind","getAttr","isNew","attr","changedAttributes","changedAttributeKeys","i","key","slice","belongsTo","returnModeIsId","result","relationshipMeta","get","dependencySatisfies","graphFor","importSync","relationship","definition","value","getData","inverseIdentifier","identifierCache","getOrCreateRecordIdentifier","undefined","isDeleted","hasMany","returnModeIsIds","ids","results","cachedIds","cachedSnapshots","member","eachAttribute","callback","binding","call","eachRelationship","serialize","serializerFor","SaveOp","getOrSetGlobal","Symbol","FetchManager","_pendingFetch","Map","requestCache","getRequestStateService","isDestroyed","scheduleSave","resolver","createDeferred","query","op","recordIdentifier","queryRequest","snapshot","pendingSaveItem","monitored","_enqueue","promise","_flushPendingSave","scheduleFetch","request","pendingFetch","getPendingFetch","pendingFetchItem","resolverPromise","isInitialLoad","recordIsLoaded","then","potentiallyNewIm","_push","reload","error","isEmpty","isReleasable","graph","unload","_enableAsyncFlush","unloadRecord","size","Promise","resolve","setTimeout","flushAllPendingFetches","fetchesByType","fetchesById","set","requestsForIdentifier","TESTING","disableTestWaiter","waitForPromise","pendingFetches","matchingPendingFetch","find","fetch","isSameRequest","fetchItem","_flushPendingFetchForType","clear","fetchDataIfNeededForIdentifier","_isEmpty","isLoading","_isLoading","assign","destroy","instanceCache","req","isLoaded","getPendingRequestsForRecord","some","r","includesSatisfies","current","existing","arrCurrent","split","sort","arrExisting","includes","optionsSatisfies","existingOptions","_findMany","adapter","modelFor","s","every","v","findMany","ret","rejectFetchedItems","fetchMap","l","pair","reject","handleFoundRecords","coalescedPayload","snapshotsById","snapshotGroup","resources","resource","delete","rejected","snapshotArray","warn","values","_fetchRecord","findRecord","klass","isDestroying","coerceId","_processCoalescedGroup","group","payloads","catch","pendingFetchMap","adapterFor","shouldCoalesce","coalesceFindRequests","pendingFetchItems","totalItems","groups","groupRecordsForFindMany","pending","operation"],"mappings":";;;;;;AAQA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACO,MAAMA,mBAAmB,CAAC;AAS/B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAEEC,WAAWA,CAACC,KAAY,EAAEC,IAAY,EAAEC,OAAuB,GAAG,EAAE,EAAE;IACpE,IAAI,CAACC,OAAO,GAAGH,KAAK;AACpB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACI,UAAU,GAAG,IAAI;;AAEtB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,SAAS,GAAGJ,IAAI;;AAErB;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKI,IAAA,IAAI,CAACK,cAAc,GAAGJ,OAAO,CAACI,cAAc;;AAE5C;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMI,IAAA,IAAI,CAACC,OAAO,GAAGL,OAAO,CAACK,OAAO;AAChC;;AAEA;AACF;AACA;AACA;AACA;AACA;EAEE,IAAIC,YAAYA,GAAc;IAC5B,OAAO,IAAI,CAACL,OAAO,CAACM,OAAO,CAAC,IAAI,CAACJ,SAAS,CAAC;AAC7C;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAKE,IAAIK,MAAMA,GAAW;AACnB,IAAA,OAAO,IAAI,CAACF,YAAY,CAACE,MAAM;AACjC;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAMEC,EAAAA,SAASA,GAAG;AACV,IAAA,IAAI,IAAI,CAACP,UAAU,KAAK,IAAI,EAAE;MAC5B,OAAO,IAAI,CAACA,UAAU;AACxB;AACAQ,IAAAA,YAAY,CAAC,IAAI,CAACT,OAAO,CAAC;IAE1B,MAAM;AAAEU,MAAAA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
|
-
export { F as FetchManager, S as SaveOp, c as Snapshot, b as SnapshotRecordArray, u as upgradeStore } from "./-private-
|
|
1
|
+
export { F as FetchManager, S as SaveOp, c as Snapshot, b as SnapshotRecordArray, u as upgradeStore } from "./-private-CVvkihLY.js";
|
package/dist/builders.js
CHANGED
|
@@ -24,10 +24,6 @@ function normalizeModelName(type) {
|
|
|
24
24
|
return type;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
28
|
-
* @module @ember-data/legacy-compat/builders
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
27
|
/**
|
|
32
28
|
This function builds a request config to perform a `findAll` request for the given type.
|
|
33
29
|
When passed to `store.request`, this config will result in the same behavior as a `store.findAll` request.
|
|
@@ -37,11 +33,8 @@ function normalizeModelName(type) {
|
|
|
37
33
|
This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
|
|
38
34
|
To that end, these builders are deprecated and will be removed in a future version of Ember Data.
|
|
39
35
|
|
|
40
|
-
@method findAll
|
|
41
36
|
@deprecated
|
|
42
37
|
@public
|
|
43
|
-
@static
|
|
44
|
-
@for @ember-data/legacy-compat/builders
|
|
45
38
|
@param {String} type the name of the resource
|
|
46
39
|
@param {Object} query a query to be used by the adapter
|
|
47
40
|
@param {FindAllBuilderOptions} [options] optional, may include `adapterOptions` hash which will be passed to adapter.findAll
|
|
@@ -70,10 +63,6 @@ function findAllBuilder(type, options = {}) {
|
|
|
70
63
|
};
|
|
71
64
|
}
|
|
72
65
|
|
|
73
|
-
/**
|
|
74
|
-
* @module @ember-data/legacy-compat/builders
|
|
75
|
-
*/
|
|
76
|
-
|
|
77
66
|
/**
|
|
78
67
|
This function builds a request config to find the record for a given identifier or type and id combination.
|
|
79
68
|
When passed to `store.request`, this config will result in the same behavior as a `store.findRecord` request.
|
|
@@ -101,11 +90,8 @@ function findAllBuilder(type, options = {}) {
|
|
|
101
90
|
This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
|
|
102
91
|
To that end, these builders are deprecated and will be removed in a future version of Ember Data.
|
|
103
92
|
|
|
104
|
-
@method findRecord
|
|
105
93
|
@deprecated
|
|
106
94
|
@public
|
|
107
|
-
@static
|
|
108
|
-
@for @ember-data/legacy-compat/builders
|
|
109
95
|
@param {string|object} resource - either a string representing the name of the resource or a ResourceIdentifier object containing both the type (a string) and the id (a string) for the record or an lid (a string) of an existing record
|
|
110
96
|
@param {string|number|object} id - optional object with options for the request only if the first param is a ResourceIdentifier, else the string id of the record to be retrieved
|
|
111
97
|
@param {FindRecordBuilderOptions} [options] - if the first param is a string this will be the optional options for the request. See examples for available options.
|
|
@@ -147,10 +133,6 @@ function findRecordBuilder(resource, idOrOptions, options) {
|
|
|
147
133
|
};
|
|
148
134
|
}
|
|
149
135
|
|
|
150
|
-
/**
|
|
151
|
-
* @module @ember-data/legacy-compat/builders
|
|
152
|
-
*/
|
|
153
|
-
|
|
154
136
|
/**
|
|
155
137
|
This function builds a request config for a given type and query object.
|
|
156
138
|
When passed to `store.request`, this config will result in the same behavior as a `store.query` request.
|
|
@@ -160,11 +142,8 @@ function findRecordBuilder(resource, idOrOptions, options) {
|
|
|
160
142
|
This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
|
|
161
143
|
To that end, these builders are deprecated and will be removed in a future version of Ember Data.
|
|
162
144
|
|
|
163
|
-
@method query
|
|
164
145
|
@deprecated
|
|
165
146
|
@public
|
|
166
|
-
@static
|
|
167
|
-
@for @ember-data/legacy-compat/builders
|
|
168
147
|
@param {String} type the name of the resource
|
|
169
148
|
@param {Object} query a query to be used by the adapter
|
|
170
149
|
@param {QueryBuilderOptions} [options] optional, may include `adapterOptions` hash which will be passed to adapter.query
|
|
@@ -208,11 +187,8 @@ function queryBuilder(type, query, options = {}) {
|
|
|
208
187
|
This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
|
|
209
188
|
To that end, these builders are deprecated and will be removed in a future version of Ember Data.
|
|
210
189
|
|
|
211
|
-
@method queryRecord
|
|
212
190
|
@deprecated
|
|
213
191
|
@public
|
|
214
|
-
@static
|
|
215
|
-
@for @ember-data/legacy-compat/builders
|
|
216
192
|
@param {String} type the name of the resource
|
|
217
193
|
@param {Object} query a query to be used by the adapter
|
|
218
194
|
@param {QueryBuilderOptions} [options] optional, may include `adapterOptions` hash which will be passed to adapter.query
|
|
@@ -247,10 +223,6 @@ function queryRecordBuilder(type, query, options) {
|
|
|
247
223
|
}
|
|
248
224
|
};
|
|
249
225
|
}
|
|
250
|
-
|
|
251
|
-
/**
|
|
252
|
-
* @module @ember-data/legacy-compat/builders
|
|
253
|
-
*/
|
|
254
226
|
function _resourceIsFullDeleted(identifier, cache) {
|
|
255
227
|
return cache.isDeletionCommitted(identifier) || cache.isNew(identifier) && cache.isDeleted(identifier);
|
|
256
228
|
}
|
|
@@ -268,11 +240,8 @@ function resourceIsFullyDeleted(instanceCache, identifier) {
|
|
|
268
240
|
This is useful for quickly upgrading an entire app to a unified syntax while a longer incremental migration is made to shift off of adapters and serializers.
|
|
269
241
|
To that end, these builders are deprecated and will be removed in a future version of Ember Data.
|
|
270
242
|
|
|
271
|
-
@method saveRecord
|
|
272
243
|
@deprecated
|
|
273
244
|
@public
|
|
274
|
-
@static
|
|
275
|
-
@for @ember-data/legacy-compat/builders
|
|
276
245
|
@param {Object} record a record to save
|
|
277
246
|
@param {SaveRecordBuilderOptions} options optional, may include `adapterOptions` hash which will be passed to adapter.saveRecord
|
|
278
247
|
@return {SaveRecordRequestInput} request config
|