@warp-drive/core 5.7.0-alpha.26 → 5.7.0-alpha.28
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/context.d.ts +1 -1
- package/declarations/request/-private/manager.d.ts +21 -18
- 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/cache-manager.d.ts +1 -1
- 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 +3 -111
- 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/{context-DbdT1mON.js → context-Bh-MA_tH.js} +5 -6
- package/dist/graph/-private.js +2 -5
- package/dist/index.js +17 -8
- package/dist/reactive.js +5 -5
- package/dist/{request-state-CqVrgUM0.js → request-state-B908BvPK.js} +219 -73
- package/dist/request.js +1 -1
- 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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Graph } from "../../graph/-private.js";
|
|
2
2
|
import type { Future } from "../../request.js";
|
|
3
|
-
import type { RequestManager } from "../../request/-private/manager.js";
|
|
3
|
+
import type { PrivateRequestManager, RequestManager } from "../../request/-private/manager.js";
|
|
4
4
|
import type { Cache } from "../../types/cache.js";
|
|
5
5
|
import type { PersistedResourceKey, ResourceKey } from "../../types/identifier.js";
|
|
6
6
|
import type { TypedRecordInstance, TypeFromInstance } from "../../types/record.js";
|
|
@@ -12,9 +12,12 @@ import type { SchemaService } from "../-types/q/schema-service.js";
|
|
|
12
12
|
import type { StoreRequestInput } from "./cache-handler/handler.js";
|
|
13
13
|
import type { CachePolicy } from "./cache-handler/types.js";
|
|
14
14
|
import { InstanceCache, storeFor } from "./caches/instance-cache.js";
|
|
15
|
+
import type { PrivateCacheKeyManager } from "./managers/cache-key-manager.js";
|
|
15
16
|
import { CacheKeyManager } from "./managers/cache-key-manager.js";
|
|
17
|
+
import type { PrivateNotificationManager } from "./managers/notification-manager.js";
|
|
16
18
|
import NotificationManager from "./managers/notification-manager.js";
|
|
17
|
-
import {
|
|
19
|
+
import type { PrivateRecordArrayManager } from "./managers/record-array-manager.js";
|
|
20
|
+
import type { PrivateRequestStateService } from "./network/request-cache.js";
|
|
18
21
|
import { RequestStateService } from "./network/request-cache.js";
|
|
19
22
|
import type { LegacyLiveArray } from "./record-arrays/legacy-live-array.js";
|
|
20
23
|
export { storeFor };
|
|
@@ -147,7 +150,6 @@ export interface Store {
|
|
|
147
150
|
* be sourced from directly registered schemas, then will fallback
|
|
148
151
|
* to sourcing a schema from available models if no schema is found.
|
|
149
152
|
*
|
|
150
|
-
* @return {SchemaService}
|
|
151
153
|
* @public
|
|
152
154
|
*/
|
|
153
155
|
createSchemaService(): SchemaService;
|
|
@@ -292,8 +294,6 @@ export interface Store {
|
|
|
292
294
|
* @hideconstructor
|
|
293
295
|
*/
|
|
294
296
|
export declare class Store extends BaseClass {
|
|
295
|
-
/** @internal */
|
|
296
|
-
readonly recordArrayManager: RecordArrayManager;
|
|
297
297
|
/**
|
|
298
298
|
* Provides access to the NotificationManager associated
|
|
299
299
|
* with this Store instance.
|
|
@@ -314,8 +314,6 @@ export declare class Store extends BaseClass {
|
|
|
314
314
|
* @public
|
|
315
315
|
*/
|
|
316
316
|
get schema(): ReturnType<this["createSchemaService"]>;
|
|
317
|
-
/** @internal */
|
|
318
|
-
_schema: SchemaService;
|
|
319
317
|
/**
|
|
320
318
|
* Provides access to the CacheKeyManager
|
|
321
319
|
* for this store.
|
|
@@ -380,67 +378,16 @@ export declare class Store extends BaseClass {
|
|
|
380
378
|
* @public
|
|
381
379
|
*/
|
|
382
380
|
lifetimes?: CachePolicy;
|
|
383
|
-
|
|
384
|
-
/** @internal */
|
|
385
|
-
_graph?: Graph;
|
|
386
|
-
/** @internal */
|
|
387
|
-
_requestCache: RequestStateService;
|
|
388
|
-
/** @internal */
|
|
389
|
-
_instanceCache: InstanceCache;
|
|
390
|
-
/** @internal */
|
|
391
|
-
_cbs: {
|
|
392
|
-
coalesce?: () => void;
|
|
393
|
-
sync?: () => void;
|
|
394
|
-
notify?: () => void;
|
|
395
|
-
} | null;
|
|
396
|
-
/** @internal */
|
|
397
|
-
_forceShim: boolean;
|
|
398
|
-
/**
|
|
399
|
-
* Async flush buffers notifications until flushed
|
|
400
|
-
* by finalization of a future configured by store.request
|
|
401
|
-
*
|
|
402
|
-
* This is useful for ensuring that notifications are delivered
|
|
403
|
-
* prior to the promise resolving but without risk of promise
|
|
404
|
-
* interleaving.
|
|
405
|
-
*
|
|
406
|
-
* @internal
|
|
407
|
-
*/
|
|
408
|
-
_enableAsyncFlush: boolean | null;
|
|
409
|
-
// DEBUG-only properties
|
|
410
|
-
/** @internal */
|
|
411
|
-
DISABLE_WAITER?: boolean;
|
|
412
|
-
/** @internal */
|
|
413
|
-
_isDestroying: boolean;
|
|
414
|
-
/** @internal */
|
|
415
|
-
_isDestroyed: boolean;
|
|
416
|
-
/** @internal */
|
|
381
|
+
/** @private */
|
|
417
382
|
get isDestroying(): boolean;
|
|
418
|
-
/** @
|
|
419
|
-
set isDestroying(value: boolean);
|
|
420
|
-
/** @internal */
|
|
383
|
+
/** @private */
|
|
421
384
|
get isDestroyed(): boolean;
|
|
422
|
-
/** @internal */
|
|
423
|
-
set isDestroyed(value: boolean);
|
|
424
385
|
/** @deprecated use {@link Store.cacheKeyManager} */
|
|
425
386
|
get identifierCache(): CacheKeyManager;
|
|
426
387
|
/**
|
|
427
388
|
@private
|
|
428
389
|
*/
|
|
429
390
|
constructor(createArgs?: unknown);
|
|
430
|
-
/** @internal */
|
|
431
|
-
_run(cb: () => void): void;
|
|
432
|
-
/**
|
|
433
|
-
* Executes the callback, ensurng that any work that calls
|
|
434
|
-
* store._schedule is executed after in the right order.
|
|
435
|
-
*
|
|
436
|
-
* When queues already exist, scheduled callbacks will
|
|
437
|
-
* join the existing queue.
|
|
438
|
-
*
|
|
439
|
-
* @internal
|
|
440
|
-
*/
|
|
441
|
-
_join(cb: () => void): void;
|
|
442
|
-
/** @internal */
|
|
443
|
-
_schedule(name: "coalesce" | "sync" | "notify", cb: () => void): void;
|
|
444
391
|
/**
|
|
445
392
|
* Retrieve the RequestStateService instance
|
|
446
393
|
* associated with this Store.
|
|
@@ -452,10 +399,6 @@ export declare class Store extends BaseClass {
|
|
|
452
399
|
* @public
|
|
453
400
|
*/
|
|
454
401
|
getRequestStateService(): RequestStateService;
|
|
455
|
-
/** @internal */
|
|
456
|
-
_getAllPending(): (Promise<unknown[]> & {
|
|
457
|
-
length: number;
|
|
458
|
-
}) | void;
|
|
459
402
|
/**
|
|
460
403
|
* ::: tip 💡 For a more complete overview see the [Request Guide](/guides/2-requests/1-overview)
|
|
461
404
|
* :::
|
|
@@ -876,7 +819,7 @@ export declare class Store extends BaseClass {
|
|
|
876
819
|
* @public
|
|
877
820
|
*/
|
|
878
821
|
get cache(): ReturnType<this["createCache"]>;
|
|
879
|
-
/** @
|
|
822
|
+
/** @private */
|
|
880
823
|
destroy(): void;
|
|
881
824
|
/**
|
|
882
825
|
* This method
|
|
@@ -885,4 +828,73 @@ export declare class Store extends BaseClass {
|
|
|
885
828
|
*/
|
|
886
829
|
static create(args?: Record<string, unknown>): Store;
|
|
887
830
|
}
|
|
831
|
+
/**
|
|
832
|
+
* This type exists for internal use only for
|
|
833
|
+
* where intimate contracts still exist either for
|
|
834
|
+
* the Test Suite or for Legacy code.
|
|
835
|
+
*
|
|
836
|
+
* @private
|
|
837
|
+
*/
|
|
838
|
+
export interface PrivateStore extends Store {
|
|
839
|
+
readonly recordArrayManager: PrivateRecordArrayManager;
|
|
840
|
+
notifications: PrivateNotificationManager;
|
|
841
|
+
requestManager: PrivateRequestManager;
|
|
842
|
+
cacheKeyManager: PrivateCacheKeyManager;
|
|
843
|
+
_schema: SchemaService;
|
|
844
|
+
_graph?: Graph;
|
|
845
|
+
_requestCache: PrivateRequestStateService;
|
|
846
|
+
getRequestStateService(): PrivateRequestStateService;
|
|
847
|
+
_instanceCache: InstanceCache;
|
|
848
|
+
_cbs: {
|
|
849
|
+
coalesce?: () => void;
|
|
850
|
+
sync?: () => void;
|
|
851
|
+
notify?: () => void;
|
|
852
|
+
} | null;
|
|
853
|
+
_forceShim: boolean;
|
|
854
|
+
/**
|
|
855
|
+
* Async flush buffers notifications until flushed
|
|
856
|
+
* by finalization of a future configured by store.request
|
|
857
|
+
*
|
|
858
|
+
* This is useful for ensuring that notifications are delivered
|
|
859
|
+
* prior to the promise resolving but without risk of promise
|
|
860
|
+
* interleaving.
|
|
861
|
+
*/
|
|
862
|
+
_enableAsyncFlush: boolean | null;
|
|
863
|
+
/**
|
|
864
|
+
* Available in DEBUG Only
|
|
865
|
+
*/
|
|
866
|
+
DISABLE_WAITER?: boolean;
|
|
867
|
+
_isDestroying: boolean;
|
|
868
|
+
_isDestroyed: boolean;
|
|
869
|
+
isDestroying: boolean;
|
|
870
|
+
isDestroyed: boolean;
|
|
871
|
+
_run(cb: () => void): void;
|
|
872
|
+
/**
|
|
873
|
+
* Executes the callback, ensurng that any work that calls
|
|
874
|
+
* store._schedule is executed after in the right order.
|
|
875
|
+
*
|
|
876
|
+
* When queues already exist, scheduled callbacks will
|
|
877
|
+
* join the existing queue.
|
|
878
|
+
*
|
|
879
|
+
*/
|
|
880
|
+
_join(cb: () => void): void;
|
|
881
|
+
_schedule(name: "coalesce" | "sync" | "notify", cb: () => void): void;
|
|
882
|
+
_getAllPending(): (Promise<unknown[]> & {
|
|
883
|
+
length: number;
|
|
884
|
+
}) | void;
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
887
|
+
* Upgrade the type for Store to PrivateStore, which will also
|
|
888
|
+
* upgrade any associated types to their private equivalents.
|
|
889
|
+
*
|
|
890
|
+
* @private
|
|
891
|
+
*/
|
|
892
|
+
export declare function assertPrivateStore(store: unknown): asserts store is PrivateStore;
|
|
893
|
+
/**
|
|
894
|
+
* Upgrade the type for Store to PrivateStore, which will also
|
|
895
|
+
* upgrade any associated types to their private equivalents.
|
|
896
|
+
*
|
|
897
|
+
* @private
|
|
898
|
+
*/
|
|
899
|
+
export declare function isPrivateStore(store: unknown): PrivateStore;
|
|
888
900
|
export declare function isMaybeIdentifier(maybeIdentifier: string | ResourceIdentifierObject): maybeIdentifier is ResourceIdentifierObject;
|
|
@@ -12,10 +12,13 @@ export type { CreateRecordProperties } from "./-private/store-service.js";
|
|
|
12
12
|
// to also eliminate
|
|
13
13
|
export { coerceId, ensureStringId } from "./-private/utils/coerce-id.js";
|
|
14
14
|
export type { NativeProxy } from "./-private/record-arrays/native-proxy-type-fix.js";
|
|
15
|
-
export { type ReactiveResourceArray } from "./-private/record-arrays/resource-array.js";
|
|
15
|
+
export { type ReactiveResourceArray, type PrivateReactiveResourceArray } from "./-private/record-arrays/resource-array.js";
|
|
16
16
|
export { type LegacyLiveArray, type LegacyLiveArray as LiveArray } from "./-private/record-arrays/legacy-live-array.js";
|
|
17
17
|
export { type LegacyQueryArray, type LegacyQueryArray as CollectionRecordArray } from "./-private/record-arrays/legacy-query.js";
|
|
18
18
|
export { RecordArrayManager, fastPush } from "./-private/managers/record-array-manager.js";
|
|
19
|
+
// leaked for test/legacy use. You will get in trouble for this.
|
|
20
|
+
export { assertPrivateStore, isPrivateStore, type PrivateStore } from "./-private/store-service.js";
|
|
21
|
+
export { assertPrivateCapabilities, type PrivateCacheCapabilitiesManager } from "./-private/managers/cache-capabilities-manager.js";
|
|
19
22
|
// leaked for private use / test use, should investigate removing
|
|
20
23
|
export { _clearCaches } from "./-private/caches/instance-cache.js";
|
|
21
24
|
// @ember-data/model needs these temporarily
|
|
@@ -64,18 +64,7 @@ addon authors to perform meta-operations on a record.
|
|
|
64
64
|
@public
|
|
65
65
|
*/
|
|
66
66
|
export declare class RecordReference {
|
|
67
|
-
/** @internal */
|
|
68
|
-
private store;
|
|
69
|
-
// unsubscribe token given to us by the notification manager
|
|
70
|
-
/** @internal */
|
|
71
|
-
private ___token;
|
|
72
|
-
/** @internal */
|
|
73
|
-
private ___identifier;
|
|
74
|
-
/** @internal */
|
|
75
|
-
private _ref;
|
|
76
67
|
constructor(store: Store, identifier: ResourceKey);
|
|
77
|
-
/** @internal */
|
|
78
|
-
destroy(): void;
|
|
79
68
|
get type(): string;
|
|
80
69
|
/**
|
|
81
70
|
The `id` of the record that this reference refers to.
|
|
@@ -17,8 +17,6 @@ export type CacheKeyType = "record" | "document";
|
|
|
17
17
|
export interface RequestKey {
|
|
18
18
|
lid: string;
|
|
19
19
|
type: "@document";
|
|
20
|
-
/** @internal */
|
|
21
|
-
[CACHE_OWNER]: number | undefined;
|
|
22
20
|
}
|
|
23
21
|
/** @deprecated use {@link RequestKey} */
|
|
24
22
|
export type StableDocumentIdentifier = RequestKey;
|
|
@@ -38,12 +36,6 @@ interface ResourceKeyBase<T extends string = string> {
|
|
|
38
36
|
* @public
|
|
39
37
|
*/
|
|
40
38
|
type: T;
|
|
41
|
-
/** @internal */
|
|
42
|
-
[CACHE_OWNER]: number | undefined;
|
|
43
|
-
/** @internal */
|
|
44
|
-
[DEBUG_CLIENT_ORIGINATED]?: boolean;
|
|
45
|
-
/** @internal */
|
|
46
|
-
[DEBUG_STALE_CACHE_OWNER]?: number | undefined;
|
|
47
39
|
}
|
|
48
40
|
/**
|
|
49
41
|
* Used when a ResourceKey was not created locally as part
|
|
@@ -23,7 +23,8 @@ export interface PaginationLinks extends Links {
|
|
|
23
23
|
* to address data that may not be available synchronously.
|
|
24
24
|
*
|
|
25
25
|
* [JSON:API Spec](https://jsonapi.org/format/#document-resource-identifier-objects)
|
|
26
|
-
*
|
|
26
|
+
*
|
|
27
|
+
* @private
|
|
27
28
|
*/
|
|
28
29
|
export interface ExistingResourceIdentifierObject<T extends string = string> {
|
|
29
30
|
id: string;
|
|
@@ -42,7 +43,7 @@ export interface ExistingResourceIdentifierObject<T extends string = string> {
|
|
|
42
43
|
* is `lid` considered optional.
|
|
43
44
|
*
|
|
44
45
|
* [Identifiers RFC](https://github.com/emberjs/rfcs/blob/main/text/0403-ember-data-identifiers.md#ember-data--identifiers)
|
|
45
|
-
*
|
|
46
|
+
*
|
|
46
47
|
*/
|
|
47
48
|
lid?: string;
|
|
48
49
|
/**
|
|
@@ -50,7 +51,7 @@ export interface ExistingResourceIdentifierObject<T extends string = string> {
|
|
|
50
51
|
* `ember-data` ignores `meta` on `ResourceIdentifierObjects`
|
|
51
52
|
*
|
|
52
53
|
* @ignored this property goes un-utilized and will be lost
|
|
53
|
-
* @
|
|
54
|
+
* @private
|
|
54
55
|
*/
|
|
55
56
|
meta?: Meta;
|
|
56
57
|
}
|
|
@@ -58,7 +59,7 @@ export interface ExistingResourceIdentifierObject<T extends string = string> {
|
|
|
58
59
|
* Serves as a reference to a resource created on the client
|
|
59
60
|
* but not yet persisted.
|
|
60
61
|
*
|
|
61
|
-
* @
|
|
62
|
+
* @private
|
|
62
63
|
*/
|
|
63
64
|
export interface NewResourceIdentifierObject<T extends string = string> {
|
|
64
65
|
/**
|
|
@@ -68,14 +69,12 @@ export interface NewResourceIdentifierObject<T extends string = string> {
|
|
|
68
69
|
*
|
|
69
70
|
* `id` will be `null` in this case.
|
|
70
71
|
*
|
|
71
|
-
* @internal
|
|
72
72
|
*/
|
|
73
73
|
id: string | null;
|
|
74
74
|
type: T;
|
|
75
75
|
/**
|
|
76
76
|
* Resources newly created on the client _will always_
|
|
77
77
|
* have an `lid` assigned immediately and available.
|
|
78
|
-
* @internal
|
|
79
78
|
*/
|
|
80
79
|
lid: string;
|
|
81
80
|
}
|
|
@@ -98,7 +97,6 @@ export type InnerRelationshipDocument<T = ExistingResourceIdentifierObject | New
|
|
|
98
97
|
export type ResourceRelationshipsObject<T = ExistingResourceIdentifierObject | NewResourceIdentifierObject> = Record<string, InnerRelationshipDocument<T>>;
|
|
99
98
|
/**
|
|
100
99
|
* Contains the data for an existing resource in JSON:API format
|
|
101
|
-
* @internal
|
|
102
100
|
*/
|
|
103
101
|
export interface ExistingResourceObject<T extends string = string> extends ExistingResourceIdentifierObject<T> {
|
|
104
102
|
meta?: Meta;
|
|
@@ -136,7 +134,7 @@ export type CollectionResourceDocument<T extends string = string> = Document & {
|
|
|
136
134
|
* These documents should follow the JSON:API spec but do not
|
|
137
135
|
* have the same level of guarantees as their `spec` counterparts.
|
|
138
136
|
*
|
|
139
|
-
* @
|
|
137
|
+
* @private
|
|
140
138
|
*/
|
|
141
139
|
export type JsonApiDocument<T extends string = string> = EmptyResourceDocument | SingleResourceDocument<T> | CollectionResourceDocument<T>;
|
|
142
140
|
export {};
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* and by `@warp-drive/utilities/string`. It is not intended
|
|
17
17
|
* for use outside of these modules at this time.
|
|
18
18
|
*
|
|
19
|
-
* @
|
|
19
|
+
* @private
|
|
20
20
|
*/
|
|
21
21
|
export declare class LRUCache<
|
|
22
22
|
T,
|
|
@@ -43,6 +43,6 @@ export declare const STRING_DASHERIZE_CACHE: LRUCache<string, string>;
|
|
|
43
43
|
* This version is only in this location to support a deprecated
|
|
44
44
|
* behavior in the core package and will be removed in a future.
|
|
45
45
|
*
|
|
46
|
-
* @
|
|
46
|
+
* @private
|
|
47
47
|
*/
|
|
48
48
|
export declare function dasherize(str: string): string;
|
|
@@ -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');
|
package/dist/configure.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { s as setupSignals } from "./configure-
|
|
1
|
+
export { s as setupSignals } from "./configure-CiFDHArV.js";
|
|
@@ -639,19 +639,18 @@ class ContextOwner {
|
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
641
|
class Context {
|
|
642
|
-
#owner;
|
|
643
642
|
constructor(owner, isCacheHandler) {
|
|
644
643
|
this.id = owner.requestId;
|
|
645
|
-
this
|
|
644
|
+
this.___owner = owner;
|
|
646
645
|
this.request = owner.enhancedRequest;
|
|
647
646
|
this._isCacheHandler = isCacheHandler;
|
|
648
647
|
this._finalized = false;
|
|
649
648
|
}
|
|
650
649
|
setStream(stream) {
|
|
651
|
-
this
|
|
650
|
+
this.___owner.setStream(stream);
|
|
652
651
|
}
|
|
653
652
|
setResponse(response) {
|
|
654
|
-
this
|
|
653
|
+
this.___owner.setResponse(response);
|
|
655
654
|
}
|
|
656
655
|
setIdentifier(identifier) {
|
|
657
656
|
macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
|
|
@@ -659,10 +658,10 @@ class Context {
|
|
|
659
658
|
throw new Error(`setIdentifier may only be used synchronously from a CacheHandler`);
|
|
660
659
|
}
|
|
661
660
|
})(identifier && this._isCacheHandler && !this._finalized) : {};
|
|
662
|
-
this
|
|
661
|
+
this.___owner.god.identifier = identifier;
|
|
663
662
|
}
|
|
664
663
|
get hasRequestedStream() {
|
|
665
|
-
return this
|
|
664
|
+
return this.___owner.hasRequestedStream;
|
|
666
665
|
}
|
|
667
666
|
_finalize() {
|
|
668
667
|
this._finalized = true;
|
package/dist/graph/-private.js
CHANGED
|
@@ -337,9 +337,7 @@ function temporaryConvertToLegacy(field) {
|
|
|
337
337
|
* }
|
|
338
338
|
* ```
|
|
339
339
|
*
|
|
340
|
-
*
|
|
341
|
-
* @class UpgradedMeta
|
|
342
|
-
* @internal
|
|
340
|
+
* @private
|
|
343
341
|
*/
|
|
344
342
|
|
|
345
343
|
const BOOL_LATER = null;
|
|
@@ -2211,8 +2209,7 @@ function createImplicitEdge(definition, identifier) {
|
|
|
2211
2209
|
/**
|
|
2212
2210
|
* Stores the data for one side of a "single" resource relationship.
|
|
2213
2211
|
*
|
|
2214
|
-
* @
|
|
2215
|
-
* @internal
|
|
2212
|
+
* @private
|
|
2216
2213
|
*/
|
|
2217
2214
|
|
|
2218
2215
|
function createResourceEdge(definition, identifier) {
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { setLogging, getRuntimeConfig } from './types/runtime.js';
|
|
2
|
-
import { a as cloneResponseProperties, I as IS_CACHE_HANDLER, b as assertValidRequest, e as executeNextHandler, d as getRequestResult, u as upgradePromise, s as setPromiseResult, f as clearRequestResult } from "./context-
|
|
2
|
+
import { a as cloneResponseProperties, I as IS_CACHE_HANDLER, b as assertValidRequest, e as executeNextHandler, d as getRequestResult, u as upgradePromise, s as setPromiseResult, f as clearRequestResult } from "./context-Bh-MA_tH.js";
|
|
3
3
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
4
|
-
import { w as waitFor } from "./configure-
|
|
4
|
+
import { w as waitFor } from "./configure-CiFDHArV.js";
|
|
5
5
|
import { peekUniversalTransient, setUniversalTransient } from './types/-private.js';
|
|
6
6
|
import { EnableHydration } from './types/request.js';
|
|
7
|
-
export { C as CacheHandler, S as Store, r as recordIdentifierFor,
|
|
7
|
+
export { C as CacheHandler, S as Store, r as recordIdentifierFor, Q as setIdentifierForgetMethod, O as setIdentifierGenerationMethod, T as setIdentifierResetMethod, P as setIdentifierUpdateMethod, U as setKeyInfoForResource, s as storeFor } from "./request-state-B908BvPK.js";
|
|
8
8
|
import '@ember/debug';
|
|
9
9
|
import './utils/string.js';
|
|
10
10
|
import "./symbols-sql1_mdx.js";
|
|
@@ -189,7 +189,7 @@ function isDict(v) {
|
|
|
189
189
|
}
|
|
190
190
|
class RequestManager {
|
|
191
191
|
/** @internal */
|
|
192
|
-
|
|
192
|
+
|
|
193
193
|
/** @internal */
|
|
194
194
|
|
|
195
195
|
/**
|
|
@@ -207,6 +207,7 @@ class RequestManager {
|
|
|
207
207
|
Object.assign(this, options);
|
|
208
208
|
this._pending = new Map();
|
|
209
209
|
this._deduped = new Map();
|
|
210
|
+
this._handlers = [];
|
|
210
211
|
}
|
|
211
212
|
|
|
212
213
|
/**
|
|
@@ -223,13 +224,13 @@ class RequestManager {
|
|
|
223
224
|
if (this._hasCacheHandler) {
|
|
224
225
|
throw new Error(`\`RequestManager.useCache(<handler>)\` May only be invoked once.`);
|
|
225
226
|
}
|
|
226
|
-
if (Object.isFrozen(this
|
|
227
|
+
if (Object.isFrozen(this._handlers)) {
|
|
227
228
|
throw new Error(`\`RequestManager.useCache(<handler>)\` May only be invoked prior to any request having been made.`);
|
|
228
229
|
}
|
|
229
230
|
this._hasCacheHandler = true;
|
|
230
231
|
}
|
|
231
232
|
cacheHandler[IS_CACHE_HANDLER] = true;
|
|
232
|
-
this
|
|
233
|
+
this._handlers.unshift(cacheHandler);
|
|
233
234
|
return this;
|
|
234
235
|
}
|
|
235
236
|
|
|
@@ -243,7 +244,7 @@ class RequestManager {
|
|
|
243
244
|
* @public
|
|
244
245
|
*/
|
|
245
246
|
use(newHandlers) {
|
|
246
|
-
const handlers = this
|
|
247
|
+
const handlers = this._handlers;
|
|
247
248
|
if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
|
|
248
249
|
if (Object.isFrozen(handlers)) {
|
|
249
250
|
throw new Error(`Cannot add a Handler to a RequestManager after a request has been made`);
|
|
@@ -269,7 +270,7 @@ class RequestManager {
|
|
|
269
270
|
* @public
|
|
270
271
|
*/
|
|
271
272
|
request(request) {
|
|
272
|
-
const handlers = this
|
|
273
|
+
const handlers = this._handlers;
|
|
273
274
|
if (macroCondition(getGlobalConfig().WarpDrive.env.DEBUG)) {
|
|
274
275
|
if (!Object.isFrozen(handlers)) {
|
|
275
276
|
Object.freeze(handlers);
|
|
@@ -362,6 +363,14 @@ class RequestManager {
|
|
|
362
363
|
}
|
|
363
364
|
}
|
|
364
365
|
|
|
366
|
+
/**
|
|
367
|
+
* This type exists for internal use only for
|
|
368
|
+
* where intimate contracts still exist either for
|
|
369
|
+
* the Test Suite or for Legacy code.
|
|
370
|
+
*
|
|
371
|
+
* @private
|
|
372
|
+
*/
|
|
373
|
+
|
|
365
374
|
/**
|
|
366
375
|
* @module
|
|
367
376
|
* @mergeModuleWith <project>
|
package/dist/reactive.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { J as ReactiveResource, K as isNonIdentityCacheableField, L as getFieldCacheKeyStrict, r as recordIdentifierFor, F as withSignalStore } from "./request-state-B908BvPK.js";
|
|
2
|
+
export { M as checkout, N as commit } from "./request-state-B908BvPK.js";
|
|
3
3
|
import { isResourceSchema } from './types/schema/fields.js';
|
|
4
4
|
import { D as Destroy, C as Context } from "./symbols-sql1_mdx.js";
|
|
5
5
|
export { a as Checkout } from "./symbols-sql1_mdx.js";
|
|
@@ -8,7 +8,7 @@ import { warn, deprecate } from '@ember/debug';
|
|
|
8
8
|
import './index.js';
|
|
9
9
|
import './types/request.js';
|
|
10
10
|
import './utils/string.js';
|
|
11
|
-
import { c as createMemo } from "./configure-
|
|
11
|
+
import { c as createMemo } from "./configure-CiFDHArV.js";
|
|
12
12
|
import { getOrSetGlobal } from './types/-private.js';
|
|
13
13
|
import { Type } from './types/symbols.js';
|
|
14
14
|
function instantiateRecord(store, identifier, createArgs) {
|
|
@@ -295,7 +295,6 @@ fromIdentity[Type] = '@identity';
|
|
|
295
295
|
* ```
|
|
296
296
|
*
|
|
297
297
|
* @public
|
|
298
|
-
* @param {SchemaService} schema
|
|
299
298
|
*/
|
|
300
299
|
function registerDerivations(schema) {
|
|
301
300
|
schema.registerDerivation(fromIdentity);
|
|
@@ -325,7 +324,6 @@ function makeCachedDerivation(derivation) {
|
|
|
325
324
|
/**
|
|
326
325
|
* A SchemaService designed to work with dynamically registered schemas.
|
|
327
326
|
*
|
|
328
|
-
* @class SchemaService
|
|
329
327
|
* @public
|
|
330
328
|
*/
|
|
331
329
|
class SchemaService {
|
|
@@ -344,6 +342,8 @@ class SchemaService {
|
|
|
344
342
|
|
|
345
343
|
/** @internal */
|
|
346
344
|
|
|
345
|
+
/** @internal */
|
|
346
|
+
|
|
347
347
|
constructor() {
|
|
348
348
|
this._schemas = new Map();
|
|
349
349
|
this._transforms = new Map();
|