chore(): Reorganize modules (#7210)
**What** Move all modules to the modules directory
This commit is contained in:
committed by
GitHub
parent
7a351eef09
commit
4eae25e1ef
23
packages/modules/event-bus-redis/src/initialize/index.ts
Normal file
23
packages/modules/event-bus-redis/src/initialize/index.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import {
|
||||
ExternalModuleDeclaration,
|
||||
InternalModuleDeclaration,
|
||||
MedusaModule,
|
||||
Modules,
|
||||
} from "@medusajs/modules-sdk"
|
||||
import { IEventBusService } from "@medusajs/types"
|
||||
import { EventBusRedisModuleOptions } from "../types"
|
||||
|
||||
export const initialize = async (
|
||||
options?: EventBusRedisModuleOptions | ExternalModuleDeclaration
|
||||
): Promise<IEventBusService> => {
|
||||
const serviceKey = Modules.EVENT_BUS
|
||||
const loaded = await MedusaModule.bootstrap<IEventBusService>({
|
||||
moduleKey: serviceKey,
|
||||
defaultPath: "@medusajs/event-bus-redis",
|
||||
declaration: options as
|
||||
| InternalModuleDeclaration
|
||||
| ExternalModuleDeclaration,
|
||||
})
|
||||
|
||||
return loaded[serviceKey]
|
||||
}
|
||||
Reference in New Issue
Block a user