chore: upgrade moduleResolution to Node16 (#9269)
This commit is contained in:
@@ -17,3 +17,5 @@ export * from "./mikro-orm-cli-config-builder"
|
||||
export * from "./module"
|
||||
export * from "./query-context"
|
||||
export * from "./query-filter"
|
||||
export * from "./types/links-config"
|
||||
export * from "./types/medusa-service"
|
||||
|
||||
@@ -9,8 +9,7 @@ import {
|
||||
PerformedActions,
|
||||
UpsertWithReplaceConfig,
|
||||
} from "@medusajs/types"
|
||||
import { EntitySchema } from "@mikro-orm/core"
|
||||
import { EntityClass } from "@mikro-orm/core/typings"
|
||||
import type { EntitySchema, EntityClass } from "@mikro-orm/core"
|
||||
import {
|
||||
doNotForceTransaction,
|
||||
isDefined,
|
||||
|
||||
@@ -4,6 +4,7 @@ import { EOL } from "os"
|
||||
import { resolve } from "path"
|
||||
import { mikroOrmCreateConnection } from "../../dal"
|
||||
import { loadDatabaseConfig } from "../load-module-database-config"
|
||||
import { dynamicImport } from "../../common"
|
||||
|
||||
/**
|
||||
* Utility function to build a seed script that will insert the seed data.
|
||||
@@ -42,12 +43,14 @@ export function buildSeedScript({
|
||||
const logger_ = (logger ?? console) as unknown as Logger
|
||||
|
||||
logger_.info(`Loading seed data from ${path}...`)
|
||||
const dataSeed = await import(resolve(process.cwd(), path)).catch((e) => {
|
||||
logger_.error(
|
||||
`Failed to load seed data from ${path}. Please, provide a relative path and check that you export the following productCategoriesData, productsData, variantsData.${EOL}${e}`
|
||||
)
|
||||
throw e
|
||||
})
|
||||
const dataSeed = await dynamicImport(resolve(process.cwd(), path)).catch(
|
||||
(e) => {
|
||||
logger_.error(
|
||||
`Failed to load seed data from ${path}. Please, provide a relative path and check that you export the following productCategoriesData, productsData, variantsData.${EOL}${e}`
|
||||
)
|
||||
throw e
|
||||
}
|
||||
)
|
||||
|
||||
const dbData = loadDatabaseConfig(moduleName, options)!
|
||||
const entities = Object.values(models) as unknown as EntitySchema[]
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { MikroORMOptions } from "@mikro-orm/core/utils/Configuration"
|
||||
import { DmlEntity, toMikroOrmEntities } from "../dml"
|
||||
import { CustomTsMigrationGenerator } from "../dal"
|
||||
import type {
|
||||
AnyEntity,
|
||||
EntityClass,
|
||||
EntitySchema,
|
||||
MikroORMOptions,
|
||||
EntityClassGroup,
|
||||
} from "@mikro-orm/core/typings"
|
||||
import type { EntitySchema } from "@mikro-orm/core/metadata/EntitySchema"
|
||||
} from "@mikro-orm/core"
|
||||
import { kebabCase } from "../common"
|
||||
|
||||
type Options = Partial<Omit<MikroORMOptions, "entities" | "entitiesTs">> & {
|
||||
|
||||
Reference in New Issue
Block a user