feat(medusa-app): Link initialization should respect migrationOnly flag (#14493)
* feat(medusa-app): Link initialization should respect migrationOnly flag * Create cyan-taxis-behave.md
This commit is contained in:
committed by
GitHub
parent
568742826f
commit
bb599a26de
@@ -204,6 +204,7 @@ async function initializeLinks({
|
||||
linkModules,
|
||||
injectedDependencies,
|
||||
moduleExports,
|
||||
migrationOnly = false,
|
||||
}) {
|
||||
try {
|
||||
let resources = moduleExports
|
||||
@@ -220,7 +221,9 @@ async function initializeLinks({
|
||||
const linkResolution = await initialize(
|
||||
config,
|
||||
linkModules,
|
||||
injectedDependencies
|
||||
injectedDependencies,
|
||||
undefined,
|
||||
migrationOnly
|
||||
)
|
||||
|
||||
return {
|
||||
@@ -488,6 +491,7 @@ async function MedusaApp_({
|
||||
linkModules,
|
||||
injectedDependencies,
|
||||
moduleExports: isMedusaModule(linkModule) ? linkModule : undefined,
|
||||
migrationOnly,
|
||||
})
|
||||
|
||||
const loadedSchema = getLoadedSchema()
|
||||
|
||||
@@ -90,6 +90,7 @@ export type LinkModuleBootstrapOptions = {
|
||||
moduleExports?: ModuleExports
|
||||
injectedDependencies?: Record<string, any>
|
||||
cwd?: string
|
||||
migrationOnly?: boolean
|
||||
}
|
||||
|
||||
export type RegisterModuleJoinerConfig =
|
||||
@@ -652,6 +653,7 @@ class MedusaModule {
|
||||
moduleExports,
|
||||
injectedDependencies,
|
||||
cwd,
|
||||
migrationOnly,
|
||||
}: LinkModuleBootstrapOptions): Promise<{
|
||||
[key: string]: unknown
|
||||
}> {
|
||||
@@ -720,6 +722,7 @@ class MedusaModule {
|
||||
await moduleLoader({
|
||||
container,
|
||||
moduleResolutions,
|
||||
migrationOnly,
|
||||
logger: logger_,
|
||||
})
|
||||
} catch (err) {
|
||||
|
||||
Reference in New Issue
Block a user