@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.
- package/declarations/adapter/error.d.ts +2 -2
- package/declarations/adapter/rest.d.ts +21 -104
- package/declarations/adapter.d.ts +2 -2
- package/declarations/index.d.ts +32 -0
- package/declarations/model/-private/model.d.ts +10 -51
- package/declarations/model/-private/promise-many-array.d.ts +0 -18
- package/declarations/model/-private/references/belongs-to.d.ts +14 -24
- package/declarations/model/-private/references/has-many.d.ts +11 -13
- package/declarations/serializer/json-api.d.ts +4 -3
- package/declarations/serializer/json.d.ts +2 -2
- package/dist/{-private-B1pSSN52.js → -private-BG3bMiKp.js} +2 -1
- package/dist/adapter/-private.js +1 -1
- package/dist/adapter/error.js +2 -2
- package/dist/adapter/json-api.js +1 -1
- package/dist/adapter/rest.js +33 -117
- package/dist/adapter.js +2 -2
- package/dist/compat/-private.js +1 -1
- package/dist/compat.js +4 -3
- package/dist/{errors-CIGPcDvd.js → errors-Cz5KrzBk.js} +29 -58
- package/dist/{hooks-QqRnX108.js → hooks-D6diaM34.js} +1 -1
- package/dist/index.js +3 -3
- package/dist/{json-BNrV8EYG.js → json-ChdEfB0X.js} +6 -19
- package/dist/model/-private.js +1 -1
- package/dist/model/migration-support.js +7 -5
- package/dist/model.js +3 -3
- package/dist/{schema-provider-g5MfTj8n.js → schema-provider-DJCV_6AF.js} +34 -77
- package/dist/{serialize-into-hash-BnYvPex3.js → serialize-into-hash-DPZYoF-i.js} +1 -1
- package/dist/serializer/json-api.js +2 -2
- package/dist/serializer/json.js +1 -1
- package/dist/serializer/rest.js +1 -1
- package/dist/store.js +2 -1
- package/dist/unpkg/{dev-deprecated/-private-DbaSCSym.js → dev/-private-DtjBbEgy.js} +2 -1
- package/dist/unpkg/dev/adapter/-private.js +1 -1
- package/dist/unpkg/dev/adapter/error.js +2 -2
- package/dist/unpkg/dev/adapter/json-api.js +1 -1
- package/dist/unpkg/dev/adapter/rest.js +33 -117
- package/dist/unpkg/dev/adapter.js +2 -2
- package/dist/unpkg/dev/compat/-private.js +1 -1
- package/dist/unpkg/dev/compat.js +4 -3
- package/dist/unpkg/dev/{errors-DD96TBEs.js → errors-DmGGJr3T.js} +29 -58
- package/dist/unpkg/dev/{hooks-CqWjNWeL.js → hooks-CkYiE6Ud.js} +1 -1
- package/dist/unpkg/dev/index.js +3 -3
- package/dist/unpkg/{dev-deprecated/json-CCU-ZQ4b.js → dev/json-Cu1LNgmQ.js} +6 -19
- package/dist/unpkg/dev/model/-private.js +1 -1
- package/dist/unpkg/dev/model/migration-support.js +7 -5
- package/dist/unpkg/dev/model.js +3 -3
- package/dist/unpkg/dev/{schema-provider-B8jiJOYC.js → schema-provider-DDVYxmUV.js} +34 -77
- package/dist/unpkg/dev/{serialize-into-hash-CPAZXrQU.js → serialize-into-hash-B2xDbuo5.js} +1 -1
- package/dist/unpkg/dev/serializer/json-api.js +6 -5
- package/dist/unpkg/dev/serializer/json.js +1 -1
- package/dist/unpkg/dev/serializer/rest.js +1 -1
- package/dist/unpkg/dev/store.js +2 -1
- package/dist/unpkg/{dev/-private-DbaSCSym.js → dev-deprecated/-private-DtjBbEgy.js} +2 -1
- package/dist/unpkg/dev-deprecated/adapter/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/adapter/error.js +2 -2
- package/dist/unpkg/dev-deprecated/adapter/json-api.js +1 -1
- package/dist/unpkg/dev-deprecated/adapter/rest.js +33 -117
- package/dist/unpkg/dev-deprecated/adapter.js +2 -2
- package/dist/unpkg/dev-deprecated/compat/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/compat.js +4 -3
- package/dist/unpkg/dev-deprecated/{errors-DEnabIZj.js → errors-Spt6ubMd.js} +29 -58
- package/dist/unpkg/dev-deprecated/{hooks-CAll-Ets.js → hooks-DOXegvhL.js} +1 -1
- package/dist/unpkg/dev-deprecated/index.js +3 -3
- package/dist/unpkg/{dev/json-CCU-ZQ4b.js → dev-deprecated/json-Cu1LNgmQ.js} +6 -19
- package/dist/unpkg/dev-deprecated/model/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/model/migration-support.js +7 -5
- package/dist/unpkg/dev-deprecated/model.js +3 -3
- package/dist/unpkg/dev-deprecated/{schema-provider-k2qXQTBg.js → schema-provider-BP6_8N-V.js} +34 -77
- package/dist/unpkg/dev-deprecated/{serialize-into-hash-CPAZXrQU.js → serialize-into-hash-B2xDbuo5.js} +1 -1
- package/dist/unpkg/dev-deprecated/serializer/json-api.js +6 -5
- package/dist/unpkg/dev-deprecated/serializer/json.js +1 -1
- package/dist/unpkg/dev-deprecated/serializer/rest.js +1 -1
- package/dist/unpkg/dev-deprecated/store.js +2 -1
- package/dist/unpkg/{prod-deprecated/-private-Cvf_97EG.js → prod/-private-BdyZaGEh.js} +1 -0
- package/dist/unpkg/prod/adapter/-private.js +1 -1
- package/dist/unpkg/prod/adapter/error.js +2 -2
- package/dist/unpkg/prod/adapter/json-api.js +1 -1
- package/dist/unpkg/prod/adapter/rest.js +33 -117
- package/dist/unpkg/prod/adapter.js +2 -2
- package/dist/unpkg/prod/compat/-private.js +1 -1
- package/dist/unpkg/prod/compat.js +2 -1
- package/dist/unpkg/prod/{errors-CXnfnBfQ.js → errors-BGVFCBmi.js} +29 -58
- package/dist/unpkg/prod/{hooks-DvyWhLNg.js → hooks-BztVA_x0.js} +1 -1
- package/dist/unpkg/prod/index.js +3 -3
- package/dist/unpkg/prod/{json-BYrUP8ao.js → json-BWrZ5546.js} +6 -19
- package/dist/unpkg/prod/model/-private.js +1 -1
- package/dist/unpkg/prod/model/migration-support.js +7 -5
- package/dist/unpkg/prod/model.js +3 -3
- package/dist/unpkg/prod/{schema-provider-CHujJvA9.js → schema-provider-DJtD_8jZ.js} +34 -77
- package/dist/unpkg/{prod-deprecated/serialize-into-hash-DYU2egXl.js → prod/serialize-into-hash-DGlzQteF.js} +1 -1
- package/dist/unpkg/prod/serializer/json-api.js +6 -5
- package/dist/unpkg/prod/serializer/json.js +1 -1
- package/dist/unpkg/prod/serializer/rest.js +1 -1
- package/dist/unpkg/prod/store.js +2 -1
- package/dist/unpkg/{prod/-private-Cvf_97EG.js → prod-deprecated/-private-BdyZaGEh.js} +1 -0
- package/dist/unpkg/prod-deprecated/adapter/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/adapter/error.js +2 -2
- package/dist/unpkg/prod-deprecated/adapter/json-api.js +1 -1
- package/dist/unpkg/prod-deprecated/adapter/rest.js +33 -117
- package/dist/unpkg/prod-deprecated/adapter.js +2 -2
- package/dist/unpkg/prod-deprecated/compat/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/compat.js +2 -1
- package/dist/unpkg/prod-deprecated/{errors-CG1SPYVg.js → errors-CdDaK81x.js} +29 -58
- package/dist/unpkg/prod-deprecated/{hooks-BIUBiNGR.js → hooks-yId87yyG.js} +1 -1
- package/dist/unpkg/prod-deprecated/index.js +3 -3
- package/dist/unpkg/prod-deprecated/{json-BYrUP8ao.js → json-BWrZ5546.js} +6 -19
- package/dist/unpkg/prod-deprecated/model/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/model/migration-support.js +7 -5
- package/dist/unpkg/prod-deprecated/model.js +3 -3
- package/dist/unpkg/prod-deprecated/{schema-provider-BJ4TWnZf.js → schema-provider-CjX55uSY.js} +34 -77
- package/dist/unpkg/{prod/serialize-into-hash-DYU2egXl.js → prod-deprecated/serialize-into-hash-DGlzQteF.js} +1 -1
- package/dist/unpkg/prod-deprecated/serializer/json-api.js +6 -5
- package/dist/unpkg/prod-deprecated/serializer/json.js +1 -1
- package/dist/unpkg/prod-deprecated/serializer/rest.js +1 -1
- package/dist/unpkg/prod-deprecated/store.js +2 -1
- package/package.json +6 -6
package/dist/unpkg/prod-deprecated/{schema-provider-BJ4TWnZf.js → schema-provider-CjX55uSY.js}
RENAMED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { getOwner } from '@ember/application';
|
|
2
2
|
import EmberObject from '@ember/object';
|
|
3
3
|
import { recordIdentifierFor, storeFor } from '@warp-drive/core';
|
|
4
|
-
import {
|
|
4
|
+
import { notifyInternalSignal, peekInternalSignal, withSignalStore, gate, memoized, defineSignal, entangleSignal, defineGate } from '@warp-drive/core/signals/-leaked';
|
|
5
|
+
import { assertPrivateStore, recordIdentifierFor as recordIdentifierFor$1, coerceId } from '@warp-drive/core/store/-private';
|
|
5
6
|
import { RecordStore } from '@warp-drive/core/types/symbols';
|
|
6
|
-
import { l as lookupLegacySupport, L as LEGACY_SUPPORT, E as Errors } from "./errors-
|
|
7
|
-
import { u as upgradeStore, F as FetchManager } from "./-private-
|
|
7
|
+
import { l as lookupLegacySupport, L as LEGACY_SUPPORT, E as Errors } from "./errors-CdDaK81x.js";
|
|
8
|
+
import { u as upgradeStore, F as FetchManager } from "./-private-BdyZaGEh.js";
|
|
8
9
|
import { cacheFor } from '@ember/object/internals';
|
|
9
10
|
import { Context } from '@warp-drive/core/reactive/-private';
|
|
10
11
|
import { d as decorateMethodV2 } from "./runtime-BPCpkOf1-BKOwiRJp.js";
|
|
@@ -664,9 +665,7 @@ class Model extends EmberObject {
|
|
|
664
665
|
the server or the `created` state if the record is created on the
|
|
665
666
|
client. A record can also enter the empty state if the adapter is
|
|
666
667
|
unable to locate the record.
|
|
667
|
-
@
|
|
668
|
-
@public
|
|
669
|
-
@readonly
|
|
668
|
+
@public
|
|
670
669
|
*/
|
|
671
670
|
get isEmpty() {
|
|
672
671
|
return this.currentState.isEmpty;
|
|
@@ -677,9 +676,7 @@ class Model extends EmberObject {
|
|
|
677
676
|
record enters this state when the store asks the adapter for its
|
|
678
677
|
data. It remains in this state until the adapter provides the
|
|
679
678
|
requested data.
|
|
680
|
-
@
|
|
681
|
-
@public
|
|
682
|
-
@readonly
|
|
679
|
+
@public
|
|
683
680
|
*/
|
|
684
681
|
static {
|
|
685
682
|
decorateMethodV2(this.prototype, "isEmpty", [memoized]);
|
|
@@ -700,9 +697,7 @@ class Model extends EmberObject {
|
|
|
700
697
|
const { content: { data: model } } = await store.request(findRecord({ type: 'model', id: '1' }));
|
|
701
698
|
model.isLoaded;
|
|
702
699
|
```
|
|
703
|
-
@
|
|
704
|
-
@public
|
|
705
|
-
@readonly
|
|
700
|
+
@public
|
|
706
701
|
*/
|
|
707
702
|
static {
|
|
708
703
|
decorateMethodV2(this.prototype, "isLoading", [memoized]);
|
|
@@ -726,9 +721,7 @@ class Model extends EmberObject {
|
|
|
726
721
|
model.hasDirtyAttributes; // true
|
|
727
722
|
```
|
|
728
723
|
@since 1.13.0
|
|
729
|
-
@property hasDirtyAttributes
|
|
730
724
|
@public
|
|
731
|
-
@readonly
|
|
732
725
|
*/
|
|
733
726
|
static {
|
|
734
727
|
decorateMethodV2(this.prototype, "isLoaded", [memoized]);
|
|
@@ -752,9 +745,7 @@ class Model extends EmberObject {
|
|
|
752
745
|
record.isSaving; // false
|
|
753
746
|
});
|
|
754
747
|
```
|
|
755
|
-
@
|
|
756
|
-
@public
|
|
757
|
-
@readonly
|
|
748
|
+
@public
|
|
758
749
|
*/
|
|
759
750
|
static {
|
|
760
751
|
decorateMethodV2(this.prototype, "hasDirtyAttributes", [memoized]);
|
|
@@ -790,9 +781,7 @@ class Model extends EmberObject {
|
|
|
790
781
|
record.hasDirtyAttributes; // false
|
|
791
782
|
});
|
|
792
783
|
```
|
|
793
|
-
@
|
|
794
|
-
@public
|
|
795
|
-
@readonly
|
|
784
|
+
@public
|
|
796
785
|
*/
|
|
797
786
|
static {
|
|
798
787
|
decorateMethodV2(this.prototype, "isSaving", [memoized]);
|
|
@@ -814,9 +803,7 @@ class Model extends EmberObject {
|
|
|
814
803
|
model.isNew; // false
|
|
815
804
|
});
|
|
816
805
|
```
|
|
817
|
-
@
|
|
818
|
-
@public
|
|
819
|
-
@readonly
|
|
806
|
+
@public
|
|
820
807
|
*/
|
|
821
808
|
static {
|
|
822
809
|
decorateMethodV2(this.prototype, "isDeleted", [memoized]);
|
|
@@ -829,9 +816,7 @@ class Model extends EmberObject {
|
|
|
829
816
|
If this property is `true` the record is in the `valid` state.
|
|
830
817
|
A record will be in the `valid` state when the adapter did not report any
|
|
831
818
|
server-side validation failures.
|
|
832
|
-
@
|
|
833
|
-
@public
|
|
834
|
-
@readonly
|
|
819
|
+
@public
|
|
835
820
|
*/
|
|
836
821
|
static {
|
|
837
822
|
decorateMethodV2(this.prototype, "isNew", [memoized]);
|
|
@@ -852,9 +837,7 @@ class Model extends EmberObject {
|
|
|
852
837
|
let record = store.createRecord('model');
|
|
853
838
|
record.dirtyType; // 'created'
|
|
854
839
|
```
|
|
855
|
-
@
|
|
856
|
-
@public
|
|
857
|
-
@readonly
|
|
840
|
+
@public
|
|
858
841
|
*/
|
|
859
842
|
static {
|
|
860
843
|
decorateMethodV2(this.prototype, "isValid", [memoized]);
|
|
@@ -875,9 +858,7 @@ class Model extends EmberObject {
|
|
|
875
858
|
record.isError; // true
|
|
876
859
|
});
|
|
877
860
|
```
|
|
878
|
-
@
|
|
879
|
-
@public
|
|
880
|
-
@readonly
|
|
861
|
+
@public
|
|
881
862
|
*/
|
|
882
863
|
static {
|
|
883
864
|
decorateMethodV2(this.prototype, "dirtyType", [memoized]);
|
|
@@ -898,9 +879,7 @@ class Model extends EmberObject {
|
|
|
898
879
|
record.reload();
|
|
899
880
|
record.isReloading; // true
|
|
900
881
|
```
|
|
901
|
-
@
|
|
902
|
-
@public
|
|
903
|
-
@readonly
|
|
882
|
+
@public
|
|
904
883
|
*/
|
|
905
884
|
|
|
906
885
|
/**
|
|
@@ -915,8 +894,7 @@ class Model extends EmberObject {
|
|
|
915
894
|
const { content: { data: model } } = await store.request(findRecord({ type: 'model', id: '1' }));
|
|
916
895
|
model.id; // '1'
|
|
917
896
|
```
|
|
918
|
-
@
|
|
919
|
-
@public
|
|
897
|
+
@public
|
|
920
898
|
*/
|
|
921
899
|
get id() {
|
|
922
900
|
// this guard exists, because some dev-only deprecation code
|
|
@@ -943,7 +921,6 @@ class Model extends EmberObject {
|
|
|
943
921
|
}
|
|
944
922
|
|
|
945
923
|
/**
|
|
946
|
-
@property currentState
|
|
947
924
|
@private
|
|
948
925
|
*/
|
|
949
926
|
// TODO we can probably make this a computeOnce
|
|
@@ -969,8 +946,7 @@ class Model extends EmberObject {
|
|
|
969
946
|
|
|
970
947
|
/**
|
|
971
948
|
The store service instance which created this record instance
|
|
972
|
-
|
|
973
|
-
@public
|
|
949
|
+
@public
|
|
974
950
|
*/
|
|
975
951
|
|
|
976
952
|
/**
|
|
@@ -1013,8 +989,7 @@ class Model extends EmberObject {
|
|
|
1013
989
|
</div>
|
|
1014
990
|
{{/each}}
|
|
1015
991
|
```
|
|
1016
|
-
@
|
|
1017
|
-
@public
|
|
992
|
+
@public
|
|
1018
993
|
*/
|
|
1019
994
|
get errors() {
|
|
1020
995
|
const errors = Errors.create({
|
|
@@ -1027,8 +1002,7 @@ class Model extends EmberObject {
|
|
|
1027
1002
|
/**
|
|
1028
1003
|
This property holds the `AdapterError` object with which
|
|
1029
1004
|
last adapter operation was rejected.
|
|
1030
|
-
@
|
|
1031
|
-
@public
|
|
1005
|
+
@public
|
|
1032
1006
|
*/
|
|
1033
1007
|
static {
|
|
1034
1008
|
decorateMethodV2(this.prototype, "errors", [computeOnce]);
|
|
@@ -1138,9 +1112,7 @@ class Model extends EmberObject {
|
|
|
1138
1112
|
}
|
|
1139
1113
|
});
|
|
1140
1114
|
```
|
|
1141
|
-
|
|
1142
|
-
@public
|
|
1143
|
-
@readonly
|
|
1115
|
+
@public
|
|
1144
1116
|
*/
|
|
1145
1117
|
static modelName = null;
|
|
1146
1118
|
|
|
@@ -1266,11 +1238,8 @@ class Model extends EmberObject {
|
|
|
1266
1238
|
relationships.post;
|
|
1267
1239
|
//=> [ { name: 'posts', kind: 'hasMany' } ]
|
|
1268
1240
|
```
|
|
1269
|
-
|
|
1270
|
-
@public
|
|
1271
|
-
@readonly
|
|
1241
|
+
@public
|
|
1272
1242
|
*/
|
|
1273
|
-
|
|
1274
1243
|
static get relationships() {
|
|
1275
1244
|
const map = new Map();
|
|
1276
1245
|
const relationshipsByName = this.relationshipsByName;
|
|
@@ -1309,9 +1278,7 @@ class Model extends EmberObject {
|
|
|
1309
1278
|
relationshipNames.belongsTo;
|
|
1310
1279
|
//=> ['owner']
|
|
1311
1280
|
```
|
|
1312
|
-
|
|
1313
|
-
@public
|
|
1314
|
-
@readonly
|
|
1281
|
+
@public
|
|
1315
1282
|
*/
|
|
1316
1283
|
static {
|
|
1317
1284
|
decorateMethodV2(this, "relationships", [computeOnce]);
|
|
@@ -1348,9 +1315,7 @@ class Model extends EmberObject {
|
|
|
1348
1315
|
let relatedTypes = Blog.relatedTypes');
|
|
1349
1316
|
//=> ['user', 'post']
|
|
1350
1317
|
```
|
|
1351
|
-
@
|
|
1352
|
-
@public
|
|
1353
|
-
@readonly
|
|
1318
|
+
@public
|
|
1354
1319
|
*/
|
|
1355
1320
|
static {
|
|
1356
1321
|
decorateMethodV2(this, "relationshipNames", [computeOnce]);
|
|
@@ -1395,9 +1360,7 @@ class Model extends EmberObject {
|
|
|
1395
1360
|
relationshipsByName.owner;
|
|
1396
1361
|
//=> { name: 'owner', kind: 'belongsTo', type: 'user', options: Object }
|
|
1397
1362
|
```
|
|
1398
|
-
|
|
1399
|
-
@public
|
|
1400
|
-
@readonly
|
|
1363
|
+
@public
|
|
1401
1364
|
*/
|
|
1402
1365
|
static {
|
|
1403
1366
|
decorateMethodV2(this, "relatedTypes", [computeOnce]);
|
|
@@ -1457,9 +1420,7 @@ class Model extends EmberObject {
|
|
|
1457
1420
|
// posts, hasMany
|
|
1458
1421
|
// title, attribute
|
|
1459
1422
|
```
|
|
1460
|
-
|
|
1461
|
-
@public
|
|
1462
|
-
@readonly
|
|
1423
|
+
@public
|
|
1463
1424
|
*/
|
|
1464
1425
|
static {
|
|
1465
1426
|
decorateMethodV2(this, "relationshipsObject", [computeOnce]);
|
|
@@ -1481,8 +1442,8 @@ class Model extends EmberObject {
|
|
|
1481
1442
|
invoking the callback with the name of each relationship and its relationship
|
|
1482
1443
|
descriptor.
|
|
1483
1444
|
@public
|
|
1484
|
-
@param
|
|
1485
|
-
@param
|
|
1445
|
+
@param callback the callback to invoke
|
|
1446
|
+
@param binding the value to which the callback's `this` should be bound
|
|
1486
1447
|
*/
|
|
1487
1448
|
static {
|
|
1488
1449
|
decorateMethodV2(this, "fields", [computeOnce]);
|
|
@@ -1499,8 +1460,8 @@ class Model extends EmberObject {
|
|
|
1499
1460
|
returned just once, regardless of how many different relationships it has
|
|
1500
1461
|
with a model.
|
|
1501
1462
|
@public
|
|
1502
|
-
@param
|
|
1503
|
-
@param
|
|
1463
|
+
@param callback the callback to invoke
|
|
1464
|
+
@param binding the value to which the callback's `this` should be bound
|
|
1504
1465
|
*/
|
|
1505
1466
|
static eachRelatedType(callback, binding) {
|
|
1506
1467
|
const relationshipTypes = this.relatedTypes;
|
|
@@ -1558,9 +1519,7 @@ class Model extends EmberObject {
|
|
|
1558
1519
|
// lastName {type: "string", kind: 'attribute', options: Object, parentType: function, name: "lastName"}
|
|
1559
1520
|
// birthday {type: "date", kind: 'attribute', options: Object, parentType: function, name: "birthday"}
|
|
1560
1521
|
```
|
|
1561
|
-
|
|
1562
|
-
@public
|
|
1563
|
-
@readonly
|
|
1522
|
+
@public
|
|
1564
1523
|
*/
|
|
1565
1524
|
static get attributes() {
|
|
1566
1525
|
const map = new Map();
|
|
@@ -1599,9 +1558,7 @@ class Model extends EmberObject {
|
|
|
1599
1558
|
// lastName string
|
|
1600
1559
|
// birthday date
|
|
1601
1560
|
```
|
|
1602
|
-
|
|
1603
|
-
@public
|
|
1604
|
-
@readonly
|
|
1561
|
+
@public
|
|
1605
1562
|
*/
|
|
1606
1563
|
static {
|
|
1607
1564
|
decorateMethodV2(this, "attributes", [computeOnce]);
|
|
@@ -1645,8 +1602,8 @@ class Model extends EmberObject {
|
|
|
1645
1602
|
// birthday {type: "date", kind: 'attribute', options: Object, parentType: function, name: "birthday"}
|
|
1646
1603
|
```
|
|
1647
1604
|
@public
|
|
1648
|
-
@param
|
|
1649
|
-
@param
|
|
1605
|
+
@param callback The callback to execute
|
|
1606
|
+
@param binding [optional] the value to which the callback's `this` should be bound
|
|
1650
1607
|
*/
|
|
1651
1608
|
static {
|
|
1652
1609
|
decorateMethodV2(this, "transformedAttributes", [computeOnce]);
|
|
@@ -1687,8 +1644,8 @@ class Model extends EmberObject {
|
|
|
1687
1644
|
// birthday date
|
|
1688
1645
|
```
|
|
1689
1646
|
@public
|
|
1690
|
-
@param
|
|
1691
|
-
@param
|
|
1647
|
+
@param callback The callback to execute
|
|
1648
|
+
@param binding [optional] the value to which the callback's `this` should be bound
|
|
1692
1649
|
*/
|
|
1693
1650
|
static eachTransformedAttribute(callback, binding) {
|
|
1694
1651
|
this.transformedAttributes.forEach((type, name) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { dasherize, pluralize, singularize } from '@warp-drive/utilities/string';
|
|
2
|
-
import { J as JSONSerializer } from "../json-
|
|
2
|
+
import { J as JSONSerializer } from "../json-BWrZ5546.js";
|
|
3
3
|
|
|
4
4
|
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
@@ -19,8 +19,9 @@ import { J as JSONSerializer } from "../json-BYrUP8ao.js";
|
|
|
19
19
|
This process involves normalizing property names, transforming
|
|
20
20
|
attribute values and serializing relationships.
|
|
21
21
|
|
|
22
|
-
`JSONAPISerializer` supports the http://jsonapi.org/ spec
|
|
23
|
-
|
|
22
|
+
`JSONAPISerializer` supports the http://jsonapi.org/ spec, though
|
|
23
|
+
even compliant {json:api} servers may find writing an application
|
|
24
|
+
specific serializer better suited to their needs and more performant.
|
|
24
25
|
|
|
25
26
|
This serializer normalizes a JSON API payload that looks like:
|
|
26
27
|
|
|
@@ -89,7 +90,7 @@ import { J as JSONSerializer } from "../json-BYrUP8ao.js";
|
|
|
89
90
|
}
|
|
90
91
|
```
|
|
91
92
|
|
|
92
|
-
to the format that the
|
|
93
|
+
to the format that the JSONAPICache expects.
|
|
93
94
|
|
|
94
95
|
### Customizing meta
|
|
95
96
|
|
|
@@ -265,7 +266,7 @@ const JSONAPISerializer = JSONSerializer.extend({
|
|
|
265
266
|
},
|
|
266
267
|
/**
|
|
267
268
|
Dasherizes and singularizes the model name in the payload to match
|
|
268
|
-
the
|
|
269
|
+
the common convention for model names.
|
|
269
270
|
For example the key `posts` would be converted to `post` and the
|
|
270
271
|
key `studentAssesments` would be converted to `student-assesment`.
|
|
271
272
|
@public
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { camelize, dasherize, singularize } from '@warp-drive/utilities/string';
|
|
2
|
-
import { J as JSONSerializer, c as coerceId } from "../json-
|
|
2
|
+
import { J as JSONSerializer, c as coerceId } from "../json-BWrZ5546.js";
|
|
3
3
|
import Mixin from '@ember/object/mixin';
|
|
4
4
|
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-unsafe-argument */
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { assertPrivateStore, ensureStringId, recordIdentifierFor, constructResource } from '@warp-drive/core/store/-private';
|
|
2
2
|
import { SkipCache } from '@warp-drive/core/types/request';
|
|
3
3
|
import { i as isMaybeIdentifier } from "./utils-BUWwQwCh.js";
|
|
4
4
|
import { n as normalizeModelName } from "./util-B6cn-i93.js";
|
|
5
|
+
import { defineSignal } from '@warp-drive/core/signals/-leaked';
|
|
5
6
|
import { getOrSetGlobal } from '@warp-drive/core/types/-private';
|
|
6
7
|
|
|
7
8
|
/*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warp-drive/legacy",
|
|
3
|
-
"version": "5.8.0-alpha.
|
|
3
|
+
"version": "5.8.0-alpha.42",
|
|
4
4
|
"description": "Decommissioned Packages for WarpDrive | Things your app might still want to maintain use of for a little longer.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@warp-drive/core": "5.8.0-alpha.
|
|
44
|
-
"@warp-drive/utilities": "5.8.0-alpha.
|
|
43
|
+
"@warp-drive/core": "5.8.0-alpha.42",
|
|
44
|
+
"@warp-drive/utilities": "5.8.0-alpha.42"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@embroider/macros": "^1.18.1"
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"@babel/plugin-transform-typescript": "^7.28.0",
|
|
52
52
|
"@babel/preset-typescript": "^7.27.1",
|
|
53
53
|
"@types/jquery": "^3.5.33",
|
|
54
|
-
"@warp-drive/internal-config": "5.8.0-alpha.
|
|
55
|
-
"@warp-drive/core": "5.8.0-alpha.
|
|
56
|
-
"@warp-drive/utilities": "5.8.0-alpha.
|
|
54
|
+
"@warp-drive/internal-config": "5.8.0-alpha.42",
|
|
55
|
+
"@warp-drive/core": "5.8.0-alpha.42",
|
|
56
|
+
"@warp-drive/utilities": "5.8.0-alpha.42",
|
|
57
57
|
"ember-source": "~6.6.0",
|
|
58
58
|
"decorator-transforms": "^2.3.0",
|
|
59
59
|
"expect-type": "^1.2.2",
|