chore: Migrate modules to use the Module util (#7964)
**What** Apply the `Module` util to each module to handle the export and provide the linkable configuration object. - Most joiner config that does not have any special config are removed/cleaned up in favor of the autogenerated one or simpler one - linkable are now available in all modules - cleaned up the dependencies of the modules FIXES CORE-2410
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { ModuleExports } from "@medusajs/types"
|
||||
import InventoryService from "./services/inventory-module"
|
||||
import InventoryModuleService from "./services/inventory-module"
|
||||
import { Module, Modules } from "@medusajs/utils"
|
||||
|
||||
const moduleDefinition: ModuleExports = {
|
||||
service: InventoryService,
|
||||
}
|
||||
export default moduleDefinition
|
||||
export default Module(Modules.INVENTORY, {
|
||||
service: InventoryModuleService,
|
||||
})
|
||||
|
||||
@@ -9,13 +9,6 @@ export const joinerConfig = defineJoinerConfig(Modules.INVENTORY, {
|
||||
methodSuffix: "InventoryItems",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: ["inventory_level", "inventory_levels"],
|
||||
args: {
|
||||
entity: "InventoryLevel",
|
||||
methodSuffix: "InventoryLevels",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: [
|
||||
"reservation",
|
||||
|
||||
Reference in New Issue
Block a user