@ember-data/store 5.4.0-beta.16 → 5.4.0-beta.17
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.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{many-array-V2cR1muR.js → many-array-D-iDvWAq.js} +24 -12
- package/dist/many-array-D-iDvWAq.js.map +1 -0
- package/package.json +11 -11
- package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts.map +1 -1
- package/dist/many-array-V2cR1muR.js.map +0 -1
package/dist/-private.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ARRAY_SIGNAL, C as CacheHandler, j as CollectionRecordArray, I as LiveArray, M as MUTATE, R as RecordArrayManager, v as RelatedCollection, k as SOURCE, S as Store, q as StoreMap, _ as _clearCaches, u as _deprecatingNormalize, g as coerceId, f as constructResource, h as ensureStringId, l as fastPush, i as isStableIdentifier, w as log, x as logGroup, n as notifyArray, p as peekCache, r as recordIdentifierFor, m as removeRecordDataFor, t as setCacheFor, o as setRecordIdentifier, s as storeFor } from "./many-array-
|
|
1
|
+
export { A as ARRAY_SIGNAL, C as CacheHandler, j as CollectionRecordArray, I as LiveArray, M as MUTATE, R as RecordArrayManager, v as RelatedCollection, k as SOURCE, S as Store, q as StoreMap, _ as _clearCaches, u as _deprecatingNormalize, g as coerceId, f as constructResource, h as ensureStringId, l as fastPush, i as isStableIdentifier, w as log, x as logGroup, n as notifyArray, p as peekCache, r as recordIdentifierFor, m as removeRecordDataFor, t as setCacheFor, o as setRecordIdentifier, s as storeFor } from "./many-array-D-iDvWAq.js";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CacheHandler, S as default, r as recordIdentifierFor, c as setIdentifierForgetMethod, a as setIdentifierGenerationMethod, d as setIdentifierResetMethod, b as setIdentifierUpdateMethod, e as setKeyInfoForResource, s as storeFor } from "./many-array-
|
|
1
|
+
export { C as CacheHandler, S as default, r as recordIdentifierFor, c as setIdentifierForgetMethod, a as setIdentifierGenerationMethod, d as setIdentifierResetMethod, b as setIdentifierUpdateMethod, e as setKeyInfoForResource, s as storeFor } from "./many-array-D-iDvWAq.js";
|
|
2
2
|
import '@ember/debug';
|
|
3
3
|
import '@embroider/macros';
|
|
4
4
|
import '@ember-data/request-utils/string';
|
|
@@ -5,7 +5,7 @@ import { EnableHydration, SkipCache } from '@warp-drive/core-types/request';
|
|
|
5
5
|
import { getOrSetGlobal, peekTransient, setTransient } from '@warp-drive/core-types/-private';
|
|
6
6
|
import { _backburner } from '@ember/runloop';
|
|
7
7
|
import { defineSignal, createSignal, subscribe, createArrayTags, addToTransaction, addTransactionCB } from '@ember-data/tracking/-private';
|
|
8
|
-
import { CACHE_OWNER, DEBUG_STALE_CACHE_OWNER,
|
|
8
|
+
import { CACHE_OWNER, DEBUG_STALE_CACHE_OWNER, DEBUG_IDENTIFIER_BUCKET, DEBUG_CLIENT_ORIGINATED } from '@warp-drive/core-types/identifier';
|
|
9
9
|
import { dasherize } from '@ember-data/request-utils/string';
|
|
10
10
|
import { compat } from '@ember-data/tracking';
|
|
11
11
|
|
|
@@ -662,15 +662,13 @@ function makeStableRecordIdentifier(recordIdentifier, bucket, clientOriginated)
|
|
|
662
662
|
// we enforce immutability in dev
|
|
663
663
|
// but preserve our ability to do controlled updates to the reference
|
|
664
664
|
let wrapper = {
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
},
|
|
665
|
+
type: recordIdentifier.type,
|
|
666
|
+
lid: recordIdentifier.lid,
|
|
668
667
|
get id() {
|
|
669
668
|
return recordIdentifier.id;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
},
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
const proto = {
|
|
674
672
|
get [CACHE_OWNER]() {
|
|
675
673
|
return recordIdentifier[CACHE_OWNER];
|
|
676
674
|
},
|
|
@@ -682,9 +680,15 @@ function makeStableRecordIdentifier(recordIdentifier, bucket, clientOriginated)
|
|
|
682
680
|
},
|
|
683
681
|
set [DEBUG_STALE_CACHE_OWNER](value) {
|
|
684
682
|
recordIdentifier[DEBUG_STALE_CACHE_OWNER] = value;
|
|
683
|
+
},
|
|
684
|
+
get [DEBUG_CLIENT_ORIGINATED]() {
|
|
685
|
+
return clientOriginated;
|
|
686
|
+
},
|
|
687
|
+
get [DEBUG_IDENTIFIER_BUCKET]() {
|
|
688
|
+
return bucket;
|
|
685
689
|
}
|
|
686
690
|
};
|
|
687
|
-
Object.defineProperty(
|
|
691
|
+
Object.defineProperty(proto, 'toString', {
|
|
688
692
|
enumerable: false,
|
|
689
693
|
value: () => {
|
|
690
694
|
const {
|
|
@@ -695,7 +699,7 @@ function makeStableRecordIdentifier(recordIdentifier, bucket, clientOriginated)
|
|
|
695
699
|
return `${clientOriginated ? '[CLIENT_ORIGINATED] ' : ''}${String(type)}:${String(id)} (${lid})`;
|
|
696
700
|
}
|
|
697
701
|
});
|
|
698
|
-
Object.defineProperty(
|
|
702
|
+
Object.defineProperty(proto, 'toJSON', {
|
|
699
703
|
enumerable: false,
|
|
700
704
|
value: () => {
|
|
701
705
|
const {
|
|
@@ -710,8 +714,7 @@ function makeStableRecordIdentifier(recordIdentifier, bucket, clientOriginated)
|
|
|
710
714
|
};
|
|
711
715
|
}
|
|
712
716
|
});
|
|
713
|
-
wrapper
|
|
714
|
-
wrapper[DEBUG_IDENTIFIER_BUCKET] = bucket;
|
|
717
|
+
Object.setPrototypeOf(wrapper, proto);
|
|
715
718
|
DEBUG_MAP.set(wrapper, recordIdentifier);
|
|
716
719
|
wrapper = freeze(wrapper);
|
|
717
720
|
return wrapper;
|
|
@@ -2920,6 +2923,15 @@ class IdentifierArray {
|
|
|
2920
2923
|
return Array.prototype;
|
|
2921
2924
|
}
|
|
2922
2925
|
});
|
|
2926
|
+
if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
|
|
2927
|
+
Object.defineProperty(this, '__SHOW_ME_THE_DATA_(debug mode only)__', {
|
|
2928
|
+
enumerable: false,
|
|
2929
|
+
configurable: true,
|
|
2930
|
+
get() {
|
|
2931
|
+
return proxy.slice();
|
|
2932
|
+
}
|
|
2933
|
+
});
|
|
2934
|
+
}
|
|
2923
2935
|
createArrayTags(proxy, _SIGNAL);
|
|
2924
2936
|
this[NOTIFY] = this[NOTIFY].bind(proxy);
|
|
2925
2937
|
return proxy;
|