@warp-drive/legacy 5.8.0-alpha.40 → 5.8.0-alpha.42

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 (116) hide show
  1. package/declarations/adapter/error.d.ts +2 -2
  2. package/declarations/adapter/rest.d.ts +21 -104
  3. package/declarations/adapter.d.ts +2 -2
  4. package/declarations/index.d.ts +32 -0
  5. package/declarations/model/-private/model.d.ts +10 -51
  6. package/declarations/model/-private/promise-many-array.d.ts +0 -18
  7. package/declarations/model/-private/references/belongs-to.d.ts +14 -24
  8. package/declarations/model/-private/references/has-many.d.ts +11 -13
  9. package/declarations/serializer/json-api.d.ts +4 -3
  10. package/declarations/serializer/json.d.ts +2 -2
  11. package/dist/{-private-B1pSSN52.js → -private-BG3bMiKp.js} +2 -1
  12. package/dist/adapter/-private.js +1 -1
  13. package/dist/adapter/error.js +2 -2
  14. package/dist/adapter/json-api.js +1 -1
  15. package/dist/adapter/rest.js +33 -117
  16. package/dist/adapter.js +2 -2
  17. package/dist/compat/-private.js +1 -1
  18. package/dist/compat.js +4 -3
  19. package/dist/{errors-CIGPcDvd.js → errors-Cz5KrzBk.js} +29 -58
  20. package/dist/{hooks-QqRnX108.js → hooks-D6diaM34.js} +1 -1
  21. package/dist/index.js +3 -3
  22. package/dist/{json-BNrV8EYG.js → json-ChdEfB0X.js} +6 -19
  23. package/dist/model/-private.js +1 -1
  24. package/dist/model/migration-support.js +7 -5
  25. package/dist/model.js +3 -3
  26. package/dist/{schema-provider-g5MfTj8n.js → schema-provider-DJCV_6AF.js} +34 -77
  27. package/dist/{serialize-into-hash-BnYvPex3.js → serialize-into-hash-DPZYoF-i.js} +1 -1
  28. package/dist/serializer/json-api.js +2 -2
  29. package/dist/serializer/json.js +1 -1
  30. package/dist/serializer/rest.js +1 -1
  31. package/dist/store.js +2 -1
  32. package/dist/unpkg/{dev-deprecated/-private-DbaSCSym.js → dev/-private-DtjBbEgy.js} +2 -1
  33. package/dist/unpkg/dev/adapter/-private.js +1 -1
  34. package/dist/unpkg/dev/adapter/error.js +2 -2
  35. package/dist/unpkg/dev/adapter/json-api.js +1 -1
  36. package/dist/unpkg/dev/adapter/rest.js +33 -117
  37. package/dist/unpkg/dev/adapter.js +2 -2
  38. package/dist/unpkg/dev/compat/-private.js +1 -1
  39. package/dist/unpkg/dev/compat.js +4 -3
  40. package/dist/unpkg/dev/{errors-DD96TBEs.js → errors-DmGGJr3T.js} +29 -58
  41. package/dist/unpkg/dev/{hooks-CqWjNWeL.js → hooks-CkYiE6Ud.js} +1 -1
  42. package/dist/unpkg/dev/index.js +3 -3
  43. package/dist/unpkg/{dev-deprecated/json-CCU-ZQ4b.js → dev/json-Cu1LNgmQ.js} +6 -19
  44. package/dist/unpkg/dev/model/-private.js +1 -1
  45. package/dist/unpkg/dev/model/migration-support.js +7 -5
  46. package/dist/unpkg/dev/model.js +3 -3
  47. package/dist/unpkg/dev/{schema-provider-B8jiJOYC.js → schema-provider-DDVYxmUV.js} +34 -77
  48. package/dist/unpkg/dev/{serialize-into-hash-CPAZXrQU.js → serialize-into-hash-B2xDbuo5.js} +1 -1
  49. package/dist/unpkg/dev/serializer/json-api.js +6 -5
  50. package/dist/unpkg/dev/serializer/json.js +1 -1
  51. package/dist/unpkg/dev/serializer/rest.js +1 -1
  52. package/dist/unpkg/dev/store.js +2 -1
  53. package/dist/unpkg/{dev/-private-DbaSCSym.js → dev-deprecated/-private-DtjBbEgy.js} +2 -1
  54. package/dist/unpkg/dev-deprecated/adapter/-private.js +1 -1
  55. package/dist/unpkg/dev-deprecated/adapter/error.js +2 -2
  56. package/dist/unpkg/dev-deprecated/adapter/json-api.js +1 -1
  57. package/dist/unpkg/dev-deprecated/adapter/rest.js +33 -117
  58. package/dist/unpkg/dev-deprecated/adapter.js +2 -2
  59. package/dist/unpkg/dev-deprecated/compat/-private.js +1 -1
  60. package/dist/unpkg/dev-deprecated/compat.js +4 -3
  61. package/dist/unpkg/dev-deprecated/{errors-DEnabIZj.js → errors-Spt6ubMd.js} +29 -58
  62. package/dist/unpkg/dev-deprecated/{hooks-CAll-Ets.js → hooks-DOXegvhL.js} +1 -1
  63. package/dist/unpkg/dev-deprecated/index.js +3 -3
  64. package/dist/unpkg/{dev/json-CCU-ZQ4b.js → dev-deprecated/json-Cu1LNgmQ.js} +6 -19
  65. package/dist/unpkg/dev-deprecated/model/-private.js +1 -1
  66. package/dist/unpkg/dev-deprecated/model/migration-support.js +7 -5
  67. package/dist/unpkg/dev-deprecated/model.js +3 -3
  68. package/dist/unpkg/dev-deprecated/{schema-provider-k2qXQTBg.js → schema-provider-BP6_8N-V.js} +34 -77
  69. package/dist/unpkg/dev-deprecated/{serialize-into-hash-CPAZXrQU.js → serialize-into-hash-B2xDbuo5.js} +1 -1
  70. package/dist/unpkg/dev-deprecated/serializer/json-api.js +6 -5
  71. package/dist/unpkg/dev-deprecated/serializer/json.js +1 -1
  72. package/dist/unpkg/dev-deprecated/serializer/rest.js +1 -1
  73. package/dist/unpkg/dev-deprecated/store.js +2 -1
  74. package/dist/unpkg/{prod-deprecated/-private-Cvf_97EG.js → prod/-private-BdyZaGEh.js} +1 -0
  75. package/dist/unpkg/prod/adapter/-private.js +1 -1
  76. package/dist/unpkg/prod/adapter/error.js +2 -2
  77. package/dist/unpkg/prod/adapter/json-api.js +1 -1
  78. package/dist/unpkg/prod/adapter/rest.js +33 -117
  79. package/dist/unpkg/prod/adapter.js +2 -2
  80. package/dist/unpkg/prod/compat/-private.js +1 -1
  81. package/dist/unpkg/prod/compat.js +2 -1
  82. package/dist/unpkg/prod/{errors-CXnfnBfQ.js → errors-BGVFCBmi.js} +29 -58
  83. package/dist/unpkg/prod/{hooks-DvyWhLNg.js → hooks-BztVA_x0.js} +1 -1
  84. package/dist/unpkg/prod/index.js +3 -3
  85. package/dist/unpkg/prod/{json-BYrUP8ao.js → json-BWrZ5546.js} +6 -19
  86. package/dist/unpkg/prod/model/-private.js +1 -1
  87. package/dist/unpkg/prod/model/migration-support.js +7 -5
  88. package/dist/unpkg/prod/model.js +3 -3
  89. package/dist/unpkg/prod/{schema-provider-CHujJvA9.js → schema-provider-DJtD_8jZ.js} +34 -77
  90. package/dist/unpkg/{prod-deprecated/serialize-into-hash-DYU2egXl.js → prod/serialize-into-hash-DGlzQteF.js} +1 -1
  91. package/dist/unpkg/prod/serializer/json-api.js +6 -5
  92. package/dist/unpkg/prod/serializer/json.js +1 -1
  93. package/dist/unpkg/prod/serializer/rest.js +1 -1
  94. package/dist/unpkg/prod/store.js +2 -1
  95. package/dist/unpkg/{prod/-private-Cvf_97EG.js → prod-deprecated/-private-BdyZaGEh.js} +1 -0
  96. package/dist/unpkg/prod-deprecated/adapter/-private.js +1 -1
  97. package/dist/unpkg/prod-deprecated/adapter/error.js +2 -2
  98. package/dist/unpkg/prod-deprecated/adapter/json-api.js +1 -1
  99. package/dist/unpkg/prod-deprecated/adapter/rest.js +33 -117
  100. package/dist/unpkg/prod-deprecated/adapter.js +2 -2
  101. package/dist/unpkg/prod-deprecated/compat/-private.js +1 -1
  102. package/dist/unpkg/prod-deprecated/compat.js +2 -1
  103. package/dist/unpkg/prod-deprecated/{errors-CG1SPYVg.js → errors-CdDaK81x.js} +29 -58
  104. package/dist/unpkg/prod-deprecated/{hooks-BIUBiNGR.js → hooks-yId87yyG.js} +1 -1
  105. package/dist/unpkg/prod-deprecated/index.js +3 -3
  106. package/dist/unpkg/prod-deprecated/{json-BYrUP8ao.js → json-BWrZ5546.js} +6 -19
  107. package/dist/unpkg/prod-deprecated/model/-private.js +1 -1
  108. package/dist/unpkg/prod-deprecated/model/migration-support.js +7 -5
  109. package/dist/unpkg/prod-deprecated/model.js +3 -3
  110. package/dist/unpkg/prod-deprecated/{schema-provider-BJ4TWnZf.js → schema-provider-CjX55uSY.js} +34 -77
  111. package/dist/unpkg/{prod/serialize-into-hash-DYU2egXl.js → prod-deprecated/serialize-into-hash-DGlzQteF.js} +1 -1
  112. package/dist/unpkg/prod-deprecated/serializer/json-api.js +6 -5
  113. package/dist/unpkg/prod-deprecated/serializer/json.js +1 -1
  114. package/dist/unpkg/prod-deprecated/serializer/rest.js +1 -1
  115. package/dist/unpkg/prod-deprecated/store.js +2 -1
  116. package/package.json +6 -6
@@ -1,8 +1,9 @@
1
1
  import { Context } from '@warp-drive/core/reactive/-private';
2
- import { memoized, defineSignal, assertPrivateStore, defineNonEnumerableSignal, isResourceKey, recordIdentifierFor, isPrivateStore, storeFor, fastPush, createLegacyManyArray, notifyInternalSignal } from '@warp-drive/core/store/-private';
2
+ import { memoized, defineSignal, defineNonEnumerableSignal, notifyInternalSignal } from '@warp-drive/core/signals/-leaked';
3
+ import { assertPrivateStore, isResourceKey, recordIdentifierFor, isPrivateStore, storeFor, fastPush, createLegacyManyArray } from '@warp-drive/core/store/-private';
3
4
  import { getOrSetGlobal } from '@warp-drive/core/types/-private';
4
5
  import { EnableHydration } from '@warp-drive/core/types/request';
5
- import { u as upgradeStore } from "./-private-DbaSCSym.js";
6
+ import { u as upgradeStore } from "./-private-DtjBbEgy.js";
6
7
  import { computed, get } from '@ember/object';
7
8
  import PromiseProxyMixin from '@ember/object/promise-proxy-mixin';
8
9
  import ObjectProxy from '@ember/object/proxy';
@@ -86,7 +87,6 @@ PromiseBelongsTo.prototype[LegacyPromiseProxy] = true;
86
87
  const comments = await post.comments;
87
88
  ```
88
89
 
89
- @class PromiseManyArray
90
90
  @public
91
91
  */
92
92
  class PromiseManyArray {
@@ -98,7 +98,6 @@ class PromiseManyArray {
98
98
 
99
99
  /**
100
100
  * Retrieve the length of the content
101
- * @property length
102
101
  * @public
103
102
  */
104
103
  get length() {
@@ -144,8 +143,6 @@ class PromiseManyArray {
144
143
  /**
145
144
  * Reload the relationship
146
145
  * @public
147
- * @param options
148
- * @return
149
146
  */
150
147
  reload(options) {
151
148
  (test => {
@@ -162,32 +159,24 @@ class PromiseManyArray {
162
159
  /**
163
160
  * Whether the loading promise is still pending
164
161
  *
165
- * @property isPending
166
- * @type {Boolean}
167
162
  * @public
168
163
  */
169
164
 
170
165
  /**
171
166
  * Whether the loading promise rejected
172
167
  *
173
- * @property isRejected
174
- * @type {Boolean}
175
168
  * @public
176
169
  */
177
170
 
178
171
  /**
179
172
  * Whether the loading promise succeeded
180
173
  *
181
- * @property isFulfilled
182
- * @type {Boolean}
183
174
  * @public
184
175
  */
185
176
 
186
177
  /**
187
178
  * Whether the loading promise completed (resolved or rejected)
188
179
  *
189
- * @property isSettled
190
- * @type {Boolean}
191
180
  * @public
192
181
  */
193
182
 
@@ -203,8 +192,6 @@ class PromiseManyArray {
203
192
  /**
204
193
  * catch errors thrown by this promise
205
194
  * @public
206
- * @param callback
207
- * @return {Promise}
208
195
  */
209
196
  catch(cb) {
210
197
  return this.promise.catch(cb);
@@ -214,8 +201,6 @@ class PromiseManyArray {
214
201
  * run cleanup after this promise completes
215
202
  *
216
203
  * @public
217
- * @param callback
218
- * @return {Promise}
219
204
  */
220
205
  finally(cb) {
221
206
  return this.promise.finally(cb);
@@ -233,7 +218,6 @@ class PromiseManyArray {
233
218
 
234
219
  /**
235
220
  * Retrieve the links for this relationship
236
- * @property links
237
221
  * @public
238
222
  */
239
223
  get links() {
@@ -242,7 +226,6 @@ class PromiseManyArray {
242
226
 
243
227
  /**
244
228
  * Retrieve the meta for this relationship
245
- * @property meta
246
229
  * @public
247
230
  */
248
231
  static {
@@ -490,7 +473,7 @@ class HasManyReference {
490
473
  }
491
474
  ```
492
475
  @public
493
- @return {String} The name of the remote type. This should either be `link` or `ids`
476
+ @return The name of the remote type. This should either be `link` or `ids`
494
477
  */
495
478
  remoteType() {
496
479
  const value = this._resource();
@@ -525,14 +508,14 @@ class HasManyReference {
525
508
  commentsRef.ids(); // ['1']
526
509
  ```
527
510
  @public
528
- @return {Array} The ids in this has-many relationship
511
+ @return The ids in this has-many relationship
529
512
  */
530
513
  ids() {
531
514
  return this.identifiers.map(identifier => identifier.id);
532
515
  }
533
516
 
534
517
  /**
535
- The link Ember Data will use to fetch or reload this belongs-to
518
+ The link WarpDrive will use to fetch or reload this belongs-to
536
519
  relationship. By default it uses only the "related" resource linkage.
537
520
  Example
538
521
  ```javascript
@@ -561,7 +544,7 @@ class HasManyReference {
561
544
  }
562
545
  ```
563
546
  @public
564
- @return {String} The link Ember Data will use to fetch or reload this belongs-to relationship.
547
+ @return The link WarpDrive will use to fetch or reload this belongs-to relationship.
565
548
  */
566
549
  link() {
567
550
  const resource = this._resource();
@@ -616,7 +599,7 @@ class HasManyReference {
616
599
  usersRef.meta() // { lastUpdated: 1458014400000 }
617
600
  ```
618
601
  @public
619
- @return {Object|null} The meta information for the belongs-to relationship.
602
+ @return The meta information for the belongs-to relationship.
620
603
  */
621
604
  meta() {
622
605
  let meta = null;
@@ -702,9 +685,8 @@ class HasManyReference {
702
685
  particularly useful if you want to update the state of the relationship without
703
686
  forcing the load of all of the associated records.
704
687
  @public
705
- @param {Array|Object} doc a JSONAPI document object describing the new value of this relationship.
706
- @param {Boolean} [skipFetch] if `true`, do not attempt to fetch unloaded records
707
- @return {Promise<ManyArray | void>}
688
+ @param doc a JSONAPI document object describing the new value of this relationship.
689
+ @param skipFetch [optional] if `true`, do not attempt to fetch unloaded records
708
690
  */
709
691
  async push(doc, skipFetch) {
710
692
  const {
@@ -796,7 +778,6 @@ class HasManyReference {
796
778
  })
797
779
  ```
798
780
  @public
799
- @return {ManyArray}
800
781
  */
801
782
  value() {
802
783
  const support = LEGACY_SUPPORT.get(this.___identifier);
@@ -856,8 +837,8 @@ class HasManyReference {
856
837
  });
857
838
  ```
858
839
  @public
859
- @param {Object} options the options to pass in.
860
- @return {Promise} a promise that resolves with the ManyArray in
840
+ @param options the options to pass in.
841
+ @return a promise that resolves with the ManyArray in
861
842
  this has-many relationship.
862
843
  */
863
844
  async load(options) {
@@ -904,9 +885,9 @@ class HasManyReference {
904
885
  ```javascript
905
886
  commentsRef.reload({ adapterOptions: { isPrivate: true } })
906
887
  ```
907
- @public
908
- @param {Object} options the options to pass in.
909
- @return {Promise} a promise that resolves with the ManyArray in this has-many relationship.
888
+ @public
889
+ @param options the options to pass in.
890
+ @return a promise that resolves with the ManyArray in this has-many relationship.
910
891
  */
911
892
  reload(options) {
912
893
  const support = LEGACY_SUPPORT.get(this.___identifier);
@@ -967,24 +948,17 @@ function isResourceIdentiferWithRelatedLinks(value) {
967
948
  References are "stable", meaning that multiple calls to retrieve the reference
968
949
  for a given relationship will always return the same HasManyReference.
969
950
 
970
- @class BelongsToReference
971
951
  @public
972
952
  */
973
953
  class BelongsToReference {
974
954
  /**
975
955
  * The field name on the parent record for this has-many relationship.
976
956
  *
977
- * @property key
978
- * @type {String}
979
- * @public
980
957
  */
981
958
 
982
959
  /**
983
960
  * The type of resource this relationship will contain.
984
961
  *
985
- * @property type
986
- * @type {String}
987
- * @public
988
962
  */
989
963
 
990
964
  // unsubscribe tokens given to us by the notification manager
@@ -1020,9 +994,6 @@ class BelongsToReference {
1020
994
  * The identifier of the record that this reference refers to.
1021
995
  * `null` if no related record is known.
1022
996
  *
1023
- * @property identifier
1024
- * @type {ResourceKey | null}
1025
- * @public
1026
997
  */
1027
998
  get identifier() {
1028
999
  if (this.___relatedToken) {
@@ -1073,7 +1044,7 @@ class BelongsToReference {
1073
1044
  }
1074
1045
  ```
1075
1046
  @public
1076
- @return {String} The id of the record in this belongsTo relationship.
1047
+ @return The id of the record in this belongsTo relationship.
1077
1048
  */
1078
1049
  static {
1079
1050
  decorateMethodV2(this.prototype, "identifier", [memoized]);
@@ -1083,7 +1054,7 @@ class BelongsToReference {
1083
1054
  }
1084
1055
 
1085
1056
  /**
1086
- The link Ember Data will use to fetch or reload this belongs-to
1057
+ The link WarpDrive will use to fetch or reload this belongs-to
1087
1058
  relationship. By default it uses only the "related" resource linkage.
1088
1059
  Example
1089
1060
  ```javascript
@@ -1112,7 +1083,7 @@ class BelongsToReference {
1112
1083
  }
1113
1084
  ```
1114
1085
  @public
1115
- @return {String} The link Ember Data will use to fetch or reload this belongs-to relationship.
1086
+ @return The link WarpDrive will use to fetch or reload this belongs-to relationship.
1116
1087
  */
1117
1088
  link() {
1118
1089
  const resource = this._resource();
@@ -1167,7 +1138,7 @@ class BelongsToReference {
1167
1138
  userRef.meta() // { lastUpdated: 1458014400000 }
1168
1139
  ```
1169
1140
  @public
1170
- @return {Object} The meta information for the belongs-to relationship.
1141
+ @return The meta information for the belongs-to relationship.
1171
1142
  */
1172
1143
  meta() {
1173
1144
  let meta = null;
@@ -1216,7 +1187,7 @@ class BelongsToReference {
1216
1187
  }
1217
1188
  ```
1218
1189
  @public
1219
- @return {String} The name of the remote type. This should either be `link` or `id`
1190
+ @return The name of the remote type. This should either be `link` or `id`
1220
1191
  */
1221
1192
  remoteType() {
1222
1193
  const value = this._resource();
@@ -1299,9 +1270,9 @@ class BelongsToReference {
1299
1270
  particularly useful if you want to update the state of the relationship without
1300
1271
  forcing the load of all of the associated record.
1301
1272
  @public
1302
- @param {Object} doc a JSONAPI document object describing the new value of this relationship.
1303
- @param {Boolean} [skipFetch] if `true`, do not attempt to fetch unloaded records
1304
- @return {Promise<OpaqueRecordInstance | null | void>}
1273
+ @param doc a JSONAPI document object describing the new value of this relationship.
1274
+ @param skipFetch [optional] if `true`, do not attempt to fetch unloaded records
1275
+ @return a promise that resolves with the record in this belongs-to relationship after the push has completed.
1305
1276
  */
1306
1277
  async push(doc, skipFetch) {
1307
1278
  const {
@@ -1381,7 +1352,7 @@ class BelongsToReference {
1381
1352
  });
1382
1353
  ```
1383
1354
  @public
1384
- @return {Model} the record in this relationship
1355
+ @return the record in this relationship
1385
1356
  */
1386
1357
  value() {
1387
1358
  const resource = this._resource();
@@ -1435,8 +1406,8 @@ class BelongsToReference {
1435
1406
  });
1436
1407
  ```
1437
1408
  @public
1438
- @param {Object} options the options to pass in.
1439
- @return {Promise} a promise that resolves with the record in this belongs-to relationship.
1409
+ @param options the options to pass in.
1410
+ @return a promise that resolves with the record in this belongs-to relationship.
1440
1411
  */
1441
1412
  async load(options) {
1442
1413
  const support = LEGACY_SUPPORT.get(this.___identifier);
@@ -1449,7 +1420,7 @@ class BelongsToReference {
1449
1420
 
1450
1421
  /**
1451
1422
  Triggers a reload of the value in this relationship. If the
1452
- remoteType is `"link"` Ember Data will use the relationship link to
1423
+ remoteType is `"link"` WarpDrive will use the relationship link to
1453
1424
  reload the relationship. Otherwise it will reload the record by its
1454
1425
  id.
1455
1426
  Example
@@ -1484,8 +1455,8 @@ class BelongsToReference {
1484
1455
  userRef.reload({ adapterOptions: { isPrivate: true } })
1485
1456
  ```
1486
1457
  @public
1487
- @param {Object} options the options to pass in.
1488
- @return {Promise} a promise that resolves with the record in this belongs-to relationship after the reload has completed.
1458
+ @param options the options to pass in.
1459
+ @return a promise that resolves with the record in this belongs-to relationship after the reload has completed.
1489
1460
  */
1490
1461
  reload(options) {
1491
1462
  const support = LEGACY_SUPPORT.get(this.___identifier);
@@ -1,6 +1,6 @@
1
1
  import { setOwner, getOwner } from '@ember/application';
2
2
  import { assertPrivateStore, setRecordIdentifier, StoreMap } from '@warp-drive/core/store/-private';
3
- import { g as getModelFactory } from "./schema-provider-B8jiJOYC.js";
3
+ import { g as getModelFactory } from "./schema-provider-DDVYxmUV.js";
4
4
  import { n as normalizeModelName } from "./util-DvanW33H.js";
5
5
  function instantiateRecord(identifier, createRecordArgs) {
6
6
  const type = identifier.type;
@@ -7,9 +7,9 @@ import '@ember/object';
7
7
  import '@warp-drive/core/types/symbols';
8
8
  import '@warp-drive/utilities/string';
9
9
  import '@warp-drive/core/store/-private';
10
- import "./errors-DD96TBEs.js";
11
- import "./schema-provider-B8jiJOYC.js";
12
- import { i as instantiateRecord, t as teardownRecord, m as modelFor } from "./hooks-CqWjNWeL.js";
10
+ import "./errors-DmGGJr3T.js";
11
+ import "./schema-provider-DDVYxmUV.js";
12
+ import { i as instantiateRecord, t as teardownRecord, m as modelFor } from "./hooks-CkYiE6Ud.js";
13
13
  import '@ember/application';
14
14
  import { registerDerivations as registerDerivations$1, DelegatingSchemaService } from './model/migration-support.js';
15
15
  import { F as FragmentExtension, a as FragmentArrayExtension, f as fragmentsModelFor } from "./model-for-CqXsIKws.js";
@@ -63,8 +63,8 @@ const PRIMARY_ATTRIBUTE_KEY = 'base';
63
63
  }
64
64
  ```
65
65
 
66
- `JSONSerializer` will normalize the JSON payload to the JSON API format that the
67
- Ember Data store expects.
66
+ `JSONSerializer` will normalize the JSON payload to the {json:api} format that the
67
+ JSONAPICache uses to cache data in the Store.
68
68
 
69
69
  You can customize how JSONSerializer processes its payload by passing options in
70
70
  the `attrs` hash or by subclassing the `JSONSerializer` and overriding hooks:
@@ -99,7 +99,7 @@ const PRIMARY_ATTRIBUTE_KEY = 'base';
99
99
  const JSONSerializer = Serializer.extend({
100
100
  /**
101
101
  The `primaryKey` is used when serializing and deserializing
102
- data. Ember Data always uses the `id` property to store the id of
102
+ data. WarpDrive always uses the `id` property to store the id of
103
103
  the record. The external source may not always follow this
104
104
  convention. In these cases it is useful to override the
105
105
  `primaryKey` property to match the `primaryKey` of your external
@@ -111,9 +111,7 @@ const JSONSerializer = Serializer.extend({
111
111
  primaryKey = '_id'
112
112
  }
113
113
  ```
114
- @property primaryKey
115
- @type {String}
116
- @public
114
+ @public
117
115
  @default 'id'
118
116
  */
119
117
  primaryKey: 'id',
@@ -451,9 +449,6 @@ const JSONSerializer = Serializer.extend({
451
449
  }
452
450
  ```
453
451
  @public
454
- @param {Model} typeClass
455
- @param {Object} hash
456
- @return {Object}
457
452
  */
458
453
  normalize(modelClass, resourceHash) {
459
454
  let data = null;
@@ -499,9 +494,6 @@ const JSONSerializer = Serializer.extend({
499
494
  Returns the resource's attributes formatted as a JSON-API "attributes object".
500
495
  http://jsonapi.org/format/#document-resource-object-attributes
501
496
  @public
502
- @param {Object} modelClass
503
- @param {Object} resourceHash
504
- @return {Object}
505
497
  */
506
498
  extractAttributes(modelClass, resourceHash) {
507
499
  let attributeKey;
@@ -642,8 +634,7 @@ const JSONSerializer = Serializer.extend({
642
634
  /**
643
635
  Dasherizes the model name in the payload
644
636
  @public
645
- @param {String} key
646
- @return {String} the model's modelName
637
+ @return the model's modelName
647
638
  */
648
639
  modelNameFromPayloadKey(key) {
649
640
  return dasherize(singularize(key));
@@ -1155,11 +1146,7 @@ const JSONSerializer = Serializer.extend({
1155
1146
  }
1156
1147
  ```
1157
1148
  @public
1158
- @param {Store} store
1159
- @param {Model} typeClass
1160
- @param {Object} payload
1161
- @param {(String|Number)} id
1162
- @return {Object} json The deserialized errors
1149
+ @return json The deserialized errors
1163
1150
  */
1164
1151
  extractErrors(store, typeClass, payload, id) {
1165
1152
  // @ts-expect-error
@@ -1 +1 @@
1
- export { E as Errors, L as LEGACY_SUPPORT, P as PromiseBelongsTo, a as PromiseManyArray, l as lookupLegacySupport } from "../errors-DD96TBEs.js";
1
+ export { E as Errors, L as LEGACY_SUPPORT, P as PromiseBelongsTo, a as PromiseManyArray, l as lookupLegacySupport } from "../errors-DmGGJr3T.js";
@@ -1,10 +1,11 @@
1
1
  import { recordIdentifierFor } from '@warp-drive/core';
2
2
  import { Context } from '@warp-drive/core/reactive/-private';
3
- import { notifyInternalSignal, assertPrivateStore } from '@warp-drive/core/store/-private';
3
+ import { notifyInternalSignal } from '@warp-drive/core/signals/-leaked';
4
+ import { assertPrivateStore } from '@warp-drive/core/store/-private';
4
5
  import { getOrSetGlobal } from '@warp-drive/core/types/-private';
5
6
  import { Type } from '@warp-drive/core/types/symbols';
6
- import { l as lookupLegacySupport, E as Errors } from "../errors-DD96TBEs.js";
7
- import { b as buildSchema, u as unloadRecord, s as serialize, _ as _save, a as save, r as rollbackAttributes, c as _reload, d as reload, h as hasMany, e as _destroyRecord, f as destroyRecord, i as deleteRecord, R as RecordState, j as changedAttributes, k as belongsTo, l as createSnapshot } from "../schema-provider-B8jiJOYC.js";
7
+ import { l as lookupLegacySupport, E as Errors } from "../errors-DmGGJr3T.js";
8
+ import { b as buildSchema, u as unloadRecord, s as serialize, _ as _save, a as save, r as rollbackAttributes, c as _reload, d as reload, h as hasMany, e as _destroyRecord, f as destroyRecord, i as deleteRecord, R as RecordState, j as changedAttributes, k as belongsTo, l as createSnapshot } from "../schema-provider-DDVYxmUV.js";
8
9
 
9
10
  /**
10
11
  * This module provides support for migrating away from @warp-drive/legacy/model
@@ -461,8 +462,9 @@ class DelegatingSchemaService {
461
462
  return this._secondary.fields(resource);
462
463
  }
463
464
  cacheFields(resource) {
464
- if (this._preferred.cacheFields?.(resource)) {
465
- return this._preferred.cacheFields(resource);
465
+ if (this._preferred.hasResource?.(resource)) {
466
+ // @ts-expect-error
467
+ return this._preferred.cacheFields?.(resource);
466
468
  }
467
469
 
468
470
  // @ts-expect-error
@@ -3,10 +3,10 @@ import { recordIdentifierFor } from '@warp-drive/core';
3
3
  import { RecordStore } from '@warp-drive/core/types/symbols';
4
4
  import { i as isElementDescriptor, n as normalizeModelName } from "./util-DvanW33H.js";
5
5
  import { assertPrivateStore } from '@warp-drive/core/store/-private';
6
- import { l as lookupLegacySupport } from "./errors-DD96TBEs.js";
6
+ import { l as lookupLegacySupport } from "./errors-DmGGJr3T.js";
7
7
  import '@warp-drive/utilities/string';
8
- export { M as Model, b as buildSchema, M as default, m as restoreDeprecatedModelRequestBehaviors } from "./schema-provider-B8jiJOYC.js";
9
- export { i as instantiateRecord, m as modelFor, t as teardownRecord } from "./hooks-CqWjNWeL.js";
8
+ export { M as Model, b as buildSchema, M as default, m as restoreDeprecatedModelRequestBehaviors } from "./schema-provider-DDVYxmUV.js";
9
+ export { i as instantiateRecord, m as modelFor, t as teardownRecord } from "./hooks-CkYiE6Ud.js";
10
10
 
11
11
  /**
12
12
  * Options provided to the attr decorator are