@ember-data/model 4.13.0-alpha.3 → 4.13.0-alpha.4
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/dist/-private.js +2 -2
- package/dist/{has-many-CshPdrqR.js → has-many-DthR7vrt.js} +1 -1
- package/dist/has-many-DthR7vrt.js.map +1 -0
- package/dist/{hooks-DCYCaSEL.js → hooks-DUvkuuiF.js} +2 -2
- package/dist/{hooks-DCYCaSEL.js.map → hooks-DUvkuuiF.js.map} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/index.js +4 -4
- package/dist/{legacy-relationships-support-D5m0xTYg.js → legacy-relationships-support-BcuRwRWg.js} +83 -35
- package/dist/legacy-relationships-support-BcuRwRWg.js.map +1 -0
- package/dist/migration-support.js +2 -2
- package/dist/migration-support.js.map +1 -1
- package/dist/{schema-provider-m94yB7iS.js → schema-provider-DIrad3-Y.js} +1 -1
- package/dist/{schema-provider-m94yB7iS.js.map → schema-provider-DIrad3-Y.js.map} +1 -1
- package/package.json +30 -20
- package/unstable-preview-types/-private/belongs-to.d.ts +1 -0
- package/unstable-preview-types/-private/belongs-to.d.ts.map +1 -1
- package/unstable-preview-types/-private/legacy-relationships-support.d.ts.map +1 -1
- package/unstable-preview-types/-private/notify-changes.d.ts.map +1 -1
- package/unstable-preview-types/-private/record-state.d.ts +1 -1
- package/unstable-preview-types/-private/references/has-many.d.ts.map +1 -1
- package/unstable-preview-types/-private/relationship-meta.d.ts +2 -0
- package/unstable-preview-types/-private/relationship-meta.d.ts.map +1 -1
- package/unstable-preview-types/index.d.ts +18 -18
- package/unstable-preview-types/migration-support.d.ts +7 -0
- package/unstable-preview-types/migration-support.d.ts.map +1 -1
- package/dist/has-many-CshPdrqR.js.map +0 -1
- package/dist/legacy-relationships-support-D5m0xTYg.js.map +0 -1
|
@@ -6,9 +6,9 @@ import '@ember-data/store/-private';
|
|
|
6
6
|
import '@ember/debug';
|
|
7
7
|
import '@ember-data/request-utils/string';
|
|
8
8
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
9
|
-
import { u as unloadRecord, s as serialize, b as save, r as rollbackAttributes, c as reload, h as hasMany, E as Errors, d as destroyRecord, e as deleteRecord, f as RecordState, g as changedAttributes, i as belongsTo, j as createSnapshot } from "./legacy-relationships-support-
|
|
9
|
+
import { u as unloadRecord, s as serialize, b as save, r as rollbackAttributes, c as reload, h as hasMany, E as Errors, d as destroyRecord, e as deleteRecord, f as RecordState, g as changedAttributes, i as belongsTo, j as createSnapshot } from "./legacy-relationships-support-BcuRwRWg.js";
|
|
10
10
|
import '@ember/application';
|
|
11
|
-
import { b as buildSchema } from "./schema-provider-
|
|
11
|
+
import { b as buildSchema } from "./schema-provider-DIrad3-Y.js";
|
|
12
12
|
|
|
13
13
|
// 'isDestroying', 'isDestroyed'
|
|
14
14
|
const LegacyFields = ['_createSnapshot', 'adapterError', 'belongsTo', 'changedAttributes', 'constructor', 'currentState', 'deleteRecord', 'destroyRecord', 'dirtyType', 'errors', 'hasDirtyAttributes', 'hasMany', 'isDeleted', 'isEmpty', 'isError', 'isLoaded', 'isLoading', 'isNew', 'isSaving', 'isValid', 'reload', 'rollbackAttributes', 'save', 'serialize', 'unloadRecord'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-support.js","sources":["../src/migration-support.ts"],"sourcesContent":["import type Store from '@ember-data/store';\nimport { recordIdentifierFor } from '@ember-data/store';\nimport type { SchemaService } from '@ember-data/store/types';\nimport { ENABLE_LEGACY_SCHEMA_SERVICE } from '@warp-drive/build-config/deprecations';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { StableRecordIdentifier } from '@warp-drive/core-types';\nimport { getOrSetGlobal } from '@warp-drive/core-types/-private';\nimport type { ObjectValue } from '@warp-drive/core-types/json/raw';\nimport type { Derivation, HashFn, Transformation } from '@warp-drive/core-types/schema/concepts';\nimport type {\n ArrayField,\n DerivedField,\n FieldSchema,\n GenericField,\n HashField,\n ObjectField,\n ResourceSchema,\n} from '@warp-drive/core-types/schema/fields';\nimport { Type } from '@warp-drive/core-types/symbols';\nimport type { WithPartial } from '@warp-drive/core-types/utils';\n\nimport { Errors } from './-private';\nimport type { MinimalLegacyRecord } from './-private/model-methods';\nimport {\n belongsTo,\n changedAttributes,\n createSnapshot,\n deleteRecord,\n destroyRecord,\n hasMany,\n reload,\n rollbackAttributes,\n save,\n serialize,\n unloadRecord,\n} from './-private/model-methods';\nimport RecordState from './-private/record-state';\nimport { buildSchema } from './hooks';\n\ntype AttributesSchema = ReturnType<Exclude<SchemaService['attributesDefinitionFor'], undefined>>;\ntype RelationshipsSchema = ReturnType<Exclude<SchemaService['relationshipsDefinitionFor'], undefined>>;\n\n// 'isDestroying', 'isDestroyed'\nconst LegacyFields = [\n '_createSnapshot',\n 'adapterError',\n 'belongsTo',\n 'changedAttributes',\n 'constructor',\n 'currentState',\n 'deleteRecord',\n 'destroyRecord',\n 'dirtyType',\n 'errors',\n 'hasDirtyAttributes',\n 'hasMany',\n 'isDeleted',\n 'isEmpty',\n 'isError',\n 'isLoaded',\n 'isLoading',\n 'isNew',\n 'isSaving',\n 'isValid',\n 'reload',\n 'rollbackAttributes',\n 'save',\n 'serialize',\n 'unloadRecord',\n];\n\nconst LegacySupport = getOrSetGlobal('LegacySupport', new WeakMap<MinimalLegacyRecord, Record<string, unknown>>());\n\nfunction legacySupport(record: MinimalLegacyRecord, options: ObjectValue | null, prop: string): unknown {\n let state = LegacySupport.get(record);\n if (!state) {\n state = {};\n LegacySupport.set(record, state);\n }\n\n switch (prop) {\n case '_createSnapshot':\n return createSnapshot;\n case 'adapterError':\n return record.currentState.adapterError;\n case 'belongsTo':\n return belongsTo;\n case 'changedAttributes':\n return changedAttributes;\n case 'constructor':\n return (state._constructor = state._constructor || {\n isModel: true,\n name: `Record<${recordIdentifierFor(record).type}>`,\n modelName: recordIdentifierFor(record).type,\n });\n case 'currentState':\n return (state.recordState = state.recordState || new RecordState(record));\n case 'deleteRecord':\n return deleteRecord;\n case 'destroyRecord':\n return destroyRecord;\n case 'dirtyType':\n return record.currentState.dirtyType;\n case 'errors':\n // @ts-expect-error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n return (state.errors = state.errors || Errors.create({ __record: record }));\n case 'hasDirtyAttributes':\n return record.currentState.isDirty;\n case 'hasMany':\n return hasMany;\n case 'isDeleted':\n return record.currentState.isDeleted;\n case 'isEmpty':\n return record.currentState.isEmpty;\n case 'isError':\n return record.currentState.isError;\n case 'isLoaded':\n return record.currentState.isLoaded;\n case 'isLoading':\n return record.currentState.isLoading;\n case 'isNew':\n return record.currentState.isNew;\n case 'isSaving':\n return record.currentState.isSaving;\n case 'isValid':\n return record.currentState.isValid;\n case 'reload':\n return reload;\n case 'rollbackAttributes':\n return rollbackAttributes;\n case 'save':\n return save;\n case 'serialize':\n return serialize;\n case 'unloadRecord':\n return unloadRecord;\n default:\n assert(`${prop} is not a supported legacy field`, false);\n }\n}\nlegacySupport[Type] = '@legacy';\n\nexport function withDefaults(schema: WithPartial<ResourceSchema, 'legacy' | 'identity'>): ResourceSchema {\n schema.legacy = true;\n schema.identity = { kind: '@id', name: 'id' };\n\n LegacyFields.forEach((field) => {\n schema.fields.push({\n type: '@legacy',\n name: field,\n kind: 'derived',\n });\n });\n schema.fields.push({\n name: 'isReloading',\n kind: '@local',\n type: 'boolean',\n options: { defaultValue: false },\n });\n schema.fields.push({\n name: 'isDestroying',\n kind: '@local',\n type: 'boolean',\n options: { defaultValue: false },\n });\n schema.fields.push({\n name: 'isDestroyed',\n kind: '@local',\n type: 'boolean',\n options: { defaultValue: false },\n });\n return schema as ResourceSchema;\n}\n\nexport function registerDerivations(schema: SchemaService) {\n schema.registerDerivation(legacySupport);\n}\n\nexport interface DelegatingSchemaService {\n attributesDefinitionFor?(resource: StableRecordIdentifier | { type: string }): AttributesSchema;\n relationshipsDefinitionFor?(resource: StableRecordIdentifier | { type: string }): RelationshipsSchema;\n doesTypeExist?(type: string): boolean;\n}\nexport class DelegatingSchemaService implements SchemaService {\n _preferred!: SchemaService;\n _secondary!: SchemaService;\n\n constructor(store: Store, schema: SchemaService) {\n this._preferred = schema;\n this._secondary = buildSchema(store);\n }\n hasResource(resource: StableRecordIdentifier | { type: string }): boolean {\n return this._preferred.hasResource(resource) || this._secondary.hasResource(resource);\n }\n hasTrait(type: string): boolean {\n if (this._preferred.hasResource({ type })) {\n return this._preferred.hasTrait(type);\n }\n return this._secondary.hasTrait(type);\n }\n resourceHasTrait(resource: StableRecordIdentifier | { type: string }, trait: string): boolean {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.resourceHasTrait(resource, trait);\n }\n return this._secondary.resourceHasTrait(resource, trait);\n }\n fields(resource: StableRecordIdentifier | { type: string }): Map<string, FieldSchema> {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.fields(resource);\n }\n return this._secondary.fields(resource);\n }\n transformation(field: GenericField | ObjectField | ArrayField | { type: string }): Transformation {\n return this._preferred.transformation(field);\n }\n hashFn(field: HashField | { type: string }): HashFn {\n return this._preferred.hashFn(field);\n }\n derivation(field: DerivedField | { type: string }): Derivation {\n return this._preferred.derivation(field);\n }\n resource(resource: StableRecordIdentifier | { type: string }): ResourceSchema {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.resource(resource);\n }\n return this._secondary.resource(resource);\n }\n registerResources(schemas: ResourceSchema[]): void {\n this._preferred.registerResources(schemas);\n }\n registerResource(schema: ResourceSchema): void {\n this._preferred.registerResource(schema);\n }\n registerTransformation(transform: Transformation): void {\n this._preferred.registerTransformation(transform);\n }\n registerDerivation<R, T, FM extends ObjectValue | null>(derivation: Derivation<R, T, FM>): void {\n this._preferred.registerDerivation(derivation);\n }\n registerHashFn(hashFn: HashFn): void {\n this._preferred.registerHashFn(hashFn);\n }\n}\n\nif (ENABLE_LEGACY_SCHEMA_SERVICE) {\n DelegatingSchemaService.prototype.attributesDefinitionFor = function (\n resource: StableRecordIdentifier | { type: string }\n ) {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.attributesDefinitionFor!(resource);\n }\n\n return this._secondary.attributesDefinitionFor!(resource);\n };\n DelegatingSchemaService.prototype.relationshipsDefinitionFor = function (\n resource: StableRecordIdentifier | { type: string }\n ) {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.relationshipsDefinitionFor!(resource);\n }\n\n return this._secondary.relationshipsDefinitionFor!(resource);\n };\n DelegatingSchemaService.prototype.doesTypeExist = function (type: string) {\n return this._preferred.doesTypeExist?.(type) || this._secondary.doesTypeExist?.(type) || false;\n };\n}\n"],"names":["LegacyFields","LegacySupport","getOrSetGlobal","WeakMap","legacySupport","record","options","prop","state","get","set","createSnapshot","currentState","adapterError","belongsTo","changedAttributes","_constructor","isModel","name","recordIdentifierFor","type","modelName","recordState","RecordState","deleteRecord","destroyRecord","dirtyType","errors","Errors","create","__record","isDirty","hasMany","isDeleted","isEmpty","isError","isLoaded","isLoading","isNew","isSaving","isValid","reload","rollbackAttributes","save","serialize","unloadRecord","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","Error","Type","withDefaults","schema","legacy","identity","kind","forEach","field","fields","push","defaultValue","registerDerivations","registerDerivation","DelegatingSchemaService","_preferred","_secondary","constructor","store","buildSchema","hasResource","resource","hasTrait","resourceHasTrait","trait","transformation","hashFn","derivation","registerResources","schemas","registerResource","registerTransformation","transform","registerHashFn","deprecations","ENABLE_LEGACY_SCHEMA_SERVICE","prototype","attributesDefinitionFor","relationshipsDefinitionFor","doesTypeExist"],"mappings":";;;;;;;;;;;;AA0CA;AACA,MAAMA,YAAY,GAAG,CACnB,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,cAAc,EACd,eAAe,EACf,WAAW,EACX,QAAQ,EACR,oBAAoB,EACpB,SAAS,EACT,WAAW,EACX,SAAS,EACT,SAAS,EACT,UAAU,EACV,WAAW,EACX,OAAO,EACP,UAAU,EACV,SAAS,EACT,QAAQ,EACR,oBAAoB,EACp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ACX,UAAU,CAACkB,cAAc,CAACP,MAAM,CAAC;AACxC;AACF;AAEA,IAAAhC,cAAA,CAAAC,eAAA,EAAA,CAAAC,SAAA,CAAAsC,YAAA,CAAAC,4BAAA,CAAkC,EAAA;AAChCrB,EAAAA,uBAAuB,CAACsB,SAAS,CAACC,uBAAuB,GAAG,UAC1DhB,QAAmD,EACnD;IACA,IAAI,IAAI,CAACN,UAAU,CAACK,WAAW,CAACC,QAAQ,CAAC,EAAE;AACzC,MAAA,OAAO,IAAI,CAACN,UAAU,CAACsB,uBAAuB,CAAEhB,QAAQ,CAAC;AAC3D;AAEA,IAAA,OAAO,IAAI,CAACL,UAAU,CAACqB,uBAAuB,CAAEhB,QAAQ,CAAC;GAC1D;AACDP,EAAAA,uBAAuB,CAACsB,SAAS,CAACE,0BAA0B,GAAG,UAC7DjB,QAAmD,EACnD;IACA,IAAI,IAAI,CAACN,UAAU,CAACK,WAAW,CAACC,QAAQ,CAAC,EAAE;AACzC,MAAA,OAAO,IAAI,CAACN,UAAU,CAACuB,0BAA0B,CAAEjB,QAAQ,CAAC;AAC9D;AAEA,IAAA,OAAO,IAAI,CAACL,UAAU,CAACsB,0BAA0B,CAAEjB,QAAQ,CAAC;GAC7D;AACDP,EAAAA,uBAAuB,CAACsB,SAAS,CAACG,aAAa,GAAG,UAAUvE,IAAY,EAAE;AACxE,IAAA,OAAO,IAAI,CAAC+C,UAAU,CAACwB,aAAa,GAAGvE,IAAI,CAAC,IAAI,IAAI,CAACgD,UAAU,CAACuB,aAAa,GAAGvE,IAAI,CAAC,IAAI,KAAK;GAC/F;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"migration-support.js","sources":["../src/migration-support.ts"],"sourcesContent":["import type Store from '@ember-data/store';\nimport { recordIdentifierFor } from '@ember-data/store';\nimport type { SchemaService } from '@ember-data/store/types';\nimport { ENABLE_LEGACY_SCHEMA_SERVICE } from '@warp-drive/build-config/deprecations';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { StableRecordIdentifier } from '@warp-drive/core-types';\nimport { getOrSetGlobal } from '@warp-drive/core-types/-private';\nimport type { ObjectValue } from '@warp-drive/core-types/json/raw';\nimport type { TypedRecordInstance } from '@warp-drive/core-types/record';\nimport type { Derivation, HashFn, Transformation } from '@warp-drive/core-types/schema/concepts';\nimport type {\n ArrayField,\n DerivedField,\n FieldSchema,\n GenericField,\n HashField,\n ObjectField,\n ResourceSchema,\n} from '@warp-drive/core-types/schema/fields';\nimport { Type } from '@warp-drive/core-types/symbols';\nimport type { WithPartial } from '@warp-drive/core-types/utils';\n\nimport { Errors } from './-private';\nimport type { MinimalLegacyRecord } from './-private/model-methods';\nimport {\n belongsTo,\n changedAttributes,\n createSnapshot,\n deleteRecord,\n destroyRecord,\n hasMany,\n reload,\n rollbackAttributes,\n save,\n serialize,\n unloadRecord,\n} from './-private/model-methods';\nimport RecordState from './-private/record-state';\nimport { buildSchema } from './hooks';\n\nexport type WithLegacyDerivations<T extends TypedRecordInstance> = T &\n MinimalLegacyRecord & {\n belongsTo: typeof belongsTo;\n hasMany: typeof hasMany;\n };\n\ntype AttributesSchema = ReturnType<Exclude<SchemaService['attributesDefinitionFor'], undefined>>;\ntype RelationshipsSchema = ReturnType<Exclude<SchemaService['relationshipsDefinitionFor'], undefined>>;\n\n// 'isDestroying', 'isDestroyed'\nconst LegacyFields = [\n '_createSnapshot',\n 'adapterError',\n 'belongsTo',\n 'changedAttributes',\n 'constructor',\n 'currentState',\n 'deleteRecord',\n 'destroyRecord',\n 'dirtyType',\n 'errors',\n 'hasDirtyAttributes',\n 'hasMany',\n 'isDeleted',\n 'isEmpty',\n 'isError',\n 'isLoaded',\n 'isLoading',\n 'isNew',\n 'isSaving',\n 'isValid',\n 'reload',\n 'rollbackAttributes',\n 'save',\n 'serialize',\n 'unloadRecord',\n];\n\nconst LegacySupport = getOrSetGlobal('LegacySupport', new WeakMap<MinimalLegacyRecord, Record<string, unknown>>());\n\nfunction legacySupport(record: MinimalLegacyRecord, options: ObjectValue | null, prop: string): unknown {\n let state = LegacySupport.get(record);\n if (!state) {\n state = {};\n LegacySupport.set(record, state);\n }\n\n switch (prop) {\n case '_createSnapshot':\n return createSnapshot;\n case 'adapterError':\n return record.currentState.adapterError;\n case 'belongsTo':\n return belongsTo;\n case 'changedAttributes':\n return changedAttributes;\n case 'constructor':\n return (state._constructor = state._constructor || {\n isModel: true,\n name: `Record<${recordIdentifierFor(record).type}>`,\n modelName: recordIdentifierFor(record).type,\n });\n case 'currentState':\n return (state.recordState = state.recordState || new RecordState(record));\n case 'deleteRecord':\n return deleteRecord;\n case 'destroyRecord':\n return destroyRecord;\n case 'dirtyType':\n return record.currentState.dirtyType;\n case 'errors':\n // @ts-expect-error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n return (state.errors = state.errors || Errors.create({ __record: record }));\n case 'hasDirtyAttributes':\n return record.currentState.isDirty;\n case 'hasMany':\n return hasMany;\n case 'isDeleted':\n return record.currentState.isDeleted;\n case 'isEmpty':\n return record.currentState.isEmpty;\n case 'isError':\n return record.currentState.isError;\n case 'isLoaded':\n return record.currentState.isLoaded;\n case 'isLoading':\n return record.currentState.isLoading;\n case 'isNew':\n return record.currentState.isNew;\n case 'isSaving':\n return record.currentState.isSaving;\n case 'isValid':\n return record.currentState.isValid;\n case 'reload':\n return reload;\n case 'rollbackAttributes':\n return rollbackAttributes;\n case 'save':\n return save;\n case 'serialize':\n return serialize;\n case 'unloadRecord':\n return unloadRecord;\n default:\n assert(`${prop} is not a supported legacy field`, false);\n }\n}\nlegacySupport[Type] = '@legacy';\n\nexport function withDefaults(schema: WithPartial<ResourceSchema, 'legacy' | 'identity'>): ResourceSchema {\n schema.legacy = true;\n schema.identity = { kind: '@id', name: 'id' };\n\n LegacyFields.forEach((field) => {\n schema.fields.push({\n type: '@legacy',\n name: field,\n kind: 'derived',\n });\n });\n schema.fields.push({\n name: 'isReloading',\n kind: '@local',\n type: 'boolean',\n options: { defaultValue: false },\n });\n schema.fields.push({\n name: 'isDestroying',\n kind: '@local',\n type: 'boolean',\n options: { defaultValue: false },\n });\n schema.fields.push({\n name: 'isDestroyed',\n kind: '@local',\n type: 'boolean',\n options: { defaultValue: false },\n });\n return schema as ResourceSchema;\n}\n\nexport function registerDerivations(schema: SchemaService) {\n schema.registerDerivation(legacySupport);\n}\n\nexport interface DelegatingSchemaService {\n attributesDefinitionFor?(resource: StableRecordIdentifier | { type: string }): AttributesSchema;\n relationshipsDefinitionFor?(resource: StableRecordIdentifier | { type: string }): RelationshipsSchema;\n doesTypeExist?(type: string): boolean;\n}\nexport class DelegatingSchemaService implements SchemaService {\n _preferred!: SchemaService;\n _secondary!: SchemaService;\n\n constructor(store: Store, schema: SchemaService) {\n this._preferred = schema;\n this._secondary = buildSchema(store);\n }\n hasResource(resource: StableRecordIdentifier | { type: string }): boolean {\n return this._preferred.hasResource(resource) || this._secondary.hasResource(resource);\n }\n hasTrait(type: string): boolean {\n if (this._preferred.hasResource({ type })) {\n return this._preferred.hasTrait(type);\n }\n return this._secondary.hasTrait(type);\n }\n resourceHasTrait(resource: StableRecordIdentifier | { type: string }, trait: string): boolean {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.resourceHasTrait(resource, trait);\n }\n return this._secondary.resourceHasTrait(resource, trait);\n }\n fields(resource: StableRecordIdentifier | { type: string }): Map<string, FieldSchema> {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.fields(resource);\n }\n return this._secondary.fields(resource);\n }\n transformation(field: GenericField | ObjectField | ArrayField | { type: string }): Transformation {\n return this._preferred.transformation(field);\n }\n hashFn(field: HashField | { type: string }): HashFn {\n return this._preferred.hashFn(field);\n }\n derivation(field: DerivedField | { type: string }): Derivation {\n return this._preferred.derivation(field);\n }\n resource(resource: StableRecordIdentifier | { type: string }): ResourceSchema {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.resource(resource);\n }\n return this._secondary.resource(resource);\n }\n registerResources(schemas: ResourceSchema[]): void {\n this._preferred.registerResources(schemas);\n }\n registerResource(schema: ResourceSchema): void {\n this._preferred.registerResource(schema);\n }\n registerTransformation(transform: Transformation): void {\n this._preferred.registerTransformation(transform);\n }\n registerDerivation<R, T, FM extends ObjectValue | null>(derivation: Derivation<R, T, FM>): void {\n this._preferred.registerDerivation(derivation);\n }\n registerHashFn(hashFn: HashFn): void {\n this._preferred.registerHashFn(hashFn);\n }\n}\n\nif (ENABLE_LEGACY_SCHEMA_SERVICE) {\n DelegatingSchemaService.prototype.attributesDefinitionFor = function (\n resource: StableRecordIdentifier | { type: string }\n ) {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.attributesDefinitionFor!(resource);\n }\n\n return this._secondary.attributesDefinitionFor!(resource);\n };\n DelegatingSchemaService.prototype.relationshipsDefinitionFor = function (\n resource: StableRecordIdentifier | { type: string }\n ) {\n if (this._preferred.hasResource(resource)) {\n return this._preferred.relationshipsDefinitionFor!(resource);\n }\n\n return this._secondary.relationshipsDefinitionFor!(resource);\n };\n DelegatingSchemaService.prototype.doesTypeExist = function (type: string) {\n return this._preferred.doesTypeExist?.(type) || this._secondary.doesTypeExist?.(type) || false;\n };\n}\n"],"names":["LegacyFields","LegacySupport","getOrSetGlobal","WeakMap","legacySupport","record","options","prop","state","get","set","createSnapshot","currentState","adapterError","belongsTo","changedAttributes","_constructor","isModel","name","recordIdentifierFor","type","modelName","recordState","RecordState","deleteRecord","destroyRecord","dirtyType","errors","Errors","create","__record","isDirty","hasMany","isDeleted","isEmpty","isError","isLoaded","isLoading","isNew","isSaving","isValid","reload","rollbackAttributes","save","serialize","unloadRecord","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","Error","Type","withDefaults","schema","legacy","identity","kind","forEach","field","fields","push","defaultValue","registerDerivations","registerDerivation","DelegatingSchemaService","_preferred","_secondary","constructor","store","buildSchema","hasResource","resource","hasTrait","resourceHasTrait","trait","transformation","hashFn","derivation","registerResources","schemas","registerResource","registerTransformation","transform","registerHashFn","deprecations","ENABLE_LEGACY_SCHEMA_SERVICE","prototype","attributesD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AAGvE,IAAI,CAAC,IAAI,IAAI,CAACgD,UAAU,CAACuB,aAAa,GAAGvE,IAAI,CAAC,IAAI,KAAK;GAC/F;AACH;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getOwner } from '@ember/application';
|
|
2
2
|
import { deprecate } from '@ember/debug';
|
|
3
|
-
import { M as Model, n as normalizeModelName } from "./legacy-relationships-support-
|
|
3
|
+
import { M as Model, n as normalizeModelName } from "./legacy-relationships-support-BcuRwRWg.js";
|
|
4
4
|
import { macroCondition, getGlobalConfig } from '@embroider/macros';
|
|
5
5
|
|
|
6
6
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-provider-m94yB7iS.js","sources":["../src/-private/model-for-mixin.ts","../src/-private/schema-provider.ts"],"sourcesContent":["import { getOwner } from '@ember/application';\n\nimport type Store from '@ember-data/store';\n\nimport { Model, type ModelFactory } from './model';\n\n/*\n In case someone defined a relationship to a mixin, for example:\n ```ts\n class CommentModel extends Model {\n @belongsTo('commentable', { polymorphic: true }) owner;\n }\n\n let Commentable = Mixin.create({\n @hasMany('comment') comments;\n });\n ```\n we want to look up a Commentable class which has all the necessary\n relationship meta data. Thus, we look up the mixin and create a mock\n Model, so we can access the relationship CPs of the mixin (`comments`)\n in this case\n */\nexport default function modelForMixin(store: Store, normalizedModelName: string): ModelFactory | undefined {\n const owner = getOwner(store)!;\n const MaybeMixin = owner.factoryFor(`mixin:${normalizedModelName}`);\n const mixin = MaybeMixin && MaybeMixin.class;\n if (mixin) {\n const ModelForMixin = Model.extend(mixin) as unknown as { __isMixin: boolean; __mixin: typeof mixin };\n ModelForMixin.__isMixin = true;\n ModelForMixin.__mixin = mixin;\n //Cache the class as a model\n owner.register(`model:${normalizedModelName}`, ModelForMixin);\n }\n return owner.factoryFor(`model:${normalizedModelName}`) as ModelFactory | undefined;\n}\n","import { getOwner } from '@ember/application';\nimport { deprecate } from '@ember/debug';\n\nimport type Store from '@ember-data/store';\nimport type { SchemaService } from '@ember-data/store/types';\nimport {\n DEPRECATE_STRING_ARG_SCHEMAS,\n DISABLE_6X_DEPRECATIONS,\n ENABLE_LEGACY_SCHEMA_SERVICE,\n} from '@warp-drive/build-config/deprecations';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { RecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier';\nimport type { ObjectValue } from '@warp-drive/core-types/json/raw';\nimport type { Derivation, HashFn, Transformation } from '@warp-drive/core-types/schema/concepts';\nimport type {\n ArrayField,\n DerivedField,\n GenericField,\n HashField,\n LegacyAttributeField,\n LegacyFieldSchema,\n LegacyRelationshipSchema,\n ObjectField,\n ResourceSchema,\n} from '@warp-drive/core-types/schema/fields';\n\nimport type { FactoryCache, Model, ModelFactory, ModelStore } from './model';\nimport _modelForMixin from './model-for-mixin';\nimport { normalizeModelName } from './util';\n\ntype AttributesSchema = ReturnType<Exclude<SchemaService['attributesDefinitionFor'], undefined>>;\ntype RelationshipsSchema = ReturnType<Exclude<SchemaService['relationshipsDefinitionFor'], undefined>>;\n\ntype InternalSchema = {\n schema: ResourceSchema;\n fields: Map<string, LegacyAttributeField | LegacyRelationshipSchema>;\n attributes: Record<string, LegacyAttributeField>;\n relationships: Record<string, LegacyRelationshipSchema>;\n};\n\nexport interface ModelSchemaProvider {\n attributesDefinitionFor(resource: RecordIdentifier | { type: string }): AttributesSchema;\n\n relationshipsDefinitionFor(resource: RecordIdentifier | { type: string }): RelationshipsSchema;\n\n doesTypeExist(type: string): boolean;\n}\nexport class ModelSchemaProvider implements SchemaService {\n declare store: ModelStore;\n declare _schemas: Map<string, InternalSchema>;\n declare _typeMisses: Set<string>;\n\n constructor(store: ModelStore) {\n this.store = store;\n this._schemas = new Map();\n this._typeMisses = new Set();\n }\n\n hasTrait(type: string): boolean {\n assert(`hasTrait is not available with @ember-data/model's SchemaService`);\n return false;\n }\n resourceHasTrait(resource: StableRecordIdentifier | { type: string }, trait: string): boolean {\n assert(`resourceHasTrait is not available with @ember-data/model's SchemaService`);\n return false;\n }\n transformation(field: GenericField | ObjectField | ArrayField | { type: string }): Transformation {\n assert(`transformation is not available with @ember-data/model's SchemaService`);\n }\n derivation(field: DerivedField | { type: string }): Derivation {\n assert(`derivation is not available with @ember-data/model's SchemaService`);\n }\n hashFn(field: HashField | { type: string }): HashFn {\n assert(`hashFn is not available with @ember-data/model's SchemaService`);\n }\n resource(resource: StableRecordIdentifier | { type: string }): ResourceSchema {\n const type = normalizeModelName(resource.type);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.schema;\n }\n registerResources(schemas: ResourceSchema[]): void {\n assert(`registerResources is not available with @ember-data/model's SchemaService`);\n }\n registerResource(schema: ResourceSchema): void {\n assert(`registerResource is not available with @ember-data/model's SchemaService`);\n }\n registerTransformation(transform: Transformation): void {\n assert(`registerTransformation is not available with @ember-data/model's SchemaService`);\n }\n registerDerivation<R, T, FM extends ObjectValue | null>(derivation: Derivation<R, T, FM>): void {\n assert(`registerDerivation is not available with @ember-data/model's SchemaService`);\n }\n registerHashFn(hashFn: HashFn): void {\n assert(`registerHashFn is not available with @ember-data/model's SchemaService`);\n }\n _loadModelSchema(type: string) {\n const modelClass = this.store.modelFor(type) as typeof Model;\n const attributeMap = modelClass.attributes;\n\n const attributes = Object.create(null) as AttributesSchema;\n attributeMap.forEach((meta, name) => (attributes[name] = meta));\n const relationships = modelClass.relationshipsObject || null;\n const fields = new Map<string, LegacyAttributeField | LegacyRelationshipSchema>();\n\n for (const attr of Object.values(attributes)) {\n fields.set(attr.name, attr);\n }\n\n for (const rel of Object.values(relationships)) {\n fields.set(rel.name, rel);\n }\n\n const schema: ResourceSchema = {\n legacy: true,\n identity: { name: 'id', kind: '@id' },\n type,\n fields: Array.from(fields.values()),\n };\n\n const internalSchema: InternalSchema = {\n schema,\n attributes,\n relationships,\n fields,\n };\n\n this._schemas.set(type, internalSchema);\n\n return internalSchema;\n }\n\n fields(resource: RecordIdentifier | { type: string }): Map<string, LegacyFieldSchema> {\n const type = normalizeModelName(resource.type);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.fields;\n }\n\n hasResource(resource: { type: string }): boolean {\n const type = normalizeModelName(resource.type);\n\n if (this._schemas.has(type)) {\n return true;\n }\n\n if (this._typeMisses.has(type)) {\n return false;\n }\n\n const factory = getModelFactory(this.store, type);\n const exists = factory !== null;\n\n if (!exists) {\n this._typeMisses.add(type);\n return false;\n }\n\n return true;\n }\n}\n\nif (ENABLE_LEGACY_SCHEMA_SERVICE) {\n ModelSchemaProvider.prototype.doesTypeExist = function (type: string): boolean {\n deprecate(\n `Use \\`schema.hasResource({ type })\\` instead of \\`schema.doesTypeExist(type)\\``,\n /* inline-macro-config */ DISABLE_6X_DEPRECATIONS,\n {\n id: 'ember-data:schema-service-updates',\n until: '6.0',\n for: 'ember-data',\n since: {\n available: '4.13',\n enabled: '5.4',\n },\n }\n );\n return this.hasResource({ type });\n };\n\n ModelSchemaProvider.prototype.attributesDefinitionFor = function (\n resource: RecordIdentifier | { type: string }\n ): AttributesSchema {\n let rawType: string;\n if (DEPRECATE_STRING_ARG_SCHEMAS) {\n if (typeof resource === 'string') {\n deprecate(\n `relationshipsDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string.`,\n false,\n {\n id: 'ember-data:deprecate-string-arg-schemas',\n for: 'ember-data',\n until: '5.0',\n since: { enabled: '4.5', available: '4.5' },\n }\n );\n rawType = resource;\n } else {\n rawType = resource.type;\n }\n } else {\n rawType = resource.type;\n }\n\n deprecate(\n `Use \\`schema.fields({ type })\\` instead of \\`schema.attributesDefinitionFor({ type })\\``,\n /* inline-macro-config */ DISABLE_6X_DEPRECATIONS,\n {\n id: 'ember-data:schema-service-updates',\n until: '6.0',\n for: 'ember-data',\n since: {\n available: '4.13',\n enabled: '5.4',\n },\n }\n );\n const type = normalizeModelName(rawType);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.attributes;\n };\n\n ModelSchemaProvider.prototype.relationshipsDefinitionFor = function (\n resource: RecordIdentifier | { type: string }\n ): RelationshipsSchema {\n let rawType: string;\n if (DEPRECATE_STRING_ARG_SCHEMAS) {\n if (typeof resource === 'string') {\n deprecate(\n `relationshipsDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string.`,\n false,\n {\n id: 'ember-data:deprecate-string-arg-schemas',\n for: 'ember-data',\n until: '5.0',\n since: { enabled: '4.5', available: '4.5' },\n }\n );\n rawType = resource;\n } else {\n rawType = resource.type;\n }\n } else {\n rawType = resource.type;\n }\n\n deprecate(\n `Use \\`schema.fields({ type })\\` instead of \\`schema.relationshipsDefinitionFor({ type })\\``,\n /* inline-macro-config */ DISABLE_6X_DEPRECATIONS,\n {\n id: 'ember-data:schema-service-updates',\n until: '6.0',\n for: 'ember-data',\n since: {\n available: '4.13',\n enabled: '5.4',\n },\n }\n );\n const type = normalizeModelName(rawType);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.relationships;\n };\n}\n\nexport function buildSchema(store: Store): SchemaService {\n return new ModelSchemaProvider(store as ModelStore);\n}\n\nexport function getModelFactory(store: ModelStore, type: string): ModelFactory | null {\n if (!store._modelFactoryCache) {\n store._modelFactoryCache = Object.create(null) as FactoryCache;\n }\n const cache = store._modelFactoryCache;\n let factory: ModelFactory | undefined = cache[type];\n\n if (!factory) {\n const owner = getOwner(store)!;\n factory = owner.factoryFor(`model:${type}`) as ModelFactory | undefined;\n\n if (!factory) {\n //Support looking up mixins as base types for polymorphic relationships\n factory = _modelForMixin(store, type);\n }\n\n if (!factory) {\n // we don't cache misses in case someone wants to register a missing model\n return null;\n }\n\n const klass = factory.class;\n\n if (klass.isModel) {\n const hasOwnModelNameSet = klass.modelName && Object.prototype.hasOwnProperty.call(klass, 'modelName');\n if (!hasOwnModelNameSet) {\n Object.defineProperty(klass, 'modelName', { value: type });\n }\n }\n\n cache[type] = factory;\n }\n\n return factory;\n}\n"],"names":["modelForMixin","store","normalizedModelName","owner","getOwner","MaybeMixin","factoryFor","mixin","class","ModelForMixin","Model","extend","__isMixin","__mixin","register","ModelSchemaProvider","constructor","_schemas","Map","_typeMisses","Set","hasTrait","type","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","Error","resourceHasTrait","resource","trait","transformation","field","derivation","hashFn","normalizeModelName","has","_loadModelSchema","get","schema","registerResources","schemas","registerResource","registerTransformation","transform","registerDerivation","registerHashFn","modelClass","modelFor","attributeMap","attributes","Object","create","forEach","meta","name","relationships","relationshipsObject","fields","attr","values","set","rel","legacy","identity","kind","Array","from","internalSchema","hasResource","factory","getModelFactory","exists","add","deprecations","ENABLE_LEGACY_SCHEMA_SERVICE","prototype","doesTypeExist","deprecate","DISABLE_6X_DEPRECATIONS","id","until","for","since","available","enabled","attributesDefinitionFor","rawType","DEPRECATE_STRING_ARG_SCHEMAS","relationshipsDefinitionFor","buildSchema","_modelFactoryCache","cache","_modelForMixin","klass","isModel","hasOwnModelNameSet","modelName","hasOwnProperty","call","defineProperty","value"],"mappings":";;;;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,aAAaA,CAACC,KAAY,EAAEC,mBAA2B,EAA4B;AACzG,EAAA,MAAMC,KAAK,GAAGC,QAAQ,CAACH,KAAK,CAAE;EAC9B,MAAMI,UAAU,GAAGF,KAAK,CAACG,UAAU,CAAC,CAAA,MAAA,EAASJ,mBAAmB,CAAA,CAAE,CAAC;AACnE,EAAA,MAAMK,KAAK,GAAGF,UAAU,IAAIA,UAAU,CAACG,KAAK;AAC5C,EAAA,IAAID,KAAK,EAAE;AACT,IAAA,MAAME,aAAa,GAAGC,KAAK,CAACC,MAAM,CAACJ,KAAK,CAA6D;IACrGE,aAAa,CAACG,SAAS,GAAG,IAAI;IAC9BH,aAAa,CAACI,OAAO,GAAGN,KAAK;AAC7B;I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;AACF;AAEAwE,IAAAA,KAAK,CAACxE,IAAI,CAAC,GAAGkD,OAAO;AACvB;AAEA,EAAA,OAAOA,OAAO;AAChB;;;;"}
|
|
1
|
+
{"version":3,"file":"schema-provider-DIrad3-Y.js","sources":["../src/-private/model-for-mixin.ts","../src/-private/schema-provider.ts"],"sourcesContent":["import { getOwner } from '@ember/application';\n\nimport type Store from '@ember-data/store';\n\nimport { Model, type ModelFactory } from './model';\n\n/*\n In case someone defined a relationship to a mixin, for example:\n ```ts\n class CommentModel extends Model {\n @belongsTo('commentable', { polymorphic: true }) owner;\n }\n\n let Commentable = Mixin.create({\n @hasMany('comment') comments;\n });\n ```\n we want to look up a Commentable class which has all the necessary\n relationship meta data. Thus, we look up the mixin and create a mock\n Model, so we can access the relationship CPs of the mixin (`comments`)\n in this case\n */\nexport default function modelForMixin(store: Store, normalizedModelName: string): ModelFactory | undefined {\n const owner = getOwner(store)!;\n const MaybeMixin = owner.factoryFor(`mixin:${normalizedModelName}`);\n const mixin = MaybeMixin && MaybeMixin.class;\n if (mixin) {\n const ModelForMixin = Model.extend(mixin) as unknown as { __isMixin: boolean; __mixin: typeof mixin };\n ModelForMixin.__isMixin = true;\n ModelForMixin.__mixin = mixin;\n //Cache the class as a model\n owner.register(`model:${normalizedModelName}`, ModelForMixin);\n }\n return owner.factoryFor(`model:${normalizedModelName}`) as ModelFactory | undefined;\n}\n","import { getOwner } from '@ember/application';\nimport { deprecate } from '@ember/debug';\n\nimport type Store from '@ember-data/store';\nimport type { SchemaService } from '@ember-data/store/types';\nimport {\n DEPRECATE_STRING_ARG_SCHEMAS,\n DISABLE_6X_DEPRECATIONS,\n ENABLE_LEGACY_SCHEMA_SERVICE,\n} from '@warp-drive/build-config/deprecations';\nimport { assert } from '@warp-drive/build-config/macros';\nimport type { RecordIdentifier, StableRecordIdentifier } from '@warp-drive/core-types/identifier';\nimport type { ObjectValue } from '@warp-drive/core-types/json/raw';\nimport type { Derivation, HashFn, Transformation } from '@warp-drive/core-types/schema/concepts';\nimport type {\n ArrayField,\n DerivedField,\n GenericField,\n HashField,\n LegacyAttributeField,\n LegacyFieldSchema,\n LegacyRelationshipSchema,\n ObjectField,\n ResourceSchema,\n} from '@warp-drive/core-types/schema/fields';\n\nimport type { FactoryCache, Model, ModelFactory, ModelStore } from './model';\nimport _modelForMixin from './model-for-mixin';\nimport { normalizeModelName } from './util';\n\ntype AttributesSchema = ReturnType<Exclude<SchemaService['attributesDefinitionFor'], undefined>>;\ntype RelationshipsSchema = ReturnType<Exclude<SchemaService['relationshipsDefinitionFor'], undefined>>;\n\ntype InternalSchema = {\n schema: ResourceSchema;\n fields: Map<string, LegacyAttributeField | LegacyRelationshipSchema>;\n attributes: Record<string, LegacyAttributeField>;\n relationships: Record<string, LegacyRelationshipSchema>;\n};\n\nexport interface ModelSchemaProvider {\n attributesDefinitionFor(resource: RecordIdentifier | { type: string }): AttributesSchema;\n\n relationshipsDefinitionFor(resource: RecordIdentifier | { type: string }): RelationshipsSchema;\n\n doesTypeExist(type: string): boolean;\n}\nexport class ModelSchemaProvider implements SchemaService {\n declare store: ModelStore;\n declare _schemas: Map<string, InternalSchema>;\n declare _typeMisses: Set<string>;\n\n constructor(store: ModelStore) {\n this.store = store;\n this._schemas = new Map();\n this._typeMisses = new Set();\n }\n\n hasTrait(type: string): boolean {\n assert(`hasTrait is not available with @ember-data/model's SchemaService`);\n return false;\n }\n resourceHasTrait(resource: StableRecordIdentifier | { type: string }, trait: string): boolean {\n assert(`resourceHasTrait is not available with @ember-data/model's SchemaService`);\n return false;\n }\n transformation(field: GenericField | ObjectField | ArrayField | { type: string }): Transformation {\n assert(`transformation is not available with @ember-data/model's SchemaService`);\n }\n derivation(field: DerivedField | { type: string }): Derivation {\n assert(`derivation is not available with @ember-data/model's SchemaService`);\n }\n hashFn(field: HashField | { type: string }): HashFn {\n assert(`hashFn is not available with @ember-data/model's SchemaService`);\n }\n resource(resource: StableRecordIdentifier | { type: string }): ResourceSchema {\n const type = normalizeModelName(resource.type);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.schema;\n }\n registerResources(schemas: ResourceSchema[]): void {\n assert(`registerResources is not available with @ember-data/model's SchemaService`);\n }\n registerResource(schema: ResourceSchema): void {\n assert(`registerResource is not available with @ember-data/model's SchemaService`);\n }\n registerTransformation(transform: Transformation): void {\n assert(`registerTransformation is not available with @ember-data/model's SchemaService`);\n }\n registerDerivation<R, T, FM extends ObjectValue | null>(derivation: Derivation<R, T, FM>): void {\n assert(`registerDerivation is not available with @ember-data/model's SchemaService`);\n }\n registerHashFn(hashFn: HashFn): void {\n assert(`registerHashFn is not available with @ember-data/model's SchemaService`);\n }\n _loadModelSchema(type: string) {\n const modelClass = this.store.modelFor(type) as typeof Model;\n const attributeMap = modelClass.attributes;\n\n const attributes = Object.create(null) as AttributesSchema;\n attributeMap.forEach((meta, name) => (attributes[name] = meta));\n const relationships = modelClass.relationshipsObject || null;\n const fields = new Map<string, LegacyAttributeField | LegacyRelationshipSchema>();\n\n for (const attr of Object.values(attributes)) {\n fields.set(attr.name, attr);\n }\n\n for (const rel of Object.values(relationships)) {\n fields.set(rel.name, rel);\n }\n\n const schema: ResourceSchema = {\n legacy: true,\n identity: { name: 'id', kind: '@id' },\n type,\n fields: Array.from(fields.values()),\n };\n\n const internalSchema: InternalSchema = {\n schema,\n attributes,\n relationships,\n fields,\n };\n\n this._schemas.set(type, internalSchema);\n\n return internalSchema;\n }\n\n fields(resource: RecordIdentifier | { type: string }): Map<string, LegacyFieldSchema> {\n const type = normalizeModelName(resource.type);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.fields;\n }\n\n hasResource(resource: { type: string }): boolean {\n const type = normalizeModelName(resource.type);\n\n if (this._schemas.has(type)) {\n return true;\n }\n\n if (this._typeMisses.has(type)) {\n return false;\n }\n\n const factory = getModelFactory(this.store, type);\n const exists = factory !== null;\n\n if (!exists) {\n this._typeMisses.add(type);\n return false;\n }\n\n return true;\n }\n}\n\nif (ENABLE_LEGACY_SCHEMA_SERVICE) {\n ModelSchemaProvider.prototype.doesTypeExist = function (type: string): boolean {\n deprecate(\n `Use \\`schema.hasResource({ type })\\` instead of \\`schema.doesTypeExist(type)\\``,\n /* inline-macro-config */ DISABLE_6X_DEPRECATIONS,\n {\n id: 'ember-data:schema-service-updates',\n until: '6.0',\n for: 'ember-data',\n since: {\n available: '4.13',\n enabled: '5.4',\n },\n }\n );\n return this.hasResource({ type });\n };\n\n ModelSchemaProvider.prototype.attributesDefinitionFor = function (\n resource: RecordIdentifier | { type: string }\n ): AttributesSchema {\n let rawType: string;\n if (DEPRECATE_STRING_ARG_SCHEMAS) {\n if (typeof resource === 'string') {\n deprecate(\n `relationshipsDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string.`,\n false,\n {\n id: 'ember-data:deprecate-string-arg-schemas',\n for: 'ember-data',\n until: '5.0',\n since: { enabled: '4.5', available: '4.5' },\n }\n );\n rawType = resource;\n } else {\n rawType = resource.type;\n }\n } else {\n rawType = resource.type;\n }\n\n deprecate(\n `Use \\`schema.fields({ type })\\` instead of \\`schema.attributesDefinitionFor({ type })\\``,\n /* inline-macro-config */ DISABLE_6X_DEPRECATIONS,\n {\n id: 'ember-data:schema-service-updates',\n until: '6.0',\n for: 'ember-data',\n since: {\n available: '4.13',\n enabled: '5.4',\n },\n }\n );\n const type = normalizeModelName(rawType);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.attributes;\n };\n\n ModelSchemaProvider.prototype.relationshipsDefinitionFor = function (\n resource: RecordIdentifier | { type: string }\n ): RelationshipsSchema {\n let rawType: string;\n if (DEPRECATE_STRING_ARG_SCHEMAS) {\n if (typeof resource === 'string') {\n deprecate(\n `relationshipsDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string.`,\n false,\n {\n id: 'ember-data:deprecate-string-arg-schemas',\n for: 'ember-data',\n until: '5.0',\n since: { enabled: '4.5', available: '4.5' },\n }\n );\n rawType = resource;\n } else {\n rawType = resource.type;\n }\n } else {\n rawType = resource.type;\n }\n\n deprecate(\n `Use \\`schema.fields({ type })\\` instead of \\`schema.relationshipsDefinitionFor({ type })\\``,\n /* inline-macro-config */ DISABLE_6X_DEPRECATIONS,\n {\n id: 'ember-data:schema-service-updates',\n until: '6.0',\n for: 'ember-data',\n since: {\n available: '4.13',\n enabled: '5.4',\n },\n }\n );\n const type = normalizeModelName(rawType);\n\n if (!this._schemas.has(type)) {\n this._loadModelSchema(type);\n }\n\n return this._schemas.get(type)!.relationships;\n };\n}\n\nexport function buildSchema(store: Store): SchemaService {\n return new ModelSchemaProvider(store as ModelStore);\n}\n\nexport function getModelFactory(store: ModelStore, type: string): ModelFactory | null {\n if (!store._modelFactoryCache) {\n store._modelFactoryCache = Object.create(null) as FactoryCache;\n }\n const cache = store._modelFactoryCache;\n let factory: ModelFactory | undefined = cache[type];\n\n if (!factory) {\n const owner = getOwner(store)!;\n factory = owner.factoryFor(`model:${type}`) as ModelFactory | undefined;\n\n if (!factory) {\n //Support looking up mixins as base types for polymorphic relationships\n factory = _modelForMixin(store, type);\n }\n\n if (!factory) {\n // we don't cache misses in case someone wants to register a missing model\n return null;\n }\n\n const klass = factory.class;\n\n if (klass.isModel) {\n const hasOwnModelNameSet = klass.modelName && Object.prototype.hasOwnProperty.call(klass, 'modelName');\n if (!hasOwnModelNameSet) {\n Object.defineProperty(klass, 'modelName', { value: type });\n }\n }\n\n cache[type] = factory;\n }\n\n return factory;\n}\n"],"names":["modelForMixin","store","normalizedModelName","owner","getOwner","MaybeMixin","factoryFor","mixin","class","ModelForMixin","Model","extend","__isMixin","__mixin","register","ModelSchemaProvider","constructor","_schemas","Map","_typeMisses","Set","hasTrait","type","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","Error","resourceHasTrait","resource","trait","transformation","field","derivation","hashFn","normalizeModelName","has","_loadModelSchema","get","schema","registerResources","schemas","registerResource","registerTransformation","transform","registerDerivation","registerHashFn","modelClass","modelFor","attributeMap","attributes","Object","create","forEach","meta","name","relationships","relationshipsObject","fields","attr","values","set","rel","legacy","identity","kind","Array","from","internalSchema","hasResource","factory","getModelFactory","exists","add","deprecations","ENABLE_LEGACY_SCHEMA_SERVICE","prototype","doesTypeExist","deprecate","DISABLE_6X_DEPRECATIONS","id","until","for","since","available","enabled","attributesDefinitionFor","rawType","DEPRECATE_STRING_ARG_SCHEMAS","relationshipsDefinitionFor","buildSchema","_modelFactoryCache","cache","_modelForMixin","klass","isModel","hasOwnModelNameSet","modelName","hasOwnProperty","call","defineProperty","value"],"mappings":";;;;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,aAAaA,CAACC,KAAY,EAAEC,mBAA2B,EAA4B;AACzG,EAAA,MAAMC,KAAK,GAAGC,QAAQ,CAACH,KAAK,CAAE;EAC9B,MAAMI,UAAU,GAAGF,KAAK,CAACG,UAAU,CAAC,CAAA,MAAA,EAASJ,mBAAmB,CAAA,CAAE,CAAC;AACnE,EAAA,MAAMK,KAAK,GAAGF,UAAU,IAAIA,UAAU,CAACG,KAAK;AAC5C,EAAA,IAAID,KAAK,EAAE;AACT,IAAA,MAAME,aAAa,GAAGC,KAAK,CAACC,MAAM,CAACJ,KAAK,CAA6D;IACrGE,aAAa,CAACG,SAAS,GAAG,IAAI;IAC9BH,aAAa,CAACI,OAAO,GAAGN,KAAK;AAC7B;IACAJ,KAAK,CAACW,QAAQ,CAAC,CAAA,MAAA,EAASZ,mBAAmB,CAAE,CAAA,EAAEO,aAAa,CAAC;AAC/D;AACA,EAAA,OAAON,KAAK,CAACG,UAAU,CAAC,CAASJ,MAAAA,EAAAA,mBAAmB,EAAE,CAAC;AACzD;;ACaO,MAAMa,mBAAmB,CAA0B;EAKxDC,WAAWA,CAACf,KAAiB,EAAE;IAC7B,IAAI,CAACA,KAAK,GAAGA,KAAK;AAClB,IAA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,KAAK,CAAC4F,kBAAkB,GAAGxC,MAAM,CAACC,MAAM,CAAC,IAAI,CAAiB;AAChE;AACA,EAAA,MAAMwC,KAAK,GAAG7F,KAAK,CAAC4F,kBAAkB;AACtC,EAAA,IAAIrB,OAAiC,GAAGsB,KAAK,CAACxE,IAAI,CAAC;EAEnD,IAAI,CAACkD,OAAO,EAAE;AACZ,IAAA,MAAMrE,KAAK,GAAGC,QAAQ,CAACH,KAAK,CAAE;IAC9BuE,OAAO,GAAGrE,KAAK,CAACG,UAAU,CAAC,CAASgB,MAAAA,EAAAA,IAAI,EAAE,CAA6B;IAEvE,IAAI,CAACkD,OAAO,EAAE;AACZ;AACAA,MAAAA,OAAO,GAAGuB,aAAc,CAAC9F,KAAK,EAAEqB,IAAI,CAAC;AACvC;IAEA,IAAI,CAACkD,OAAO,EAAE;AACZ;AACA,MAAA,OAAO,IAAI;AACb;AAEA,IAAA,MAAMwB,KAAK,GAAGxB,OAAO,CAAChE,KAAK;IAE3B,IAAIwF,KAAK,CAACC,OAAO,EAAE;AACjB,MAAA,MAAMC,kBAAkB,GAAGF,KAAK,CAACG,SAAS,IAAI9C,MAAM,CAACyB,SAAS,CAACsB,cAAc,CAACC,IAAI,CAACL,KAAK,EAAE,WAAW,CAAC;MACtG,IAAI,CAACE,kBAAkB,EAAE;AACvB7C,QAAAA,MAAM,CAACiD,cAAc,CAACN,KAAK,EAAE,WAAW,EAAE;AAAEO,UAAAA,KAAK,EAAEjF;AAAK,SAAC,CAAC;AAC5D;AACF;AAEAwE,IAAAA,KAAK,CAACxE,IAAI,CAAC,GAAGkD,OAAO;AACvB;AAEA,EAAA,OAAOA,OAAO;AAChB;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-data/model",
|
|
3
|
-
"version": "4.13.0-alpha.
|
|
3
|
+
"version": "4.13.0-alpha.4",
|
|
4
4
|
"description": "A basic Ember implementation of a resource presentation layer for use with @ember-data/store",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -37,17 +37,20 @@
|
|
|
37
37
|
},
|
|
38
38
|
"./*": {
|
|
39
39
|
"default": "./dist/*.js"
|
|
40
|
+
},
|
|
41
|
+
"./unstable-preview-types": {
|
|
42
|
+
"types": "./unstable-preview-types/index.d.ts"
|
|
40
43
|
}
|
|
41
44
|
},
|
|
42
45
|
"peerDependencies": {
|
|
43
46
|
"ember-source": "3.28.12 || ^4.0.4 || ^5.0.0 || ^6.0.0",
|
|
44
|
-
"@ember-data/graph": "4.13.0-alpha.
|
|
45
|
-
"@ember-data/json-api": "4.13.0-alpha.
|
|
46
|
-
"@ember-data/legacy-compat": "4.13.0-alpha.
|
|
47
|
-
"@ember-data/store": "4.13.0-alpha.
|
|
48
|
-
"@ember-data/tracking": "4.13.0-alpha.
|
|
49
|
-
"@ember-data/request-utils": "4.13.0-alpha.
|
|
50
|
-
"@warp-drive/core-types": "4.13.0-alpha.
|
|
47
|
+
"@ember-data/graph": "4.13.0-alpha.4",
|
|
48
|
+
"@ember-data/json-api": "4.13.0-alpha.4",
|
|
49
|
+
"@ember-data/legacy-compat": "4.13.0-alpha.4",
|
|
50
|
+
"@ember-data/store": "4.13.0-alpha.4",
|
|
51
|
+
"@ember-data/tracking": "4.13.0-alpha.4",
|
|
52
|
+
"@ember-data/request-utils": "4.13.0-alpha.4",
|
|
53
|
+
"@warp-drive/core-types": "4.13.0-alpha.4"
|
|
51
54
|
},
|
|
52
55
|
"peerDependenciesMeta": {
|
|
53
56
|
"@ember-data/json-api": {
|
|
@@ -88,29 +91,29 @@
|
|
|
88
91
|
},
|
|
89
92
|
"dependencies": {
|
|
90
93
|
"@ember/edition-utils": "^1.2.0",
|
|
91
|
-
"@embroider/macros": "^1.16.
|
|
94
|
+
"@embroider/macros": "^1.16.10",
|
|
92
95
|
"ember-cli-string-utils": "^1.1.0",
|
|
93
96
|
"ember-cli-test-info": "^1.0.0",
|
|
94
97
|
"inflection": "~3.0.0",
|
|
95
|
-
"@warp-drive/build-config": "4.13.0-alpha.
|
|
98
|
+
"@warp-drive/build-config": "4.13.0-alpha.4"
|
|
96
99
|
},
|
|
97
100
|
"devDependencies": {
|
|
98
101
|
"@babel/core": "^7.24.5",
|
|
99
102
|
"@babel/plugin-transform-typescript": "^7.24.5",
|
|
100
103
|
"@babel/preset-env": "^7.24.5",
|
|
101
104
|
"@babel/preset-typescript": "^7.24.1",
|
|
102
|
-
"@ember-data/graph": "4.13.0-alpha.
|
|
103
|
-
"@ember-data/json-api": "4.13.0-alpha.
|
|
104
|
-
"@ember-data/legacy-compat": "4.13.0-alpha.
|
|
105
|
-
"@ember-data/request": "4.13.0-alpha.
|
|
106
|
-
"@ember-data/request-utils": "4.13.0-alpha.
|
|
107
|
-
"@ember-data/store": "4.13.0-alpha.
|
|
108
|
-
"@ember-data/tracking": "4.13.0-alpha.
|
|
105
|
+
"@ember-data/graph": "4.13.0-alpha.4",
|
|
106
|
+
"@ember-data/json-api": "4.13.0-alpha.4",
|
|
107
|
+
"@ember-data/legacy-compat": "4.13.0-alpha.4",
|
|
108
|
+
"@ember-data/request": "4.13.0-alpha.4",
|
|
109
|
+
"@ember-data/request-utils": "4.13.0-alpha.4",
|
|
110
|
+
"@ember-data/store": "4.13.0-alpha.4",
|
|
111
|
+
"@ember-data/tracking": "4.13.0-alpha.4",
|
|
109
112
|
"@ember/test-waiters": "^3.1.0",
|
|
110
113
|
"@glimmer/component": "^1.1.2",
|
|
111
|
-
"@warp-drive/core-types": "4.13.0-alpha.
|
|
112
|
-
"@warp-drive/internal-config": "4.13.0-alpha.
|
|
113
|
-
"decorator-transforms": "^2.
|
|
114
|
+
"@warp-drive/core-types": "4.13.0-alpha.4",
|
|
115
|
+
"@warp-drive/internal-config": "4.13.0-alpha.4",
|
|
116
|
+
"decorator-transforms": "^2.3.0",
|
|
114
117
|
"ember-source": "~5.12.0",
|
|
115
118
|
"expect-type": "^0.20.0",
|
|
116
119
|
"pnpm-sync-dependencies-meta-injected": "0.0.14",
|
|
@@ -124,6 +127,13 @@
|
|
|
124
127
|
"extends": "../../package.json"
|
|
125
128
|
},
|
|
126
129
|
"packageManager": "pnpm@8.15.9",
|
|
130
|
+
"typesVersions": {
|
|
131
|
+
"*": {
|
|
132
|
+
"unstable-preview-types": [
|
|
133
|
+
"./unstable-preview-types"
|
|
134
|
+
]
|
|
135
|
+
}
|
|
136
|
+
},
|
|
127
137
|
"scripts": {
|
|
128
138
|
"lint": "eslint . --quiet --cache --cache-strategy=content",
|
|
129
139
|
"build:pkg": "vite build;",
|
|
@@ -9,6 +9,7 @@ declare module '@ember-data/model/-private/belongs-to' {
|
|
|
9
9
|
inverse: null | (IsUnknown<T> extends true ? string : keyof NoNull<T> & string);
|
|
10
10
|
polymorphic?: boolean;
|
|
11
11
|
as?: string;
|
|
12
|
+
linksMode?: true;
|
|
12
13
|
resetOnRemoteUpdate?: boolean;
|
|
13
14
|
};
|
|
14
15
|
export type NoNull<T> = Exclude<T, null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"belongs-to.d.ts","sourceRoot":"","sources":["../../src/-private/belongs-to.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAMtE;;EAEE;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,OAAO,SAAS,CAAC,GAAG,IAAI,GAAG,KAAK,CAAC;AAE5D,MAAM,MAAM,mBAAmB,CAAC,CAAC,EAAE,KAAK,SAAS,OAAO,IAAI;IAC1D,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,MAAM,GAAG,MAAM,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC;IAChF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,mBAAmB,CAA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 @@
|
|
|
1
|
-
{"version":3,"file":"legacy-relationships-support.d.ts","sourceRoot":"","sources":["../../src/-private/legacy-relationships-support.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAa,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/G,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"legacy-relationships-support.d.ts","sourceRoot":"","sources":["../../src/-private/legacy-relationships-support.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAa,YAAY,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/G,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAS5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAIjE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAC1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC/E,OAAO,KAAK,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEpG,OAAO,KAAK,EACV,8BAA8B,EAC9B,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,0CAA0C,CAAC;AAElD,OAAO,EAAE,iBAAiB,IAAI,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAsB,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC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SAAS,EACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"notify-changes.d.ts","sourceRoot":"","sources":["../../src/-private/notify-changes.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,UAAU,EAAE,sBAAsB,EAClC,KAAK,EAAE,gBAAgB,EACvB,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,MAAM,EAAE,KAAK,EACb,KAAK,EAAE,KAAK,QA8Bb"}
|
|
@@ -84,7 +84,7 @@ declare module '@ember-data/model/-private/record-state' {
|
|
|
84
84
|
get adapterError(): unknown;
|
|
85
85
|
get isPreloaded(): boolean;
|
|
86
86
|
get stateName(): "root.loading" | "root.empty" | "root.deleted.inFlight" | "root.deleted.saved" | "root.deleted.invalid" | "root.deleted.uncommitted" | "root.loaded.created.inFlight" | "root.loaded.created.invalid" | "root.loaded.created.uncommitted" | "root.loaded.updated.inFlight" | "root.loaded.updated.invalid" | "root.loaded.updated.uncommitted" | "root.loaded.saved";
|
|
87
|
-
get dirtyType(): "" | "
|
|
87
|
+
get dirtyType(): "" | "updated" | "deleted" | "created";
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
90
|
//# sourceMappingURL=record-state.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"has-many.d.ts","sourceRoot":"","sources":["../../../src/-private/references/has-many.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;A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E,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;CAMjE;AAGD,wBAAgB,eAAe,CAAC,MAAM,EAAE,sBAAsB,GAAG,kBAAkB,GAAG,MAAM,IAAI,sBAAsB,CAGrH"}
|
|
@@ -17,12 +17,14 @@ declare module '@ember-data/model/-private/relationship-meta' {
|
|
|
17
17
|
inverse: string | null;
|
|
18
18
|
as?: string;
|
|
19
19
|
polymorphic?: boolean;
|
|
20
|
+
linksMode?: true;
|
|
20
21
|
resetOnRemoteUpdate?: false;
|
|
21
22
|
} | {
|
|
22
23
|
async: boolean;
|
|
23
24
|
inverse: string | null;
|
|
24
25
|
as?: string;
|
|
25
26
|
polymorphic?: boolean;
|
|
27
|
+
linksMode?: true;
|
|
26
28
|
resetOnRemoteUpdate?: false;
|
|
27
29
|
};
|
|
28
30
|
get name(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relationship-meta.d.ts","sourceRoot":"","sources":["../../src/-private/relationship-meta.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAErF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAiBrC,cAAM,sBAAsB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,sBAAsB,EAAE,OAAO,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,wBAAwB,CAAC;gBAE3B,IAAI,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM;IAQnE,IAAI,IAAI,IAAI,WAAW,GAAG,SAAS,CAElC;IACD,IAAI,IAAI,IAAI,MAAM,CAMjB;IACD,IAAI,OAAO
|
|
1
|
+
{"version":3,"file":"relationship-meta.d.ts","sourceRoot":"","sources":["../../src/-private/relationship-meta.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,mBAAmB,CAAC;AAE3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAErF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAiBrC,cAAM,sBAAsB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,sBAAsB,EAAE,OAAO,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,wBAAwB,CAAC;gBAE3B,IAAI,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM;IAQnE,IAAI,IAAI,IAAI,WAAW,GAAG,SAAS,CAElC;IACD,IAAI,IAAI,IAAI,MAAM,CAMjB;IACD,IAAI,OAAO;;;;;;;;;;;;;;MAEV;IACD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,KAAK,GAAG,MAAM,GAAG,IAAI;IAOlE,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,KAAK,GAAG,IAAI;CAsBhE;AACD,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAEvC,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,wBAAwB,EAC9B,eAAe,EAAE,MAAM,GACtB,wBAAwB,CAE1B"}
|
|
@@ -1,32 +1,32 @@
|
|
|
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/
|
|
3
|
+
/// <reference path="./migration-support.d.ts" />
|
|
4
|
+
/// <reference path="./-private/has-many.type-test.d.ts" />
|
|
5
|
+
/// <reference path="./-private/has-many.d.ts" />
|
|
6
|
+
/// <reference path="./-private/belongs-to.type-test.d.ts" />
|
|
7
7
|
/// <reference path="./-private/hooks.d.ts" />
|
|
8
|
+
/// <reference path="./-private/errors.d.ts" />
|
|
9
|
+
/// <reference path="./-private/promise-belongs-to.d.ts" />
|
|
10
|
+
/// <reference path="./-private/util.d.ts" />
|
|
11
|
+
/// <reference path="./-private/model-methods.d.ts" />
|
|
12
|
+
/// <reference path="./-private/belongs-to.d.ts" />
|
|
13
|
+
/// <reference path="./-private/deprecated-promise-proxy.d.ts" />
|
|
14
|
+
/// <reference path="./-private/attr.type-test.d.ts" />
|
|
8
15
|
/// <reference path="./-private/model.d.ts" />
|
|
9
|
-
/// <reference path="./-private/belongs-to.type-test.d.ts" />
|
|
10
|
-
/// <reference path="./-private/has-many.type-test.d.ts" />
|
|
11
|
-
/// <reference path="./-private/promise-many-array.d.ts" />
|
|
12
|
-
/// <reference path="./-private/type-utils.d.ts" />
|
|
13
16
|
/// <reference path="./-private/many-array.d.ts" />
|
|
14
|
-
/// <reference path="./-private/
|
|
17
|
+
/// <reference path="./-private/record-state.d.ts" />
|
|
18
|
+
/// <reference path="./-private/promise-many-array.d.ts" />
|
|
15
19
|
/// <reference path="./-private/notify-changes.d.ts" />
|
|
20
|
+
/// <reference path="./-private/attr.d.ts" />
|
|
21
|
+
/// <reference path="./-private/model-for-mixin.d.ts" />
|
|
16
22
|
/// <reference path="./-private/legacy-relationships-support.d.ts" />
|
|
17
|
-
/// <reference path="./-private/
|
|
23
|
+
/// <reference path="./-private/model.type-test.d.ts" />
|
|
24
|
+
/// <reference path="./-private/type-utils.d.ts" />
|
|
18
25
|
/// <reference path="./-private/schema-provider.d.ts" />
|
|
19
|
-
/// <reference path="./-private/promise-belongs-to.d.ts" />
|
|
20
|
-
/// <reference path="./-private/has-many.d.ts" />
|
|
21
|
-
/// <reference path="./-private/util.d.ts" />
|
|
22
|
-
/// <reference path="./-private/attr.type-test.d.ts" />
|
|
23
26
|
/// <reference path="./-private/relationship-meta.d.ts" />
|
|
24
|
-
/// <reference path="./-private/model-methods.d.ts" />
|
|
25
|
-
/// <reference path="./-private/record-state.d.ts" />
|
|
26
|
-
/// <reference path="./-private/deprecated-promise-proxy.d.ts" />
|
|
27
27
|
/// <reference path="./-private/debug/assert-polymorphic-type.d.ts" />
|
|
28
|
-
/// <reference path="./-private/references/belongs-to.d.ts" />
|
|
29
28
|
/// <reference path="./-private/references/has-many.d.ts" />
|
|
29
|
+
/// <reference path="./-private/references/belongs-to.d.ts" />
|
|
30
30
|
declare module '@ember-data/model' {
|
|
31
31
|
/**
|
|
32
32
|
* This package provides a Presentation Model for resource data in an EmberData Cache.
|
|
@@ -3,9 +3,16 @@ declare module '@ember-data/model/migration-support' {
|
|
|
3
3
|
import type { SchemaService } from '@ember-data/store/types';
|
|
4
4
|
import type { StableRecordIdentifier } from '@warp-drive/core-types';
|
|
5
5
|
import type { ObjectValue } from '@warp-drive/core-types/json/raw';
|
|
6
|
+
import type { TypedRecordInstance } from '@warp-drive/core-types/record';
|
|
6
7
|
import type { Derivation, HashFn, Transformation } from '@warp-drive/core-types/schema/concepts';
|
|
7
8
|
import type { ArrayField, DerivedField, FieldSchema, GenericField, HashField, ObjectField, ResourceSchema } from '@warp-drive/core-types/schema/fields';
|
|
8
9
|
import type { WithPartial } from '@warp-drive/core-types/utils';
|
|
10
|
+
import type { MinimalLegacyRecord } from '@ember-data/model/-private/model-methods';
|
|
11
|
+
import { belongsTo, hasMany } from '@ember-data/model/-private/model-methods';
|
|
12
|
+
export type WithLegacyDerivations<T extends TypedRecordInstance> = T & MinimalLegacyRecord & {
|
|
13
|
+
belongsTo: typeof belongsTo;
|
|
14
|
+
hasMany: typeof hasMany;
|
|
15
|
+
};
|
|
9
16
|
type AttributesSchema = ReturnType<Exclude<SchemaService['attributesDefinitionFor'], undefined>>;
|
|
10
17
|
type RelationshipsSchema = ReturnType<Exclude<SchemaService['relationshipsDefinitionFor'], undefined>>;
|
|
11
18
|
export function withDefaults(schema: WithPartial<ResourceSchema, 'legacy' | 'identity'>): ResourceSchema;
|
|
@@ -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,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,MAAM,sCAAsC,CAAC;AAE9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;
|
|
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,MAAM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