@ember-data/model 5.3.11 → 5.3.13
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/LICENSE.md +19 -7
- package/README.md +2 -2
- package/dist/-private.js +3 -2
- package/dist/-private.js.map +1 -1
- package/dist/{has-many-BlJm_gf3.js → has-many-DT3JBYYG.js} +1 -1
- package/dist/{has-many-BlJm_gf3.js.map → has-many-DT3JBYYG.js.map} +1 -1
- package/dist/{hooks-CkH3DloZ.js → hooks-CNY5g4Ab.js} +2 -2
- package/dist/{hooks-CkH3DloZ.js.map → hooks-CNY5g4Ab.js.map} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/migration-support.js +5 -2
- package/dist/migration-support.js.map +1 -1
- package/dist/{model-CGNpakSA.js → model-rk3atPqV.js} +90 -566
- package/dist/model-rk3atPqV.js.map +1 -0
- package/dist/{schema-provider-CAdwIBw4.js → schema-provider-Bvogtzx9.js} +4 -1
- package/dist/schema-provider-Bvogtzx9.js.map +1 -0
- package/logos/NCC-1701-a-blue.svg +4 -0
- package/logos/NCC-1701-a-gold.svg +4 -0
- package/logos/NCC-1701-a-gold_100.svg +1 -0
- package/logos/NCC-1701-a-gold_base-64.txt +1 -0
- package/logos/NCC-1701-a.svg +4 -0
- package/logos/README.md +4 -0
- package/logos/docs-badge.svg +2 -0
- package/logos/github-header.svg +444 -0
- package/logos/social1.png +0 -0
- package/logos/social2.png +0 -0
- package/logos/warp-drive-logo-dark.svg +4 -0
- package/logos/warp-drive-logo-gold.svg +4 -0
- package/package.json +35 -66
- package/unstable-preview-types/-private/debug/assert-polymorphic-type.d.ts.map +1 -1
- package/unstable-preview-types/-private/legacy-relationships-support.d.ts +1 -1
- package/unstable-preview-types/-private/legacy-relationships-support.d.ts.map +1 -1
- package/unstable-preview-types/-private/model.d.ts +21 -23
- package/unstable-preview-types/-private/model.d.ts.map +1 -1
- package/unstable-preview-types/-private/notify-changes.d.ts.map +1 -1
- package/unstable-preview-types/-private/promise-many-array.d.ts +1 -1
- package/unstable-preview-types/-private/promise-many-array.d.ts.map +1 -1
- package/unstable-preview-types/-private/promise-proxy-base.d.ts +5 -0
- package/unstable-preview-types/-private/promise-proxy-base.d.ts.map +1 -0
- package/unstable-preview-types/-private/record-state.d.ts +1 -11
- package/unstable-preview-types/-private/record-state.d.ts.map +1 -1
- package/unstable-preview-types/-private/references/has-many.d.ts +1 -1
- package/unstable-preview-types/-private/references/has-many.d.ts.map +1 -1
- package/unstable-preview-types/-private/schema-provider.d.ts +8 -7
- package/unstable-preview-types/-private/schema-provider.d.ts.map +1 -1
- package/unstable-preview-types/-private/type-utils.d.ts +1 -1
- package/unstable-preview-types/-private/type-utils.d.ts.map +1 -1
- package/unstable-preview-types/-private.d.ts +1 -1
- package/unstable-preview-types/-private.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +19 -19
- package/unstable-preview-types/index.d.ts.map +1 -1
- package/unstable-preview-types/migration-support.d.ts +5 -4
- package/unstable-preview-types/migration-support.d.ts.map +1 -1
- package/dist/model-CGNpakSA.js.map +0 -1
- package/dist/schema-provider-CAdwIBw4.js.map +0 -1
- package/unstable-preview-types/-private/many-array.d.ts +0 -196
- package/unstable-preview-types/-private/many-array.d.ts.map +0 -1
- /package/{ember-data-logo-dark.svg → logos/ember-data-logo-dark.svg} +0 -0
- /package/{ember-data-logo-light.svg → logos/ember-data-logo-light.svg} +0 -0
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/// <reference path="./hooks.d.ts" />
|
|
2
|
-
/// <reference path="./migration-support.d.ts" />
|
|
3
2
|
/// <reference path="./-private.d.ts" />
|
|
4
|
-
/// <reference path="
|
|
5
|
-
/// <reference path="./-private/
|
|
6
|
-
/// <reference path="./-private/schema-provider.d.ts" />
|
|
3
|
+
/// <reference path="./migration-support.d.ts" />
|
|
4
|
+
/// <reference path="./-private/model-for-mixin.d.ts" />
|
|
7
5
|
/// <reference path="./-private/hooks.d.ts" />
|
|
8
|
-
/// <reference path="./-private/
|
|
9
|
-
/// <reference path="./-private/many-array.d.ts" />
|
|
10
|
-
/// <reference path="./-private/legacy-relationships-support.d.ts" />
|
|
11
|
-
/// <reference path="./-private/errors.d.ts" />
|
|
6
|
+
/// <reference path="./-private/has-many.type-test.d.ts" />
|
|
12
7
|
/// <reference path="./-private/model.d.ts" />
|
|
13
|
-
/// <reference path="./-private/
|
|
14
|
-
/// <reference path="./-private/model.type-test.d.ts" />
|
|
15
|
-
/// <reference path="./-private/attr.type-test.d.ts" />
|
|
8
|
+
/// <reference path="./-private/notify-changes.d.ts" />
|
|
16
9
|
/// <reference path="./-private/promise-belongs-to.d.ts" />
|
|
17
|
-
/// <reference path="./-private/record-state.d.ts" />
|
|
18
10
|
/// <reference path="./-private/attr.d.ts" />
|
|
19
|
-
/// <reference path="./-private/has-many.type-test.d.ts" />
|
|
20
|
-
/// <reference path="./-private/notify-changes.d.ts" />
|
|
21
|
-
/// <reference path="./-private/model-for-mixin.d.ts" />
|
|
22
|
-
/// <reference path="./-private/type-utils.d.ts" />
|
|
23
11
|
/// <reference path="./-private/belongs-to.d.ts" />
|
|
12
|
+
/// <reference path="./-private/schema-provider.d.ts" />
|
|
13
|
+
/// <reference path="./-private/record-state.d.ts" />
|
|
14
|
+
/// <reference path="./-private/model.type-test.d.ts" />
|
|
24
15
|
/// <reference path="./-private/has-many.d.ts" />
|
|
25
|
-
/// <reference path="./-private/
|
|
16
|
+
/// <reference path="./-private/legacy-relationships-support.d.ts" />
|
|
17
|
+
/// <reference path="./-private/type-utils.d.ts" />
|
|
18
|
+
/// <reference path="./-private/util.d.ts" />
|
|
19
|
+
/// <reference path="./-private/promise-proxy-base.d.ts" />
|
|
20
|
+
/// <reference path="./-private/belongs-to.type-test.d.ts" />
|
|
21
|
+
/// <reference path="./-private/errors.d.ts" />
|
|
22
|
+
/// <reference path="./-private/model-methods.d.ts" />
|
|
23
|
+
/// <reference path="./-private/promise-many-array.d.ts" />
|
|
24
|
+
/// <reference path="./-private/attr.type-test.d.ts" />
|
|
26
25
|
/// <reference path="./-private/references/belongs-to.d.ts" />
|
|
27
26
|
/// <reference path="./-private/references/has-many.d.ts" />
|
|
27
|
+
/// <reference path="./-private/debug/assert-polymorphic-type.d.ts" />
|
|
28
28
|
declare module '@ember-data/model' {
|
|
29
29
|
/**
|
|
30
30
|
* This package provides a Presentation Model for resource data in an EmberData Cache.
|
|
@@ -68,8 +68,8 @@ declare module '@ember-data/model' {
|
|
|
68
68
|
export { Model as default, attr, belongsTo, hasMany } from '@ember-data/model/-private';
|
|
69
69
|
export type { PromiseBelongsTo as AsyncBelongsTo } from '@ember-data/model/-private/promise-belongs-to';
|
|
70
70
|
export type { PromiseManyArray as AsyncHasMany } from '@ember-data/model/-private/promise-many-array';
|
|
71
|
-
export type { RelatedCollection as ManyArray } from '@ember-data/
|
|
72
|
-
export type { RelatedCollection as HasMany } from '@ember-data/
|
|
71
|
+
export type { RelatedCollection as ManyArray } from '@ember-data/store/-private';
|
|
72
|
+
export type { RelatedCollection as HasMany } from '@ember-data/store/-private';
|
|
73
73
|
export { instantiateRecord, teardownRecord, modelFor } from '@ember-data/model/-private/hooks';
|
|
74
74
|
export { ModelSchemaProvider } from '@ember-data/model/-private/schema-provider';
|
|
75
75
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAExE,YAAY,EAAE,gBAAgB,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACxF,YAAY,EAAE,gBAAgB,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACtF,YAAY,EAAE,iBAAiB,IAAI,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAExE,YAAY,EAAE,gBAAgB,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACxF,YAAY,EAAE,gBAAgB,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAC;AACtF,YAAY,EAAE,iBAAiB,IAAI,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACjF,YAAY,EAAE,iBAAiB,IAAI,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -5,7 +5,7 @@ declare module '@ember-data/model/migration-support' {
|
|
|
5
5
|
import type { ObjectValue } from '@warp-drive/core-types/json/raw';
|
|
6
6
|
import type { TypedRecordInstance } from '@warp-drive/core-types/record';
|
|
7
7
|
import type { Derivation, HashFn, Transformation } from '@warp-drive/core-types/schema/concepts';
|
|
8
|
-
import type { ArrayField, DerivedField, FieldSchema, GenericField, HashField, ObjectField, ResourceSchema } from '@warp-drive/core-types/schema/fields';
|
|
8
|
+
import type { ArrayField, DerivedField, FieldSchema, GenericField, HashField, ObjectField, ObjectSchema, ResourceSchema } from '@warp-drive/core-types/schema/fields';
|
|
9
9
|
import type { WithPartial } from '@warp-drive/core-types/utils';
|
|
10
10
|
import type { MinimalLegacyRecord } from '@ember-data/model/-private/model-methods';
|
|
11
11
|
import { belongsTo, hasMany } from '@ember-data/model/-private/model-methods';
|
|
@@ -30,6 +30,7 @@ declare module '@ember-data/model/migration-support' {
|
|
|
30
30
|
_preferred: SchemaService;
|
|
31
31
|
_secondary: SchemaService;
|
|
32
32
|
constructor(store: Store, schema: SchemaService);
|
|
33
|
+
resourceTypes(): Readonly<string[]>;
|
|
33
34
|
hasResource(resource: StableRecordIdentifier | {
|
|
34
35
|
type: string;
|
|
35
36
|
}): boolean;
|
|
@@ -51,9 +52,9 @@ declare module '@ember-data/model/migration-support' {
|
|
|
51
52
|
}): Derivation;
|
|
52
53
|
resource(resource: StableRecordIdentifier | {
|
|
53
54
|
type: string;
|
|
54
|
-
}): ResourceSchema;
|
|
55
|
-
registerResources(schemas: ResourceSchema
|
|
56
|
-
registerResource(schema: ResourceSchema): void;
|
|
55
|
+
}): ResourceSchema | ObjectSchema;
|
|
56
|
+
registerResources(schemas: Array<ResourceSchema | ObjectSchema>): void;
|
|
57
|
+
registerResource(schema: ResourceSchema | ObjectSchema): void;
|
|
57
58
|
registerTransformation(transform: Transformation): void;
|
|
58
59
|
registerDerivation<R, T, FM extends ObjectValue | null>(derivation: Derivation<R, T, FM>): void;
|
|
59
60
|
registerHashFn(hashFn: HashFn): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-support.d.ts","sourceRoot":"","sources":["../src/migration-support.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACjG,OAAO,KAAK,EACV,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,cAAc,EACf,M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