@ember-data/model 5.6.0-alpha.5 → 5.6.0-beta.1
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 +1 -1
- package/dist/-private.js +1 -2
- package/dist/hooks.js +1 -2
- package/dist/index.js +1 -667
- package/dist/migration-support.js +1 -381
- package/package.json +7 -31
- package/unstable-preview-types/-private.d.ts +3 -8
- package/unstable-preview-types/hooks.d.ts +3 -4
- package/unstable-preview-types/index.d.ts +31 -66
- package/unstable-preview-types/migration-support.d.ts +21 -263
- package/dist/-private.js.map +0 -1
- package/dist/errors-DsUSZ9m8.js +0 -2605
- package/dist/errors-DsUSZ9m8.js.map +0 -1
- package/dist/hooks-rXIjX2-H.js +0 -74
- package/dist/hooks-rXIjX2-H.js.map +0 -1
- package/dist/hooks.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/migration-support.js.map +0 -1
- package/dist/schema-provider-B6-5uzxP.js +0 -2229
- package/dist/schema-provider-B6-5uzxP.js.map +0 -1
- package/unstable-preview-types/-private/attr.d.ts +0 -167
- package/unstable-preview-types/-private/attr.d.ts.map +0 -1
- package/unstable-preview-types/-private/attr.type-test.d.ts +0 -4
- package/unstable-preview-types/-private/attr.type-test.d.ts.map +0 -1
- package/unstable-preview-types/-private/belongs-to.d.ts +0 -175
- package/unstable-preview-types/-private/belongs-to.d.ts.map +0 -1
- package/unstable-preview-types/-private/belongs-to.type-test.d.ts +0 -4
- package/unstable-preview-types/-private/belongs-to.type-test.d.ts.map +0 -1
- package/unstable-preview-types/-private/debug/assert-polymorphic-type.d.ts +0 -8
- package/unstable-preview-types/-private/debug/assert-polymorphic-type.d.ts.map +0 -1
- package/unstable-preview-types/-private/errors.d.ts +0 -292
- package/unstable-preview-types/-private/errors.d.ts.map +0 -1
- package/unstable-preview-types/-private/has-many.d.ts +0 -166
- package/unstable-preview-types/-private/has-many.d.ts.map +0 -1
- package/unstable-preview-types/-private/has-many.type-test.d.ts +0 -4
- package/unstable-preview-types/-private/has-many.type-test.d.ts.map +0 -1
- package/unstable-preview-types/-private/hooks.d.ts +0 -13
- package/unstable-preview-types/-private/hooks.d.ts.map +0 -1
- package/unstable-preview-types/-private/legacy-relationships-support.d.ts +0 -60
- package/unstable-preview-types/-private/legacy-relationships-support.d.ts.map +0 -1
- package/unstable-preview-types/-private/model-for-mixin.d.ts +0 -6
- package/unstable-preview-types/-private/model-for-mixin.d.ts.map +0 -1
- package/unstable-preview-types/-private/model-methods.d.ts +0 -37
- package/unstable-preview-types/-private/model-methods.d.ts.map +0 -1
- package/unstable-preview-types/-private/model.d.ts +0 -1272
- package/unstable-preview-types/-private/model.d.ts.map +0 -1
- package/unstable-preview-types/-private/model.type-test.d.ts +0 -4
- package/unstable-preview-types/-private/model.type-test.d.ts.map +0 -1
- package/unstable-preview-types/-private/notify-changes.d.ts +0 -8
- package/unstable-preview-types/-private/notify-changes.d.ts.map +0 -1
- package/unstable-preview-types/-private/promise-belongs-to.d.ts +0 -42
- package/unstable-preview-types/-private/promise-belongs-to.d.ts.map +0 -1
- package/unstable-preview-types/-private/promise-many-array.d.ts +0 -128
- package/unstable-preview-types/-private/promise-many-array.d.ts.map +0 -1
- package/unstable-preview-types/-private/promise-proxy-base.d.ts +0 -5
- package/unstable-preview-types/-private/promise-proxy-base.d.ts.map +0 -1
- package/unstable-preview-types/-private/record-state.d.ts +0 -80
- package/unstable-preview-types/-private/record-state.d.ts.map +0 -1
- package/unstable-preview-types/-private/references/belongs-to.d.ts +0 -497
- package/unstable-preview-types/-private/references/belongs-to.d.ts.map +0 -1
- package/unstable-preview-types/-private/references/has-many.d.ts +0 -506
- package/unstable-preview-types/-private/references/has-many.d.ts.map +0 -1
- package/unstable-preview-types/-private/schema-provider.d.ts +0 -65
- package/unstable-preview-types/-private/schema-provider.d.ts.map +0 -1
- package/unstable-preview-types/-private/type-utils.d.ts +0 -59
- package/unstable-preview-types/-private/type-utils.d.ts.map +0 -1
- package/unstable-preview-types/-private/util.d.ts +0 -8
- package/unstable-preview-types/-private/util.d.ts.map +0 -1
- package/unstable-preview-types/-private.d.ts.map +0 -1
- package/unstable-preview-types/hooks.d.ts.map +0 -1
- package/unstable-preview-types/index.d.ts.map +0 -1
- package/unstable-preview-types/migration-support.d.ts.map +0 -1
- package/unstable-preview-types/migration-support.type-test.d.ts +0 -4
- package/unstable-preview-types/migration-support.type-test.d.ts.map +0 -1
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
declare module '@ember-data/model/-private/hooks' {
|
|
2
|
-
import { type Store } from '@ember-data/store/-private';
|
|
3
|
-
import type { StableRecordIdentifier } from '@warp-drive/core-types';
|
|
4
|
-
import type { TypeFromInstance } from '@warp-drive/core-types/record';
|
|
5
|
-
import type { Model } from '@ember-data/model/-private/model';
|
|
6
|
-
export function instantiateRecord(this: Store, identifier: StableRecordIdentifier, createRecordArgs: {
|
|
7
|
-
[key: string]: unknown;
|
|
8
|
-
}): Model;
|
|
9
|
-
export function teardownRecord(record: Model): void;
|
|
10
|
-
export function modelFor<T>(type: TypeFromInstance<T>): typeof Model | void;
|
|
11
|
-
export function modelFor(type: string): typeof Model | void;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/-private/hooks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAoC,KAAK,KAAK,EAAY,MAAM,4BAA4B,CAAC;AAEpG,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,KAAK,EAAE,gBAAgB,EAA4B,MAAM,+BAA+B,CAAC;AAEhG,OAAO,KAAK,EAAE,KAAK,EAAc,MAAM,SAAS,CAAC;AAMjD,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,KAAK,EACX,UAAU,EAAE,sBAAsB,EAClC,gBAAgB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,GAC3C,KAAK,CAwBP;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,KAAK,GAAG,IAAI,CAMlD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,OAAO,KAAK,GAAG,IAAI,CAAC;AAC5E,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,KAAK,GAAG,IAAI,CAAC"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
declare module '@ember-data/model/-private/legacy-relationships-support' {
|
|
2
|
-
import type { CollectionEdge, Graph, ResourceEdge, UpgradedMeta } from '@ember-data/graph/-private';
|
|
3
|
-
import type Store from '@ember-data/store';
|
|
4
|
-
import type { LiveArray } from '@ember-data/store/-private';
|
|
5
|
-
import { RelatedCollection as ManyArray } from '@ember-data/store/-private';
|
|
6
|
-
import type { BaseFinderOptions } from '@ember-data/store/types';
|
|
7
|
-
import type { StableRecordIdentifier } from '@warp-drive/core-types';
|
|
8
|
-
import type { Cache } from '@warp-drive/core-types/cache';
|
|
9
|
-
import type { CollectionRelationship } from '@warp-drive/core-types/cache/relationship';
|
|
10
|
-
import type { LocalRelationshipOperation } from '@warp-drive/core-types/graph';
|
|
11
|
-
import type { OpaqueRecordInstance, TypeFromInstanceOrString } from '@warp-drive/core-types/record';
|
|
12
|
-
import type { CollectionResourceRelationship, InnerRelationshipDocument, SingleResourceRelationship } from '@warp-drive/core-types/spec/json-api-raw';
|
|
13
|
-
import type { MinimalLegacyRecord } from '@ember-data/model/-private/model-methods';
|
|
14
|
-
import type { BelongsToProxyCreateArgs } from '@ember-data/model/-private/promise-belongs-to';
|
|
15
|
-
import { PromiseBelongsTo } from '@ember-data/model/-private/promise-belongs-to';
|
|
16
|
-
import type { HasManyProxyCreateArgs } from '@ember-data/model/-private/promise-many-array';
|
|
17
|
-
import { PromiseManyArray } from '@ember-data/model/-private/promise-many-array';
|
|
18
|
-
import BelongsToReference from '@ember-data/model/-private/references/belongs-to';
|
|
19
|
-
import HasManyReference from '@ember-data/model/-private/references/has-many';
|
|
20
|
-
export const LEGACY_SUPPORT: Map<StableRecordIdentifier | MinimalLegacyRecord, LegacySupport>;
|
|
21
|
-
export function lookupLegacySupport(record: MinimalLegacyRecord): LegacySupport;
|
|
22
|
-
export class LegacySupport {
|
|
23
|
-
record: MinimalLegacyRecord;
|
|
24
|
-
store: Store;
|
|
25
|
-
graph: Graph;
|
|
26
|
-
cache: Cache;
|
|
27
|
-
references: Record<string, BelongsToReference | HasManyReference>;
|
|
28
|
-
identifier: StableRecordIdentifier;
|
|
29
|
-
_manyArrayCache: Record<string, ManyArray>;
|
|
30
|
-
_relationshipPromisesCache: Record<string, Promise<ManyArray | OpaqueRecordInstance>>;
|
|
31
|
-
_relationshipProxyCache: Record<string, PromiseManyArray | PromiseBelongsTo | undefined>;
|
|
32
|
-
_pending: Record<string, Promise<StableRecordIdentifier | null> | undefined>;
|
|
33
|
-
isDestroying: boolean;
|
|
34
|
-
isDestroyed: boolean;
|
|
35
|
-
constructor(record: MinimalLegacyRecord);
|
|
36
|
-
_syncArray(array: LiveArray): void;
|
|
37
|
-
mutate(mutation: LocalRelationshipOperation): void;
|
|
38
|
-
_findBelongsTo(key: string, resource: SingleResourceRelationship, relationship: ResourceEdge, options?: BaseFinderOptions): Promise<OpaqueRecordInstance | null>;
|
|
39
|
-
reloadBelongsTo(key: string, options?: BaseFinderOptions): Promise<OpaqueRecordInstance | null>;
|
|
40
|
-
getBelongsTo(key: string, options?: BaseFinderOptions): PromiseBelongsTo | OpaqueRecordInstance | null;
|
|
41
|
-
setDirtyBelongsTo(key: string, value: OpaqueRecordInstance | null): void;
|
|
42
|
-
_getCurrentState<T>(identifier: StableRecordIdentifier, field: string): [StableRecordIdentifier<TypeFromInstanceOrString<T>>[], CollectionRelationship];
|
|
43
|
-
getManyArray<T>(key: string, definition?: UpgradedMeta): ManyArray<T>;
|
|
44
|
-
fetchAsyncHasMany(key: string, relationship: CollectionEdge, manyArray: ManyArray, options?: BaseFinderOptions): Promise<ManyArray>;
|
|
45
|
-
reloadHasMany<T>(key: string, options?: BaseFinderOptions): Promise<ManyArray<T>> | PromiseManyArray<T>;
|
|
46
|
-
getHasMany(key: string, options?: BaseFinderOptions): PromiseManyArray | ManyArray;
|
|
47
|
-
_updatePromiseProxyFor(kind: 'hasMany', key: string, args: HasManyProxyCreateArgs): PromiseManyArray;
|
|
48
|
-
_updatePromiseProxyFor(kind: 'belongsTo', key: string, args: BelongsToProxyCreateArgs): PromiseBelongsTo;
|
|
49
|
-
_updatePromiseProxyFor(kind: 'belongsTo', key: string, args: {
|
|
50
|
-
promise: Promise<OpaqueRecordInstance | null>;
|
|
51
|
-
}): PromiseBelongsTo;
|
|
52
|
-
referenceFor(kind: 'belongsTo', name: string): BelongsToReference;
|
|
53
|
-
referenceFor(kind: 'hasMany', name: string): HasManyReference;
|
|
54
|
-
_findHasManyByJsonApiResource(resource: CollectionResourceRelationship, parentIdentifier: StableRecordIdentifier, relationship: CollectionEdge, options?: BaseFinderOptions): Promise<void | unknown[]> | void;
|
|
55
|
-
_findBelongsToByJsonApiResource(resource: SingleResourceRelationship, parentIdentifier: StableRecordIdentifier, relationship: ResourceEdge, options?: BaseFinderOptions): Promise<StableRecordIdentifier | null>;
|
|
56
|
-
destroy(): void;
|
|
57
|
-
}
|
|
58
|
-
export function areAllInverseRecordsLoaded(store: Store, resource: InnerRelationshipDocument): boolean;
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=legacy-relationships-support.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-relationships-support.d.ts","sourceRoot":"","sources":["../../src/-private/legacy-relationships-support.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAa,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/G,OAAO,KAAK,KAAK,MAAM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AG,OAAO,EAAE,CAAC,GAAG,IAAI;IAqFnC,+BAA+B,CAC7B,QAAQ,EAAE,0BAA0B,EACpC,gBAAgB,EAAE,sBAAsB,EACxC,YAAY,EAAE,YAAY,EAC1B,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC;IA4GzC,OAAO;CAyBR;AAiHD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,yBAAyB,GAAG,OAAO,CAgBrG"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare module '@ember-data/model/-private/model-for-mixin' {
|
|
2
|
-
import type Store from '@ember-data/store';
|
|
3
|
-
import { type ModelFactory } from '@ember-data/model/-private/model';
|
|
4
|
-
export default function modelForMixin(store: Store, normalizedModelName: string): ModelFactory | undefined;
|
|
5
|
-
}
|
|
6
|
-
//# sourceMappingURL=model-for-mixin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-for-mixin.d.ts","sourceRoot":"","sources":["../../src/-private/model-for-mixin.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAkBnD,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAYzG"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
declare module '@ember-data/model/-private/model-methods' {
|
|
2
|
-
import type { Snapshot } from '@ember-data/legacy-compat/-private';
|
|
3
|
-
import type Store from '@ember-data/store';
|
|
4
|
-
import type { ChangedAttributesHash } from '@warp-drive/core-types/cache';
|
|
5
|
-
import { RecordStore } from '@warp-drive/core-types/symbols';
|
|
6
|
-
import type { Errors } from '@ember-data/model/-private/errors';
|
|
7
|
-
import type RecordState from '@ember-data/model/-private/record-state';
|
|
8
|
-
import type BelongsToReference from '@ember-data/model/-private/references/belongs-to';
|
|
9
|
-
import type HasManyReference from '@ember-data/model/-private/references/has-many';
|
|
10
|
-
import type { MaybeBelongsToFields, MaybeHasManyFields } from '@ember-data/model/-private/type-utils';
|
|
11
|
-
export interface MinimalLegacyRecord {
|
|
12
|
-
errors: Errors;
|
|
13
|
-
___recordState: RecordState;
|
|
14
|
-
currentState: RecordState;
|
|
15
|
-
isDestroyed: boolean;
|
|
16
|
-
isDestroying: boolean;
|
|
17
|
-
isReloading: boolean;
|
|
18
|
-
isValid: boolean;
|
|
19
|
-
[RecordStore]: Store;
|
|
20
|
-
deleteRecord(): void;
|
|
21
|
-
unloadRecord(): void;
|
|
22
|
-
save<T extends MinimalLegacyRecord>(this: T, options?: Record<string, unknown>): Promise<this>;
|
|
23
|
-
destroyRecord<T extends MinimalLegacyRecord>(this: T, options?: Record<string, unknown>): Promise<this>;
|
|
24
|
-
}
|
|
25
|
-
export function rollbackAttributes<T extends MinimalLegacyRecord>(this: T): void;
|
|
26
|
-
export function unloadRecord<T extends MinimalLegacyRecord>(this: T): void;
|
|
27
|
-
export function belongsTo<T extends MinimalLegacyRecord, K extends MaybeBelongsToFields<T>>(this: T, prop: K): BelongsToReference<T, K>;
|
|
28
|
-
export function hasMany<T extends MinimalLegacyRecord, K extends MaybeHasManyFields<T>>(this: T, prop: K): HasManyReference<T, K>;
|
|
29
|
-
export function reload<T extends MinimalLegacyRecord>(this: T, options?: Record<string, unknown>): Promise<T>;
|
|
30
|
-
export function changedAttributes<T extends MinimalLegacyRecord>(this: T): ChangedAttributesHash;
|
|
31
|
-
export function serialize<T extends MinimalLegacyRecord>(this: T, options?: Record<string, unknown>): unknown;
|
|
32
|
-
export function deleteRecord<T extends MinimalLegacyRecord>(this: T): void;
|
|
33
|
-
export function save<T extends MinimalLegacyRecord>(this: T, options?: Record<string, unknown>): Promise<T>;
|
|
34
|
-
export function destroyRecord<T extends MinimalLegacyRecord>(this: T, options?: Record<string, unknown>): Promise<T>;
|
|
35
|
-
export function createSnapshot<T extends MinimalLegacyRecord>(this: T): Snapshot<T>;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=model-methods.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model-methods.d.ts","sourceRoot":"","sources":["../../src/-private/model-methods.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAEnE,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAI3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE7E,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,WAAW,CAAC;IAC5B,YAAY,EAAE,WAAW,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAErB,YAAY,IAAI,IAAI,CAAC;IACrB,YAAY,IAAI,IAAI,CAAC;IACrB,IAAI,CAAC,CAAC,SAAS,mBAAmB,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC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