chore: Fix export and option of mikro orm define config util (#7809)
This commit is contained in:
1 parent
5c944ae5d0
commit
27bb93c5b5
3 files changed
+11
-2
No files matched your search
@@ -12,3 +12,4 @@ export * from "./definition"
|
|||||||
export * from "./event-builder-factory"
|
export * from "./event-builder-factory"
|
||||||
export * from "./joiner-config-builder"
|
export * from "./joiner-config-builder"
|
||||||
export * from "./loaders/load-models"
|
export * from "./loaders/load-models"
|
||||||
|
export * from "./mikro-orm-cli-config-builder"
|
||||||
@@ -537,7 +537,7 @@ export function MedusaInternalService<TContainer extends object = object>(
|
|||||||
},
|
},
|
||||||
@MedusaContext() sharedContext: Context = {}
|
@MedusaContext() sharedContext: Context = {}
|
||||||
): Promise<{
|
): Promise<{
|
||||||
entities: ExtractEntityType<TEntity> | TEntity[]
|
entities: ExtractEntityType<TEntity> | ExtractEntityType<TEntity>[]
|
||||||
performedActions: PerformedActions
|
performedActions: PerformedActions
|
||||||
}> {
|
}> {
|
||||||
const data_ = Array.isArray(data) ? data : [data]
|
const data_ = Array.isArray(data) ? data : [data]
|
||||||
|
|||||||
@@ -2,9 +2,17 @@ import { MikroORMOptions } from "@mikro-orm/core/utils/Configuration"
|
|||||||
import { IDmlEntity } from "@medusajs/types"
|
import { IDmlEntity } from "@medusajs/types"
|
||||||
import { DmlEntity, toMikroORMEntity } from "../dml"
|
import { DmlEntity, toMikroORMEntity } from "../dml"
|
||||||
import { TSMigrationGenerator } from "../dal"
|
import { TSMigrationGenerator } from "../dal"
|
||||||
|
import { AnyEntity, EntityClassGroup, EntitySchema } from "@mikro-orm/core"
|
||||||
|
import { EntityClass } from "@mikro-orm/core/typings"
|
||||||
|
|
||||||
type Options = Partial<MikroORMOptions> & {
|
type Options = Partial<MikroORMOptions> & {
|
||||||
entities: (MikroORMOptions["entities"] | IDmlEntity<any>)[]
|
entities: (
|
||||||
|
| string
|
||||||
|
| EntityClass<AnyEntity>
|
||||||
|
| EntityClassGroup<AnyEntity>
|
||||||
|
| EntitySchema
|
||||||
|
| IDmlEntity<any>
|
||||||
|
)[]
|
||||||
databaseName: string
|
databaseName: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user