* use initModules instead of initialize when runnning auth module integration tests * rm unused module-config * correct db schema fix * update authentication integration tests w/ initModule * update cart integration tests w/ initModule * update customer integration tests w/ initModule * update payment integration tests w/ initModule * update pricing integration tests w/ initModule * update product integration tests w/ initModule * update promotion integration tests w/ initModule * add initModule to more product tests and return medusaApp from initModule * align moduleOptions naming * update dependencies
34 lines
697 B
TypeScript
34 lines
697 B
TypeScript
import { Modules, ModulesDefinition } from "@medusajs/modules-sdk"
|
|
|
|
import { DB_URL } from "./database"
|
|
|
|
export function getInitModuleConfig() {
|
|
const moduleOptions = {
|
|
defaultAdapterOptions: {
|
|
database: {
|
|
clientUrl: DB_URL,
|
|
schema: process.env.MEDUSA_CART_DB_SCHEMA,
|
|
},
|
|
},
|
|
}
|
|
|
|
const injectedDependencies = {}
|
|
|
|
const modulesConfig_ = {
|
|
[Modules.CART]: {
|
|
definition: ModulesDefinition[Modules.CART],
|
|
options: moduleOptions,
|
|
},
|
|
}
|
|
|
|
return {
|
|
injectedDependencies,
|
|
modulesConfig: modulesConfig_,
|
|
databaseConfig: {
|
|
clientUrl: DB_URL,
|
|
schema: process.env.MEDUSA_CART_DB_SCHEMA,
|
|
},
|
|
joinerConfig: [],
|
|
}
|
|
}
|