Feat(modules-sdk): Run hooks on application start (#6111)
**What** - run `onApplicationStart` hook when starting modules
This commit is contained in:
@@ -308,12 +308,16 @@ export async function MedusaApp(
|
||||
}))
|
||||
}
|
||||
|
||||
return {
|
||||
modules: allModules,
|
||||
link: remoteLink,
|
||||
query,
|
||||
entitiesMap: schema.getTypeMap(),
|
||||
notFound,
|
||||
runMigrations,
|
||||
try {
|
||||
return {
|
||||
modules: allModules,
|
||||
link: remoteLink,
|
||||
query,
|
||||
entitiesMap: schema.getTypeMap(),
|
||||
notFound,
|
||||
runMigrations,
|
||||
}
|
||||
} finally {
|
||||
await MedusaModule.onApplicationStart()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user