@ember-data/store 5.4.0-alpha.64 → 5.4.0-alpha.70
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/addon-main.cjs +5 -0
- package/dist/-private.js +1 -0
- package/{addon/cache-handler-Dl0DS1Iq.js → dist/cache-handler-BCWOzbbB.js} +954 -598
- package/dist/cache-handler-BCWOzbbB.js.map +1 -0
- package/dist/index.js +4 -0
- package/{addon → dist}/index.js.map +1 -1
- package/dist/types.js +0 -0
- package/dist/types.js.map +1 -0
- package/package.json +31 -43
- package/unstable-preview-types/-private/cache-handler.d.ts +7 -4
- package/unstable-preview-types/-private/cache-handler.d.ts.map +1 -1
- package/unstable-preview-types/-private/caches/cache-utils.d.ts +3 -3
- package/unstable-preview-types/-private/caches/cache-utils.d.ts.map +1 -1
- package/unstable-preview-types/-private/caches/identifier-cache.d.ts +1 -2
- package/unstable-preview-types/-private/caches/identifier-cache.d.ts.map +1 -1
- package/unstable-preview-types/-private/caches/instance-cache.d.ts +3 -5
- package/unstable-preview-types/-private/caches/instance-cache.d.ts.map +1 -1
- package/unstable-preview-types/-private/document.d.ts +7 -7
- package/unstable-preview-types/-private/document.d.ts.map +1 -1
- package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts +2 -2
- package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts.map +1 -1
- package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts +6 -6
- package/unstable-preview-types/-private/legacy-model-support/shim-model-class.d.ts.map +1 -1
- package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts +5 -3
- package/unstable-preview-types/-private/managers/cache-capabilities-manager.d.ts.map +1 -1
- package/unstable-preview-types/-private/managers/cache-manager.d.ts +2 -3
- package/unstable-preview-types/-private/managers/cache-manager.d.ts.map +1 -1
- package/unstable-preview-types/-private/managers/notification-manager.d.ts +2 -4
- package/unstable-preview-types/-private/managers/notification-manager.d.ts.map +1 -1
- package/unstable-preview-types/-private/managers/record-array-manager.d.ts +5 -5
- package/unstable-preview-types/-private/managers/record-array-manager.d.ts.map +1 -1
- package/unstable-preview-types/-private/network/request-cache.d.ts +4 -4
- package/unstable-preview-types/-private/network/request-cache.d.ts.map +1 -1
- package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts +22 -17
- package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts.map +1 -1
- package/unstable-preview-types/-private/store-service.d.ts +158 -196
- package/unstable-preview-types/-private/store-service.d.ts.map +1 -1
- package/unstable-preview-types/-private/utils/coerce-id.d.ts +2 -2
- package/unstable-preview-types/-private/utils/coerce-id.d.ts.map +1 -1
- package/unstable-preview-types/-private/utils/construct-resource.d.ts +6 -7
- package/unstable-preview-types/-private/utils/construct-resource.d.ts.map +1 -1
- package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts +1 -1
- package/unstable-preview-types/-private/utils/is-non-empty-string.d.ts.map +1 -1
- package/unstable-preview-types/-private/utils/normalize-model-name.d.ts +1 -1
- package/unstable-preview-types/-private/utils/normalize-model-name.d.ts.map +1 -1
- package/unstable-preview-types/-private.d.ts +12 -8
- package/unstable-preview-types/-private.d.ts.map +1 -1
- package/unstable-preview-types/-types/q/{cache-store-wrapper.d.ts → cache-capabilities-manager.d.ts} +8 -6
- package/unstable-preview-types/-types/q/cache-capabilities-manager.d.ts.map +1 -0
- package/unstable-preview-types/-types/q/ds-model.d.ts +15 -5
- package/unstable-preview-types/-types/q/ds-model.d.ts.map +1 -1
- package/unstable-preview-types/-types/q/identifier.d.ts +0 -2
- package/unstable-preview-types/-types/q/identifier.d.ts.map +1 -1
- package/unstable-preview-types/-types/q/record-data-json-api.d.ts +1 -1
- package/unstable-preview-types/-types/q/record-data-json-api.d.ts.map +1 -1
- package/unstable-preview-types/-types/q/schema-service.d.ts +164 -29
- package/unstable-preview-types/-types/q/schema-service.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +26 -27
- package/unstable-preview-types/index.d.ts.map +1 -1
- package/unstable-preview-types/types.d.ts +7 -0
- package/unstable-preview-types/types.d.ts.map +1 -0
- package/addon/-private.js +0 -1
- package/addon/cache-handler-Dl0DS1Iq.js.map +0 -1
- package/addon/index.js +0 -1
- package/addon-main.js +0 -94
- package/unstable-preview-types/-private/utils/identifier-debug-consts.d.ts +0 -7
- package/unstable-preview-types/-private/utils/identifier-debug-consts.d.ts.map +0 -1
- package/unstable-preview-types/-types/q/cache-store-wrapper.d.ts.map +0 -1
- package/unstable-preview-types/-types/q/cache.d.ts +0 -47
- package/unstable-preview-types/-types/q/cache.d.ts.map +0 -1
- /package/{addon → dist}/-private.js.map +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-cache.d.ts","sourceRoot":"","sources":["../../../src/-private/network/request-cache.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,KAAK,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"request-cache.d.ts","sourceRoot":"","sources":["../../../src/-private/network/request-cache.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,QAAA,MAAM,QAAQ,gCAAiD,CAAC;AAChE,eAAO,MAAM,cAAc,sCAAsD,CAAC;AAGlF,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACvC,gBAAgB,EAAE,sBAAsB,CAAC;CAC1C;AAED,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAChD,EAAE,EAAE,YAAY,CAAC;CAClB;AAED,MAAM,W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AiDnE,qBAAqB,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IAcjD,MAAM,IAAI,IAAI;IAOd,aAAa,CAAC,GAAG,EAAE,eAAe,GAAG,IAAI;IASzC,QAAQ,CAAC,UAAU,EAAE,sBAAsB,EAAE,OAAO,EAAE,eAAe;IAQrE,QAAQ,CAAC,OAAO,EAAE,eAAe;IAwBjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,kBAAkB,CAAC,UAAU,EAAE,sBAAsB,EAAE,QAAQ,EAAE,mBAAmB;IASpF;;;;;;;OAOG;IACH,2BAA2B,CAAC,UAAU,EAAE,sBAAsB,GAAG,YAAY,EAAE;IAI/E;;;;;;;OAOG;IACH,uBAAuB,CAAC,UAAU,EAAE,sBAAsB,GAAG,YAAY,GAAG,IAAI;CAOjF"}
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
declare module '@ember-data/store/-private/record-arrays/identifier-array' {
|
|
2
2
|
import type { Signal } from '@ember-data/tracking/-private';
|
|
3
3
|
import type { StableRecordIdentifier } from '@warp-drive/core-types/identifier';
|
|
4
|
-
import type {
|
|
4
|
+
import type { TypeFromInstanceOrString } from '@warp-drive/core-types/record';
|
|
5
5
|
import type { ImmutableRequestInfo } from '@warp-drive/core-types/request';
|
|
6
|
-
import type { Links, PaginationLinks } from '@warp-drive/core-types/spec/raw';
|
|
7
|
-
import type RecordArrayManager from '@ember-data/store/-private/managers/record-array-manager';
|
|
8
|
-
import type Store from '@ember-data/store/-private/store-service';
|
|
6
|
+
import type { Links, PaginationLinks } from '@warp-drive/core-types/spec/json-api-raw';
|
|
7
|
+
import type { RecordArrayManager } from '@ember-data/store/-private/managers/record-array-manager';
|
|
8
|
+
import type { Store } from '@ember-data/store/-private/store-service';
|
|
9
9
|
import { NativeProxy } from '@ember-data/store/-private/record-arrays/native-proxy-type-fix';
|
|
10
|
-
export const ARRAY_SIGNAL: unique
|
|
11
|
-
export const SOURCE: unique
|
|
12
|
-
export const MUTATE: unique
|
|
13
|
-
export const NOTIFY: unique
|
|
14
|
-
const IS_COLLECTION: unique
|
|
10
|
+
export const ARRAY_SIGNAL: "___(unique) Symbol(#signal)";
|
|
11
|
+
export const SOURCE: "___(unique) Symbol(#source)";
|
|
12
|
+
export const MUTATE: "___(unique) Symbol(#update)";
|
|
13
|
+
export const NOTIFY: "___(unique) Symbol(#notify)";
|
|
14
|
+
const IS_COLLECTION: "___(unique) Symbol(IS_COLLECTION)";
|
|
15
15
|
export function notifyArray(arr: IdentifierArray): void;
|
|
16
16
|
export type IdentifierArrayCreateOptions<T = unknown> = {
|
|
17
|
-
identifiers: StableRecordIdentifier[];
|
|
18
|
-
type?:
|
|
17
|
+
identifiers: StableRecordIdentifier<TypeFromInstanceOrString<T>>[];
|
|
18
|
+
type?: TypeFromInstanceOrString<T>;
|
|
19
19
|
store: Store;
|
|
20
20
|
allowMutation: boolean;
|
|
21
|
-
manager:
|
|
21
|
+
manager: MinimumManager;
|
|
22
22
|
links?: Links | PaginationLinks | null;
|
|
23
23
|
meta?: Record<string, unknown> | null;
|
|
24
24
|
};
|
|
25
|
+
type MinimumManager = {
|
|
26
|
+
_syncArray: (array: IdentifierArray) => void;
|
|
27
|
+
};
|
|
25
28
|
/**
|
|
26
29
|
A record array is an array that contains records of a certain type (or modelName).
|
|
27
30
|
The record array materializes records as needed when they are retrieved for the first
|
|
@@ -34,10 +37,10 @@ declare module '@ember-data/store/-private/record-arrays/identifier-array' {
|
|
|
34
37
|
@class RecordArray
|
|
35
38
|
@public
|
|
36
39
|
*/
|
|
37
|
-
interface IdentifierArray<T = unknown> extends Omit<Array<T>, '[]'> {
|
|
40
|
+
export interface IdentifierArray<T = unknown> extends Omit<Array<T>, '[]'> {
|
|
38
41
|
[MUTATE]?(target: StableRecordIdentifier[], receiver: typeof NativeProxy<StableRecordIdentifier[], T[]>, prop: string, args: unknown[], _SIGNAL: Signal): unknown;
|
|
39
42
|
}
|
|
40
|
-
class IdentifierArray<T = unknown> {
|
|
43
|
+
export class IdentifierArray<T = unknown> {
|
|
41
44
|
DEPRECATED_CLASS_NAME: string;
|
|
42
45
|
/**
|
|
43
46
|
The flag to signal a `RecordArray` is currently loading data.
|
|
@@ -63,7 +66,7 @@ declare module '@ember-data/store/-private/record-arrays/identifier-array' {
|
|
|
63
66
|
[NOTIFY](): void;
|
|
64
67
|
links: Links | PaginationLinks | null;
|
|
65
68
|
meta: Record<string, unknown> | null;
|
|
66
|
-
modelName?:
|
|
69
|
+
modelName?: TypeFromInstanceOrString<T>;
|
|
67
70
|
/**
|
|
68
71
|
The store that created this record array.
|
|
69
72
|
|
|
@@ -72,7 +75,7 @@ declare module '@ember-data/store/-private/record-arrays/identifier-array' {
|
|
|
72
75
|
@type Store
|
|
73
76
|
*/
|
|
74
77
|
store: Store;
|
|
75
|
-
_manager:
|
|
78
|
+
_manager: MinimumManager;
|
|
76
79
|
destroy(clear: boolean): void;
|
|
77
80
|
get length(): number;
|
|
78
81
|
set length(value: number);
|
|
@@ -118,16 +121,18 @@ declare module '@ember-data/store/-private/record-arrays/identifier-array' {
|
|
|
118
121
|
*/
|
|
119
122
|
save(): Promise<IdentifierArray>;
|
|
120
123
|
}
|
|
121
|
-
export default IdentifierArray;
|
|
122
124
|
export type CollectionCreateOptions = IdentifierArrayCreateOptions & {
|
|
125
|
+
manager: RecordArrayManager;
|
|
123
126
|
query: ImmutableRequestInfo | Record<string, unknown> | null;
|
|
124
127
|
isLoaded: boolean;
|
|
125
128
|
};
|
|
126
129
|
export class Collection<T = unknown> extends IdentifierArray<T> {
|
|
127
130
|
query: ImmutableRequestInfo | Record<string, unknown> | null;
|
|
131
|
+
_manager: RecordArrayManager;
|
|
128
132
|
constructor(options: CollectionCreateOptions);
|
|
129
133
|
_update(): Promise<Collection<T>>;
|
|
130
134
|
destroy(clear: boolean): void;
|
|
131
135
|
}
|
|
136
|
+
export {};
|
|
132
137
|
}
|
|
133
138
|
//# sourceMappingURL=identifier-array.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifier-array.d.ts","sourceRoot":"","sources":["../../../src/-private/record-arrays/identifier-array.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"identifier-array.d.ts","sourceRoot":"","sources":["../../../src/-private/record-arrays/identifier-array.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AAU5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAKvF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAuCtD,eAAO,MAAM,YAAY,+BAA+C,CAAC;AACzE,eAAO,MAAM,MAAM,+BAA+C,CAAC;AACnE,eAAO,MAAM,MAAM,+BAA+C,CAAC;AACnE,eAAO,MAAM,MAAM,+BAA+C,CAAC;AACnE,QAAA,MAAM,aAAa,qCAA4D,CAAC;AAEhF,wBAAgB,WAAW,CAAC,GAAG,EAAE,eAAe,QAE/C;AAcD,MAAM,MAAM,4BAA4B,CAAC,CAAC,GAAG,OAAO,IAAI;IACtD,WAAW,EAAE,sBAAsB,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACnE,IAAI,CAAC,EAAE,wBAAwB,CAAC,CAAC,CAAC,CAAC;IACnC,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,cAAc,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,GAA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