@warp-drive/core 5.7.0-alpha.3 → 5.7.0-alpha.31
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 +7 -20
- package/declarations/graph/-private/-edge-definition.d.ts +3 -12
- package/declarations/graph/-private/-state.d.ts +2 -2
- package/declarations/graph/-private/-utils.d.ts +5 -5
- package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +3 -3
- package/declarations/graph/-private/edges/collection.d.ts +10 -10
- package/declarations/graph/-private/edges/implicit.d.ts +5 -5
- package/declarations/graph/-private/edges/resource.d.ts +6 -7
- package/declarations/graph/-private/graph.d.ts +17 -15
- package/declarations/graph/-private/operations/replace-related-records.d.ts +4 -4
- package/declarations/graph/-private/operations/update-relationship.d.ts +3 -3
- package/declarations/index.d.ts +1 -1
- package/declarations/reactive/-private/default-mode.d.ts +73 -0
- package/declarations/reactive/-private/document.d.ts +11 -21
- package/declarations/reactive/-private/fields/get-field-key.d.ts +8 -0
- package/declarations/reactive/-private/fields/managed-array.d.ts +7 -10
- package/declarations/reactive/-private/fields/managed-object.d.ts +7 -9
- package/declarations/reactive/-private/fields/many-array-manager.d.ts +2 -2
- package/declarations/reactive/-private/hooks.d.ts +2 -2
- package/declarations/reactive/-private/kind/alias-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/array-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/attribute-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/belongs-to-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/collection-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/derived-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/generic-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/has-many-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/hash-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/identity-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/local-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/object-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/resource-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/schema-array-field.d.ts +4 -0
- package/declarations/reactive/-private/kind/schema-object-field.d.ts +4 -0
- package/declarations/reactive/-private/record.d.ts +44 -33
- package/declarations/reactive/-private/schema.d.ts +16 -72
- package/declarations/reactive/-private/symbols.d.ts +2 -7
- package/declarations/reactive/-private.d.ts +1 -1
- package/declarations/reactive.d.ts +278 -1
- package/declarations/request/-private/context.d.ts +3 -3
- package/declarations/request/-private/fetch.d.ts +2 -0
- package/declarations/request/-private/manager.d.ts +24 -28
- package/declarations/request/-private/types.d.ts +22 -23
- package/declarations/request/-private/utils.d.ts +44 -2
- package/declarations/store/-private/cache-handler/handler.d.ts +2 -8
- package/declarations/store/-private/cache-handler/types.d.ts +10 -10
- package/declarations/store/-private/cache-handler/utils.d.ts +4 -4
- package/declarations/store/-private/caches/instance-cache.d.ts +21 -19
- package/declarations/store/-private/debug/utils.d.ts +1 -0
- package/declarations/store/-private/default-cache-policy.d.ts +25 -38
- package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +24 -15
- package/declarations/store/-private/{caches/identifier-cache.d.ts → managers/cache-key-manager.d.ts} +38 -52
- package/declarations/store/-private/managers/cache-manager.d.ts +47 -95
- package/declarations/store/-private/managers/notification-manager.d.ts +30 -42
- package/declarations/store/-private/managers/record-array-manager.d.ts +45 -41
- package/declarations/store/-private/network/request-cache.d.ts +21 -21
- package/declarations/store/-private/new-core-tmp/expensive-subscription.d.ts +24 -0
- package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +3 -41
- package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +14 -29
- package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +24 -3
- package/declarations/store/-private/new-core-tmp/request-state.d.ts +129 -22
- package/declarations/store/-private/new-core-tmp/request-subscription.d.ts +51 -123
- package/declarations/store/-private/record-arrays/-utils.d.ts +80 -0
- package/declarations/store/-private/record-arrays/legacy-live-array.d.ts +81 -0
- package/declarations/store/-private/record-arrays/legacy-many-array.d.ts +133 -0
- package/declarations/store/-private/record-arrays/legacy-query.d.ts +81 -0
- package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +1 -124
- package/declarations/store/-private/record-arrays/resource-array.d.ts +75 -0
- package/declarations/store/-private/store-service.d.ts +156 -101
- package/declarations/store/-private.d.ts +12 -9
- package/declarations/store/-types/q/cache-capabilities-manager.d.ts +15 -24
- package/declarations/store/-types/q/identifier.d.ts +9 -6
- package/declarations/store/-types/q/record-instance.d.ts +0 -1
- package/declarations/store/-types/q/schema-service.d.ts +28 -40
- package/declarations/store/-types/q/store.d.ts +6 -7
- package/declarations/store/deprecated/-private.d.ts +12 -23
- package/declarations/store/deprecated/store.d.ts +11 -12
- package/declarations/types/-private.d.ts +1 -1
- package/declarations/types/cache/aliases.d.ts +2 -2
- package/declarations/types/cache/change.d.ts +2 -2
- package/declarations/types/cache/mutations.d.ts +13 -13
- package/declarations/types/cache/operations.d.ts +115 -32
- package/declarations/types/cache/relationship.d.ts +4 -4
- package/declarations/types/cache.d.ts +51 -113
- package/declarations/types/graph.d.ts +12 -12
- package/declarations/types/identifier.d.ts +52 -76
- package/declarations/types/params.d.ts +2 -3
- package/declarations/types/request.d.ts +69 -42
- package/declarations/types/schema/concepts.d.ts +2 -2
- package/declarations/types/schema/fields.d.ts +378 -14
- package/declarations/types/spec/document.d.ts +6 -6
- 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-C3x8YXzL.js} +5 -5
- package/dist/configure.js +1 -1
- package/dist/{context-COmAnXUQ.js → context-Bh-MA_tH.js} +40 -6
- package/dist/graph/-private.js +137 -144
- package/dist/index.js +25 -14
- package/dist/reactive/-private.js +1 -1
- package/dist/reactive.js +203 -1413
- package/dist/{request-state-CejVJgdj.js → request-state-DGyt5EV8.js} +5674 -2812
- package/dist/request.js +1 -1
- package/dist/store/-private.js +2 -3
- package/dist/store.js +32 -44
- package/dist/{symbols-SIstXMLI.js → symbols-sql1_mdx.js} +3 -8
- package/dist/types/-private.js +1 -1
- package/dist/types/identifier.js +19 -45
- package/dist/types/request.js +45 -3
- package/dist/types/schema/fields.js +23 -2
- package/dist/utils/string.js +2 -2
- package/package.json +10 -10
- package/declarations/reactive/-private/fields/compute.d.ts +0 -43
- package/declarations/store/-private/caches/cache-utils.d.ts +0 -12
- package/declarations/store/-private/record-arrays/identifier-array.d.ts +0 -147
- package/declarations/store/-private/record-arrays/many-array.d.ts +0 -197
- package/dist/handler-D2jjnIA-.js +0 -339
|
@@ -39,7 +39,7 @@ const OBJECT_SIGNAL = getOrSetGlobal('#{}', Symbol('#{}'));
|
|
|
39
39
|
*
|
|
40
40
|
* It may be an array of signals or a single signal.
|
|
41
41
|
*
|
|
42
|
-
* @
|
|
42
|
+
* @private
|
|
43
43
|
*/
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -112,7 +112,7 @@ function setupSignals(buildConfig) {
|
|
|
112
112
|
/**
|
|
113
113
|
* Internal method for consuming the configured `createSignal` hook
|
|
114
114
|
*
|
|
115
|
-
* @
|
|
115
|
+
* @private
|
|
116
116
|
*/
|
|
117
117
|
function createSignal(obj, key) {
|
|
118
118
|
const signalHooks = peekTransient('signalHooks');
|
|
@@ -127,7 +127,7 @@ function createSignal(obj, key) {
|
|
|
127
127
|
/**
|
|
128
128
|
* Internal method for consuming the configured `consumeSignal` hook
|
|
129
129
|
*
|
|
130
|
-
* @
|
|
130
|
+
* @private
|
|
131
131
|
*/
|
|
132
132
|
function consumeSignal(signal) {
|
|
133
133
|
const signalHooks = peekTransient('signalHooks');
|
|
@@ -142,7 +142,7 @@ function consumeSignal(signal) {
|
|
|
142
142
|
/**
|
|
143
143
|
* Internal method for consuming the configured `notifySignal` hook
|
|
144
144
|
*
|
|
145
|
-
* @
|
|
145
|
+
* @private
|
|
146
146
|
*/
|
|
147
147
|
function notifySignal(signal) {
|
|
148
148
|
const signalHooks = peekTransient('signalHooks');
|
|
@@ -178,4 +178,4 @@ function waitFor(promise) {
|
|
|
178
178
|
}
|
|
179
179
|
return promise;
|
|
180
180
|
}
|
|
181
|
-
export { ARRAY_SIGNAL as A, OBJECT_SIGNAL as O,
|
|
181
|
+
export { ARRAY_SIGNAL as A, OBJECT_SIGNAL as O, consumeSignal as a, createMemo as b, createSignal as c, willSyncFlushWatchers as d, notifySignal as n, setupSignals as s, waitFor as w };
|
package/dist/configure.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as setupSignals } from "./configure-
|
|
1
|
+
export { s as setupSignals } from "./configure-C3x8YXzL.js";
|
|
@@ -306,6 +306,19 @@ function ensureDoc(owner, content, isError) {
|
|
|
306
306
|
content: content
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Additional properties exposed on errors thrown by the
|
|
312
|
+
* {@link Fetch | Fetch Handler}.
|
|
313
|
+
*
|
|
314
|
+
* In the case of an Abort or system/browser level issue,
|
|
315
|
+
* this extends {@link DOMException}.
|
|
316
|
+
*
|
|
317
|
+
* Else it extends from {@link AggregateError} if the
|
|
318
|
+
* response includes an array of errors, falling back
|
|
319
|
+
* to {@link Error} as its base.
|
|
320
|
+
*/
|
|
321
|
+
|
|
309
322
|
function enhanceReason(reason) {
|
|
310
323
|
return new DOMException(reason || 'The user aborted a request.', 'AbortError');
|
|
311
324
|
}
|
|
@@ -437,6 +450,17 @@ function upgradePromise(promise, future) {
|
|
|
437
450
|
promise.onFinalize = future.onFinalize;
|
|
438
451
|
promise.id = future.id;
|
|
439
452
|
promise.lid = future.lid;
|
|
453
|
+
promise.requester = future.requester;
|
|
454
|
+
if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
|
|
455
|
+
// @ts-expect-error
|
|
456
|
+
promise.toJSON = () => {
|
|
457
|
+
const id = 'Future<' + promise.id + '>';
|
|
458
|
+
if (promise.lid) {
|
|
459
|
+
return `${id} (${promise.lid.lid})`;
|
|
460
|
+
}
|
|
461
|
+
return id;
|
|
462
|
+
};
|
|
463
|
+
}
|
|
440
464
|
return promise;
|
|
441
465
|
}
|
|
442
466
|
function createFuture(owner) {
|
|
@@ -464,6 +488,17 @@ function createFuture(owner) {
|
|
|
464
488
|
};
|
|
465
489
|
promise.id = owner.requestId;
|
|
466
490
|
promise.lid = owner.god.identifier;
|
|
491
|
+
promise.requester = owner.god.requester;
|
|
492
|
+
if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
|
|
493
|
+
// @ts-expect-error
|
|
494
|
+
promise.toJSON = () => {
|
|
495
|
+
const id = 'Future<' + promise.id + '>';
|
|
496
|
+
if (promise.lid) {
|
|
497
|
+
return `${id} (${promise.lid.lid})`;
|
|
498
|
+
}
|
|
499
|
+
return id;
|
|
500
|
+
};
|
|
501
|
+
}
|
|
467
502
|
deferred.promise = promise;
|
|
468
503
|
return deferred;
|
|
469
504
|
}
|
|
@@ -604,19 +639,18 @@ class ContextOwner {
|
|
|
604
639
|
}
|
|
605
640
|
}
|
|
606
641
|
class Context {
|
|
607
|
-
#owner;
|
|
608
642
|
constructor(owner, isCacheHandler) {
|
|
609
643
|
this.id = owner.requestId;
|
|
610
|
-
this
|
|
644
|
+
this.___owner = owner;
|
|
611
645
|
this.request = owner.enhancedRequest;
|
|
612
646
|
this._isCacheHandler = isCacheHandler;
|
|
613
647
|
this._finalized = false;
|
|
614
648
|
}
|
|
615
649
|
setStream(stream) {
|
|
616
|
-
this
|
|
650
|
+
this.___owner.setStream(stream);
|
|
617
651
|
}
|
|
618
652
|
setResponse(response) {
|
|
619
|
-
this
|
|
653
|
+
this.___owner.setResponse(response);
|
|
620
654
|
}
|
|
621
655
|
setIdentifier(identifier) {
|
|
622
656
|
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
@@ -624,10 +658,10 @@ class Context {
|
|
|
624
658
|
throw new Error(`setIdentifier may only be used synchronously from a CacheHandler`);
|
|
625
659
|
}
|
|
626
660
|
})(identifier && this._isCacheHandler && !this._finalized) : {};
|
|
627
|
-
this
|
|
661
|
+
this.___owner.god.identifier = identifier;
|
|
628
662
|
}
|
|
629
663
|
get hasRequestedStream() {
|
|
630
|
-
return this
|
|
664
|
+
return this.___owner.hasRequestedStream;
|
|
631
665
|
}
|
|
632
666
|
_finalize() {
|
|
633
667
|
this._finalized = true;
|