@warp-drive/core 5.7.0-alpha.27 → 5.7.0-alpha.29
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/graph/-private/-diff.d.ts +0 -13
- package/declarations/graph/-private/-edge-definition.d.ts +1 -10
- package/declarations/graph/-private/edges/resource.d.ts +1 -2
- package/declarations/reactive/-private/record.d.ts +2 -16
- package/declarations/reactive/-private/schema.d.ts +1 -67
- package/declarations/request/-private/manager.d.ts +21 -19
- package/declarations/request/-private/types.d.ts +1 -3
- package/declarations/store/-private/caches/instance-cache.d.ts +1 -1
- package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +13 -6
- package/declarations/store/-private/managers/cache-key-manager.d.ts +18 -35
- package/declarations/store/-private/managers/notification-manager.d.ts +9 -17
- package/declarations/store/-private/managers/record-array-manager.d.ts +21 -68
- package/declarations/store/-private/network/request-cache.d.ts +12 -12
- package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +3 -41
- package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +8 -29
- package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +5 -3
- package/declarations/store/-private/new-core-tmp/request-subscription.d.ts +2 -110
- package/declarations/store/-private/record-arrays/-utils.d.ts +0 -2
- package/declarations/store/-private/record-arrays/legacy-live-array.d.ts +1 -9
- package/declarations/store/-private/record-arrays/legacy-many-array.d.ts +5 -11
- package/declarations/store/-private/record-arrays/legacy-query.d.ts +1 -23
- package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +1 -124
- package/declarations/store/-private/record-arrays/resource-array.d.ts +3 -10
- package/declarations/store/-private/store-service.d.ts +77 -65
- package/declarations/store/-private.d.ts +4 -1
- package/declarations/store/-types/q/record-instance.d.ts +0 -1
- package/declarations/store/deprecated/-private.d.ts +0 -11
- package/declarations/types/identifier.d.ts +0 -8
- package/declarations/types/spec/json-api-raw.d.ts +6 -8
- package/declarations/utils/string.d.ts +2 -2
- package/dist/{configure-B48bFHOl.js → configure-CiFDHArV.js} +4 -4
- package/dist/configure.js +1 -1
- package/dist/graph/-private.js +2 -5
- package/dist/index.js +10 -2
- package/dist/reactive.js +5 -5
- package/dist/{request-state-DAjbHWcs.js → request-state-B908BvPK.js} +182 -36
- package/dist/store/-private.js +2 -2
- package/dist/types/-private.js +1 -1
- package/dist/utils/string.js +2 -2
- package/package.json +3 -3
|
@@ -6,7 +6,7 @@ import { getOrSetGlobal, peekTransient, setTransient } from './types/-private.js
|
|
|
6
6
|
import { CACHE_OWNER, DEBUG_STALE_CACHE_OWNER, DEBUG_KEY_TYPE, DEBUG_CLIENT_ORIGINATED } from './types/identifier.js';
|
|
7
7
|
import { dasherize } from './utils/string.js';
|
|
8
8
|
import { S as SOURCE, C as Context, D as Destroy, a as Checkout, b as Commit } from "./symbols-sql1_mdx.js";
|
|
9
|
-
import { a as createSignal, b as consumeSignal, n as notifySignal, c as createMemo, A as ARRAY_SIGNAL, O as OBJECT_SIGNAL, d as willSyncFlushWatchers } from "./configure-
|
|
9
|
+
import { a as createSignal, b as consumeSignal, n as notifySignal, c as createMemo, A as ARRAY_SIGNAL, O as OBJECT_SIGNAL, d as willSyncFlushWatchers } from "./configure-CiFDHArV.js";
|
|
10
10
|
import { g as getPromiseResult, s as setPromiseResult } from "./context-Bh-MA_tH.js";
|
|
11
11
|
import { RecordStore } from './types/symbols.js';
|
|
12
12
|
const INITIALIZER_PROTO = {
|
|
@@ -49,7 +49,7 @@ function isInitializer(obj) {
|
|
|
49
49
|
* - the "key" or "name" of the signal
|
|
50
50
|
* - the "object identity" or "context" to which the signal is attached
|
|
51
51
|
*
|
|
52
|
-
* @
|
|
52
|
+
* @private
|
|
53
53
|
*/
|
|
54
54
|
|
|
55
55
|
/**
|
|
@@ -68,7 +68,7 @@ function isInitializer(obj) {
|
|
|
68
68
|
* initializeSignalStore(obj);
|
|
69
69
|
* ```
|
|
70
70
|
*
|
|
71
|
-
* @
|
|
71
|
+
* @private
|
|
72
72
|
*/
|
|
73
73
|
const Signals = getOrSetGlobal('Signals', Symbol('Signals'));
|
|
74
74
|
|
|
@@ -77,7 +77,7 @@ const Signals = getOrSetGlobal('Signals', Symbol('Signals'));
|
|
|
77
77
|
* if it does not already exist and returns the associated
|
|
78
78
|
* signal store.
|
|
79
79
|
*
|
|
80
|
-
* @
|
|
80
|
+
* @private
|
|
81
81
|
*/
|
|
82
82
|
function withSignalStore(obj) {
|
|
83
83
|
if (!obj[Signals]) {
|
|
@@ -93,7 +93,7 @@ function withSignalStore(obj) {
|
|
|
93
93
|
* Useful for pre-warming the shape of an object to ensure
|
|
94
94
|
* a key-transition to add it is not required later.
|
|
95
95
|
*
|
|
96
|
-
* @
|
|
96
|
+
* @private
|
|
97
97
|
*/
|
|
98
98
|
function initializeSignalStore(obj) {
|
|
99
99
|
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
@@ -168,7 +168,7 @@ function createSignalDescriptor(key, intialValue) {
|
|
|
168
168
|
* The signal will be lazily created when accessed and scoped to the
|
|
169
169
|
* instance of the object.
|
|
170
170
|
*
|
|
171
|
-
* @
|
|
171
|
+
* @private
|
|
172
172
|
*/
|
|
173
173
|
function defineSignal(obj, key, v) {
|
|
174
174
|
Object.defineProperty(obj, key, createSignalDescriptor(key, v));
|
|
@@ -177,7 +177,7 @@ function defineSignal(obj, key, v) {
|
|
|
177
177
|
/**
|
|
178
178
|
* Define a non-enumerable signal property.
|
|
179
179
|
*
|
|
180
|
-
* @
|
|
180
|
+
* @private
|
|
181
181
|
*/
|
|
182
182
|
function defineNonEnumerableSignal(obj, key, v) {
|
|
183
183
|
const desc = createSignalDescriptor(key, v);
|
|
@@ -239,6 +239,8 @@ function memoized(target, key, descriptor) {
|
|
|
239
239
|
|
|
240
240
|
/**
|
|
241
241
|
* Decorator version of creating a gate.
|
|
242
|
+
*
|
|
243
|
+
* @private
|
|
242
244
|
*/
|
|
243
245
|
function gate(_target, key, desc) {
|
|
244
246
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
@@ -3198,6 +3200,20 @@ if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
|
|
|
3198
3200
|
* @public
|
|
3199
3201
|
*/
|
|
3200
3202
|
class CacheKeyManager {
|
|
3203
|
+
/** @internal */
|
|
3204
|
+
_cache;
|
|
3205
|
+
/** @internal */
|
|
3206
|
+
|
|
3207
|
+
/** @internal */
|
|
3208
|
+
|
|
3209
|
+
/** @internal */
|
|
3210
|
+
|
|
3211
|
+
/** @internal */
|
|
3212
|
+
|
|
3213
|
+
/** @internal */
|
|
3214
|
+
|
|
3215
|
+
/** @internal */
|
|
3216
|
+
|
|
3201
3217
|
/** @internal */
|
|
3202
3218
|
|
|
3203
3219
|
constructor() {
|
|
@@ -3224,7 +3240,7 @@ class CacheKeyManager {
|
|
|
3224
3240
|
* we allow late binding of this private internal merge so that
|
|
3225
3241
|
* the cache can insert itself here to handle elimination of duplicates
|
|
3226
3242
|
*
|
|
3227
|
-
* @
|
|
3243
|
+
* @internal
|
|
3228
3244
|
*/
|
|
3229
3245
|
__configureMerge(method) {
|
|
3230
3246
|
this._merge = method || defaultMergeMethod;
|
|
@@ -3235,10 +3251,13 @@ class CacheKeyManager {
|
|
|
3235
3251
|
return this._getRecordIdentifier(resource, 2);
|
|
3236
3252
|
}
|
|
3237
3253
|
|
|
3238
|
-
/**
|
|
3239
|
-
|
|
3240
|
-
|
|
3254
|
+
/** @internal */
|
|
3255
|
+
|
|
3256
|
+
/** @internal */
|
|
3257
|
+
|
|
3258
|
+
/** @internal */
|
|
3241
3259
|
|
|
3260
|
+
/** @internal */
|
|
3242
3261
|
_getRecordIdentifier(resource, shouldGenerate) {
|
|
3243
3262
|
if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_IDENTIFIERS)) {
|
|
3244
3263
|
if (getGlobalConfig().WarpDrive.debug.LOG_IDENTIFIERS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_IDENTIFIERS) {
|
|
@@ -3481,7 +3500,7 @@ class CacheKeyManager {
|
|
|
3481
3500
|
}
|
|
3482
3501
|
|
|
3483
3502
|
/**
|
|
3484
|
-
* @
|
|
3503
|
+
* @internal
|
|
3485
3504
|
*/
|
|
3486
3505
|
_mergeRecordIdentifiers(keyInfo, identifier, existingIdentifier, data) {
|
|
3487
3506
|
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
@@ -3570,6 +3589,15 @@ class CacheKeyManager {
|
|
|
3570
3589
|
this._reset();
|
|
3571
3590
|
}
|
|
3572
3591
|
}
|
|
3592
|
+
|
|
3593
|
+
/**
|
|
3594
|
+
* This type exists for internal use only for
|
|
3595
|
+
* where intimate contracts still exist either for
|
|
3596
|
+
* the Test Suite or for Legacy code.
|
|
3597
|
+
*
|
|
3598
|
+
* @private
|
|
3599
|
+
*/
|
|
3600
|
+
|
|
3573
3601
|
function makeResourceKey(recordIdentifier, bucket, clientOriginated) {
|
|
3574
3602
|
if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
|
|
3575
3603
|
// we enforce immutability in dev
|
|
@@ -3734,6 +3762,12 @@ function addResourceToCache(cache, identifier) {
|
|
|
3734
3762
|
}
|
|
3735
3763
|
}
|
|
3736
3764
|
class CacheCapabilitiesManager {
|
|
3765
|
+
/** @internal */
|
|
3766
|
+
|
|
3767
|
+
/** @internal */
|
|
3768
|
+
|
|
3769
|
+
/** @internal */
|
|
3770
|
+
|
|
3737
3771
|
constructor(_store) {
|
|
3738
3772
|
this._store = _store;
|
|
3739
3773
|
this._willNotify = false;
|
|
@@ -3747,6 +3781,8 @@ class CacheCapabilitiesManager {
|
|
|
3747
3781
|
get identifierCache() {
|
|
3748
3782
|
return this.cacheKeyManager;
|
|
3749
3783
|
}
|
|
3784
|
+
|
|
3785
|
+
/** @internal */
|
|
3750
3786
|
_scheduleNotification(identifier, key) {
|
|
3751
3787
|
let pending = this._pendingNotifies.get(identifier);
|
|
3752
3788
|
if (!pending) {
|
|
@@ -3768,6 +3804,8 @@ class CacheCapabilitiesManager {
|
|
|
3768
3804
|
this._flushNotifications();
|
|
3769
3805
|
}
|
|
3770
3806
|
}
|
|
3807
|
+
|
|
3808
|
+
/** @internal */
|
|
3771
3809
|
_flushNotifications() {
|
|
3772
3810
|
if (this._willNotify === false) {
|
|
3773
3811
|
return;
|
|
@@ -3821,12 +3859,22 @@ class CacheCapabilitiesManager {
|
|
|
3821
3859
|
this._pendingNotifies.delete(identifier);
|
|
3822
3860
|
}
|
|
3823
3861
|
}
|
|
3862
|
+
|
|
3863
|
+
/**
|
|
3864
|
+
* This type exists for internal use only for
|
|
3865
|
+
* where intimate contracts still exist either for
|
|
3866
|
+
* the Test Suite or for Legacy code.
|
|
3867
|
+
*
|
|
3868
|
+
* @private
|
|
3869
|
+
*/
|
|
3870
|
+
|
|
3824
3871
|
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA_SERVICE)) {
|
|
3825
3872
|
CacheCapabilitiesManager.prototype.getSchemaDefinitionService = function () {
|
|
3826
3873
|
// FIXME add deprecation for this
|
|
3827
|
-
return this.
|
|
3874
|
+
return this.schema;
|
|
3828
3875
|
};
|
|
3829
3876
|
}
|
|
3877
|
+
function assertPrivateCapabilities(manager) {}
|
|
3830
3878
|
function isDestroyable(record) {
|
|
3831
3879
|
return Boolean(record && typeof record === 'object' && typeof record.destroy === 'function');
|
|
3832
3880
|
}
|
|
@@ -3891,7 +3939,7 @@ const StoreMap = getOrSetGlobal('StoreMap', new Map());
|
|
|
3891
3939
|
|
|
3892
3940
|
/**
|
|
3893
3941
|
* We may eventually make this public, but its likely better for this to be killed off
|
|
3894
|
-
* @
|
|
3942
|
+
* @private
|
|
3895
3943
|
*/
|
|
3896
3944
|
function storeFor(record, ignoreMissing) {
|
|
3897
3945
|
const store = StoreMap.get(record);
|
|
@@ -4935,6 +4983,15 @@ class NotificationManager {
|
|
|
4935
4983
|
this._cache.clear();
|
|
4936
4984
|
}
|
|
4937
4985
|
}
|
|
4986
|
+
|
|
4987
|
+
/**
|
|
4988
|
+
* This type exists for internal use only for
|
|
4989
|
+
* where intimate contracts still exist either for
|
|
4990
|
+
* the Test Suite or for Legacy code.
|
|
4991
|
+
*
|
|
4992
|
+
* @private
|
|
4993
|
+
*/
|
|
4994
|
+
|
|
4938
4995
|
function _flushNotification(cache, cacheKey, value, key) {
|
|
4939
4996
|
if (macroCondition(getGlobalConfig().WarpDrive.activeLogging.LOG_NOTIFICATIONS)) {
|
|
4940
4997
|
if (getGlobalConfig().WarpDrive.debug.LOG_NOTIFICATIONS || globalThis.getWarpDriveRuntimeConfig().debug.LOG_NOTIFICATIONS) {
|
|
@@ -5409,7 +5466,7 @@ function createRequestCollection(config) {
|
|
|
5409
5466
|
/**
|
|
5410
5467
|
* The options for {@link createLegacyLiveArray}
|
|
5411
5468
|
*
|
|
5412
|
-
* @
|
|
5469
|
+
* @private
|
|
5413
5470
|
*/
|
|
5414
5471
|
/**
|
|
5415
5472
|
* Creates a {@link LegacyLiveArray}
|
|
@@ -5564,7 +5621,7 @@ const SLICE_BATCH_SIZE = 4761;
|
|
|
5564
5621
|
* Sincerely,
|
|
5565
5622
|
* - runspired (Chris Thoburn) 08/21/2022
|
|
5566
5623
|
*
|
|
5567
|
-
* @
|
|
5624
|
+
* @private
|
|
5568
5625
|
* @param target the array to push into
|
|
5569
5626
|
* @param source the items to push into target
|
|
5570
5627
|
*/
|
|
@@ -5577,32 +5634,40 @@ function fastPush(target, source) {
|
|
|
5577
5634
|
target.push(...source);
|
|
5578
5635
|
}
|
|
5579
5636
|
/**
|
|
5580
|
-
@
|
|
5581
|
-
@
|
|
5637
|
+
@hideconstructor
|
|
5638
|
+
@private
|
|
5582
5639
|
*/
|
|
5583
5640
|
class RecordArrayManager {
|
|
5584
|
-
/**
|
|
5585
|
-
|
|
5586
|
-
|
|
5641
|
+
/** @internal */
|
|
5642
|
+
|
|
5643
|
+
/** @internal */
|
|
5644
|
+
|
|
5645
|
+
/** @internal */
|
|
5646
|
+
|
|
5647
|
+
/** @internal */
|
|
5587
5648
|
|
|
5588
5649
|
/**
|
|
5589
5650
|
* LiveArray (peekAll/findAll) array instances
|
|
5590
5651
|
* keyed by their ResourceType.
|
|
5591
|
-
*/
|
|
5592
|
-
|
|
5593
|
-
/**
|
|
5594
5652
|
*
|
|
5653
|
+
* @internal
|
|
5595
5654
|
*/
|
|
5596
5655
|
|
|
5656
|
+
/** @internal */
|
|
5657
|
+
|
|
5597
5658
|
/**
|
|
5598
5659
|
* Buffered changes to apply keyed by the array to
|
|
5599
5660
|
* which to apply them to.
|
|
5661
|
+
*
|
|
5662
|
+
* @internal
|
|
5600
5663
|
*/
|
|
5601
5664
|
|
|
5602
5665
|
/**
|
|
5603
5666
|
* An inverse map from ResourceKey to the list
|
|
5604
5667
|
* of arrays it can be found in, useful for fast updates
|
|
5605
5668
|
* when state changes to a resource occur.
|
|
5669
|
+
*
|
|
5670
|
+
* @internal
|
|
5606
5671
|
*/
|
|
5607
5672
|
|
|
5608
5673
|
/**
|
|
@@ -5612,10 +5677,17 @@ class RecordArrayManager {
|
|
|
5612
5677
|
*
|
|
5613
5678
|
* It's possible that using a Set and only storing additions instead of
|
|
5614
5679
|
* additions and deletes would be more efficient.
|
|
5680
|
+
*
|
|
5681
|
+
* @internal
|
|
5615
5682
|
*/
|
|
5616
5683
|
|
|
5684
|
+
/** @internal */
|
|
5685
|
+
|
|
5686
|
+
/** @internal */
|
|
5687
|
+
|
|
5617
5688
|
/**
|
|
5618
5689
|
* KeyedArrays are arrays associated to a specific RequestKey.
|
|
5690
|
+
* @internal
|
|
5619
5691
|
*/
|
|
5620
5692
|
|
|
5621
5693
|
/**
|
|
@@ -5627,6 +5699,7 @@ class RecordArrayManager {
|
|
|
5627
5699
|
* reduce its size by instead migrating to it functioning as
|
|
5628
5700
|
* an exclusion list. Any entry not in the list would be considered
|
|
5629
5701
|
* visible.
|
|
5702
|
+
* @internal
|
|
5630
5703
|
*/
|
|
5631
5704
|
|
|
5632
5705
|
constructor(options) {
|
|
@@ -5649,6 +5722,8 @@ class RecordArrayManager {
|
|
|
5649
5722
|
});
|
|
5650
5723
|
this._subscribeToResourceChanges();
|
|
5651
5724
|
}
|
|
5725
|
+
|
|
5726
|
+
/** @internal */
|
|
5652
5727
|
_subscribeToResourceChanges() {
|
|
5653
5728
|
this._subscription = this.store.notifications.subscribe('resource', (identifier, type) => {
|
|
5654
5729
|
const schema = this.store.schema.resource?.(identifier);
|
|
@@ -5671,6 +5746,8 @@ class RecordArrayManager {
|
|
|
5671
5746
|
}
|
|
5672
5747
|
});
|
|
5673
5748
|
}
|
|
5749
|
+
|
|
5750
|
+
/** @internal */
|
|
5674
5751
|
_syncArray(array) {
|
|
5675
5752
|
const pending = this._pending.get(array);
|
|
5676
5753
|
const isLegacyQuery = isLegacyQueryArray(array);
|
|
@@ -5714,9 +5791,7 @@ class RecordArrayManager {
|
|
|
5714
5791
|
/**
|
|
5715
5792
|
Get the `RecordArray` for a modelName, which contains all loaded records of
|
|
5716
5793
|
given modelName.
|
|
5717
|
-
@
|
|
5718
|
-
@param {String} modelName
|
|
5719
|
-
@return {RecordArray}
|
|
5794
|
+
@private
|
|
5720
5795
|
*/
|
|
5721
5796
|
liveArrayFor(type) {
|
|
5722
5797
|
let array = this._live.get(type);
|
|
@@ -5800,6 +5875,8 @@ class RecordArrayManager {
|
|
|
5800
5875
|
signal.value = shouldSyncFromCache ? 'cache-sync' : 'patch';
|
|
5801
5876
|
}
|
|
5802
5877
|
}
|
|
5878
|
+
|
|
5879
|
+
/** @internal */
|
|
5803
5880
|
_getPendingFor(identifier, includeManaged, isRemove) {
|
|
5804
5881
|
if (this.isDestroying || this.isDestroyed) {
|
|
5805
5882
|
return;
|
|
@@ -5848,6 +5925,10 @@ class RecordArrayManager {
|
|
|
5848
5925
|
}
|
|
5849
5926
|
return pending;
|
|
5850
5927
|
}
|
|
5928
|
+
|
|
5929
|
+
/**
|
|
5930
|
+
* @private
|
|
5931
|
+
*/
|
|
5851
5932
|
populateManagedArray(array, identifiers, payload) {
|
|
5852
5933
|
this._pending.delete(array);
|
|
5853
5934
|
const source = array[Context].source;
|
|
@@ -5869,6 +5950,8 @@ class RecordArrayManager {
|
|
|
5869
5950
|
disassociate(this._identifiers, array, old);
|
|
5870
5951
|
associate(this._identifiers, array, identifiers);
|
|
5871
5952
|
}
|
|
5953
|
+
|
|
5954
|
+
/** @internal */
|
|
5872
5955
|
identifierAdded(identifier) {
|
|
5873
5956
|
const changeSets = this._getPendingFor(identifier, false);
|
|
5874
5957
|
if (changeSets) {
|
|
@@ -5883,6 +5966,8 @@ class RecordArrayManager {
|
|
|
5883
5966
|
});
|
|
5884
5967
|
}
|
|
5885
5968
|
}
|
|
5969
|
+
|
|
5970
|
+
/** @internal */
|
|
5886
5971
|
identifierRemoved(identifier) {
|
|
5887
5972
|
const changeSets = this._getPendingFor(identifier, true, true);
|
|
5888
5973
|
if (changeSets) {
|
|
@@ -5897,6 +5982,8 @@ class RecordArrayManager {
|
|
|
5897
5982
|
});
|
|
5898
5983
|
}
|
|
5899
5984
|
}
|
|
5985
|
+
|
|
5986
|
+
/** @internal */
|
|
5900
5987
|
identifierChanged(identifier) {
|
|
5901
5988
|
const newState = this.store._instanceCache.recordIsLoaded(identifier, true);
|
|
5902
5989
|
|
|
@@ -5917,6 +6004,10 @@ class RecordArrayManager {
|
|
|
5917
6004
|
resume() {
|
|
5918
6005
|
this._subscribeToResourceChanges();
|
|
5919
6006
|
}
|
|
6007
|
+
|
|
6008
|
+
/**
|
|
6009
|
+
* @internal
|
|
6010
|
+
*/
|
|
5920
6011
|
clear(isClear = true) {
|
|
5921
6012
|
for (const array of this._live.values()) {
|
|
5922
6013
|
array.destroy(isClear);
|
|
@@ -5941,6 +6032,15 @@ class RecordArrayManager {
|
|
|
5941
6032
|
this.isDestroyed = true;
|
|
5942
6033
|
}
|
|
5943
6034
|
}
|
|
6035
|
+
|
|
6036
|
+
/**
|
|
6037
|
+
* This type exists for internal use only for
|
|
6038
|
+
* where intimate contracts still exist either for
|
|
6039
|
+
* the Test Suite or for Legacy code.
|
|
6040
|
+
*
|
|
6041
|
+
* @private
|
|
6042
|
+
*/
|
|
6043
|
+
|
|
5944
6044
|
function associate(ArraysCache, array, identifiers) {
|
|
5945
6045
|
for (let i = 0; i < identifiers.length; i++) {
|
|
5946
6046
|
const identifier = identifiers[i];
|
|
@@ -6035,9 +6135,13 @@ function hasRecordIdentifier(op) {
|
|
|
6035
6135
|
class RequestStateService {
|
|
6036
6136
|
/** @internal */
|
|
6037
6137
|
_pending = new Map();
|
|
6138
|
+
/** @internal */
|
|
6038
6139
|
_done = new Map();
|
|
6140
|
+
/** @internal */
|
|
6039
6141
|
_subscriptions = new Map();
|
|
6142
|
+
/** @internal */
|
|
6040
6143
|
_toFlush = [];
|
|
6144
|
+
/** @internal */
|
|
6041
6145
|
_store;
|
|
6042
6146
|
constructor(store) {
|
|
6043
6147
|
this._store = store;
|
|
@@ -6100,6 +6204,8 @@ class RequestStateService {
|
|
|
6100
6204
|
}
|
|
6101
6205
|
})() : {};
|
|
6102
6206
|
}
|
|
6207
|
+
|
|
6208
|
+
/** @internal */
|
|
6103
6209
|
_triggerSubscriptions(req) {
|
|
6104
6210
|
if (req.state === 'pending') {
|
|
6105
6211
|
this._flushRequest(req);
|
|
@@ -6112,6 +6218,8 @@ class RequestStateService {
|
|
|
6112
6218
|
});
|
|
6113
6219
|
}
|
|
6114
6220
|
}
|
|
6221
|
+
|
|
6222
|
+
/** @internal */
|
|
6115
6223
|
_flush() {
|
|
6116
6224
|
this._toFlush.forEach(req => {
|
|
6117
6225
|
this._flushRequest(req);
|
|
@@ -6217,6 +6325,14 @@ class RequestStateService {
|
|
|
6217
6325
|
}
|
|
6218
6326
|
}
|
|
6219
6327
|
|
|
6328
|
+
/**
|
|
6329
|
+
* This type exists for internal use only for
|
|
6330
|
+
* where intimate contracts still exist either for
|
|
6331
|
+
* the Test Suite or for Legacy code.
|
|
6332
|
+
*
|
|
6333
|
+
* @private
|
|
6334
|
+
*/
|
|
6335
|
+
|
|
6220
6336
|
// this import location is deprecated but breaks in 4.8 and older
|
|
6221
6337
|
// @ts-expect-error adding to globalThis
|
|
6222
6338
|
globalThis.setWarpDriveLogging = setLogging;
|
|
@@ -6519,14 +6635,16 @@ class Store extends BaseClass {
|
|
|
6519
6635
|
* @internal
|
|
6520
6636
|
*/
|
|
6521
6637
|
|
|
6522
|
-
|
|
6523
|
-
|
|
6638
|
+
/**
|
|
6639
|
+
* Available in DEBUG Only
|
|
6640
|
+
* @internal
|
|
6641
|
+
*/
|
|
6524
6642
|
|
|
6525
6643
|
/** @internal */
|
|
6526
6644
|
|
|
6527
6645
|
/** @internal */
|
|
6528
6646
|
|
|
6529
|
-
/** @
|
|
6647
|
+
/** @private */
|
|
6530
6648
|
get isDestroying() {
|
|
6531
6649
|
return this._isDestroying;
|
|
6532
6650
|
}
|
|
@@ -6534,7 +6652,7 @@ class Store extends BaseClass {
|
|
|
6534
6652
|
set isDestroying(value) {
|
|
6535
6653
|
this._isDestroying = value;
|
|
6536
6654
|
}
|
|
6537
|
-
/** @
|
|
6655
|
+
/** @private */
|
|
6538
6656
|
get isDestroyed() {
|
|
6539
6657
|
return this._isDestroyed;
|
|
6540
6658
|
}
|
|
@@ -7281,7 +7399,7 @@ class Store extends BaseClass {
|
|
|
7281
7399
|
return cache;
|
|
7282
7400
|
}
|
|
7283
7401
|
|
|
7284
|
-
/** @
|
|
7402
|
+
/** @private */
|
|
7285
7403
|
destroy() {
|
|
7286
7404
|
if (this.isDestroyed) {
|
|
7287
7405
|
// @ember/test-helpers will call destroy multiple times
|
|
@@ -7306,6 +7424,31 @@ class Store extends BaseClass {
|
|
|
7306
7424
|
return new this(args);
|
|
7307
7425
|
}
|
|
7308
7426
|
}
|
|
7427
|
+
|
|
7428
|
+
/**
|
|
7429
|
+
* This type exists for internal use only for
|
|
7430
|
+
* where intimate contracts still exist either for
|
|
7431
|
+
* the Test Suite or for Legacy code.
|
|
7432
|
+
*
|
|
7433
|
+
* @private
|
|
7434
|
+
*/
|
|
7435
|
+
|
|
7436
|
+
/**
|
|
7437
|
+
* Upgrade the type for Store to PrivateStore, which will also
|
|
7438
|
+
* upgrade any associated types to their private equivalents.
|
|
7439
|
+
*
|
|
7440
|
+
* @private
|
|
7441
|
+
*/
|
|
7442
|
+
function assertPrivateStore(store) {}
|
|
7443
|
+
/**
|
|
7444
|
+
* Upgrade the type for Store to PrivateStore, which will also
|
|
7445
|
+
* upgrade any associated types to their private equivalents.
|
|
7446
|
+
*
|
|
7447
|
+
* @private
|
|
7448
|
+
*/
|
|
7449
|
+
function isPrivateStore(store) {
|
|
7450
|
+
return store;
|
|
7451
|
+
}
|
|
7309
7452
|
if (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA_SERVICE)) {
|
|
7310
7453
|
Store.prototype.getSchemaDefinitionService = function () {
|
|
7311
7454
|
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
@@ -8527,12 +8670,12 @@ function constructResource(type, id, lid) {
|
|
|
8527
8670
|
/**
|
|
8528
8671
|
* The options for {@link createLegacyManyArray}
|
|
8529
8672
|
*
|
|
8530
|
-
* @
|
|
8673
|
+
* @private
|
|
8531
8674
|
*/
|
|
8532
8675
|
/**
|
|
8533
8676
|
* Creates a {@link LegacyManyArray}
|
|
8534
8677
|
*
|
|
8535
|
-
* @
|
|
8678
|
+
* @private
|
|
8536
8679
|
*/
|
|
8537
8680
|
function createLegacyManyArray(options) {
|
|
8538
8681
|
const extensions = options.store.schema.CAUTION_MEGA_DANGER_ZONE_arrayExtensions ? options.store.schema.CAUTION_MEGA_DANGER_ZONE_arrayExtensions(options.field) : null;
|
|
@@ -9186,7 +9329,10 @@ class RequestSubscription {
|
|
|
9186
9329
|
|
|
9187
9330
|
/** @internal */
|
|
9188
9331
|
|
|
9189
|
-
/**
|
|
9332
|
+
/**
|
|
9333
|
+
* The Store this subscription subscribes to or the RequestManager
|
|
9334
|
+
* which issues this request.
|
|
9335
|
+
*/
|
|
9190
9336
|
|
|
9191
9337
|
constructor(store, args) {
|
|
9192
9338
|
this._args = args;
|
|
@@ -10130,4 +10276,4 @@ function getRequestState(future) {
|
|
|
10130
10276
|
}
|
|
10131
10277
|
return state;
|
|
10132
10278
|
}
|
|
10133
|
-
export {
|
|
10279
|
+
export { defineNonEnumerableSignal as A, Signals as B, CacheHandler as C, DISPOSE as D, peekInternalSignal as E, withSignalStore as F, notifyInternalSignal as G, consumeInternalSignal as H, getOrCreateInternalSignal as I, ReactiveResource as J, isNonIdentityCacheableField as K, getFieldCacheKeyStrict as L, checkout as M, commit as N, setIdentifierGenerationMethod as O, setIdentifierUpdateMethod as P, setIdentifierForgetMethod as Q, RecordArrayManager as R, Store as S, setIdentifierResetMethod as T, setKeyInfoForResource as U, _clearCaches as _, isRequestKey as a, coerceId as b, constructResource as c, assertPrivateStore as d, ensureStringId as e, fastPush as f, isPrivateStore as g, assertPrivateCapabilities as h, isResourceKey as i, setRecordIdentifier as j, StoreMap as k, createLegacyManyArray as l, log as m, normalizeModelName as n, logGroup as o, getPromiseState as p, createRequestSubscription as q, recordIdentifierFor as r, storeFor as s, getRequestState as t, signal as u, memoized as v, gate as w, entangleSignal as x, defineSignal as y, defineGate as z };
|
package/dist/store/-private.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { C as CacheHandler, D as DISPOSE, R as RecordArrayManager,
|
|
2
|
-
export { A as ARRAY_SIGNAL, O as OBJECT_SIGNAL, c as createMemo, w as waitFor } from "../configure-
|
|
1
|
+
export { C as CacheHandler, D as DISPOSE, R as RecordArrayManager, B as Signals, S as Store, k as StoreMap, _ as _clearCaches, n as _deprecatingNormalize, h as assertPrivateCapabilities, d as assertPrivateStore, b as coerceId, c as constructResource, H as consumeInternalSignal, l as createLegacyManyArray, q as createRequestSubscription, z as defineGate, A as defineNonEnumerableSignal, y as defineSignal, e as ensureStringId, x as entangleSignal, f as fastPush, w as gate, I as getOrCreateInternalSignal, p as getPromiseState, t as getRequestState, g as isPrivateStore, a as isRequestKey, i as isResourceKey, m as log, o as logGroup, v as memoized, G as notifyInternalSignal, E as peekInternalSignal, r as recordIdentifierFor, j as setRecordIdentifier, u as signal, s as storeFor, F as withSignalStore } from "../request-state-B908BvPK.js";
|
|
2
|
+
export { A as ARRAY_SIGNAL, O as OBJECT_SIGNAL, c as createMemo, w as waitFor } from "../configure-CiFDHArV.js";
|
package/dist/types/-private.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
2
2
|
const name = "@warp-drive/core";
|
|
3
|
-
const version = "5.7.0-alpha.
|
|
3
|
+
const version = "5.7.0-alpha.29";
|
|
4
4
|
|
|
5
5
|
// in testing mode, we utilize globals to ensure only one copy exists of
|
|
6
6
|
// these maps, due to bugs in ember-auto-import
|
package/dist/utils/string.js
CHANGED
|
@@ -19,7 +19,7 @@ const DEFAULT_MAX_CACHE_SIZE = 10_000;
|
|
|
19
19
|
* and by `@warp-drive/utilities/string`. It is not intended
|
|
20
20
|
* for use outside of these modules at this time.
|
|
21
21
|
*
|
|
22
|
-
* @
|
|
22
|
+
* @private
|
|
23
23
|
*/
|
|
24
24
|
class LRUCache {
|
|
25
25
|
// debug stats
|
|
@@ -84,7 +84,7 @@ const STRING_DASHERIZE_CACHE = new LRUCache(key => key.replace(STRING_DECAMELIZE
|
|
|
84
84
|
* This version is only in this location to support a deprecated
|
|
85
85
|
* behavior in the core package and will be removed in a future.
|
|
86
86
|
*
|
|
87
|
-
* @
|
|
87
|
+
* @private
|
|
88
88
|
*/
|
|
89
89
|
function dasherize(str) {
|
|
90
90
|
return STRING_DASHERIZE_CACHE.get(str);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warp-drive/core",
|
|
3
|
-
"version": "5.7.0-alpha.
|
|
3
|
+
"version": "5.7.0-alpha.29",
|
|
4
4
|
"description": "Core package for WarpDrive | All the Universal Basics",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -37,13 +37,13 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@embroider/macros": "^1.16.12",
|
|
40
|
-
"@warp-drive/build-config": "5.7.0-alpha.
|
|
40
|
+
"@warp-drive/build-config": "5.7.0-alpha.29"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@babel/core": "^7.26.10",
|
|
44
44
|
"@babel/plugin-transform-typescript": "^7.27.0",
|
|
45
45
|
"@babel/preset-typescript": "^7.27.0",
|
|
46
|
-
"@warp-drive/internal-config": "5.7.0-alpha.
|
|
46
|
+
"@warp-drive/internal-config": "5.7.0-alpha.29",
|
|
47
47
|
"decorator-transforms": "^2.3.0",
|
|
48
48
|
"ember-source": "~6.3.0",
|
|
49
49
|
"expect-type": "^1.2.1",
|