fix(modules-sdk, orchestration): add missing dependencies + fix default handling in medusa-app & remote query (#4930)

This commit is contained in:
Riqwan Thamir
2023-09-07 09:53:46 +02:00
committed by GitHub
parent 86f4ca369f
commit c3dba06948
6 changed files with 42 additions and 38 deletions

View File

@@ -16,19 +16,15 @@ export class RemoteQuery {
private modulesMap: Map<string, LoadedModule> = new Map()
private customRemoteFetchData?: RemoteFetchDataCallback
constructor(
{
modulesLoaded,
customRemoteFetchData,
servicesConfig,
}: {
modulesLoaded?: LoadedModule[]
customRemoteFetchData?: RemoteFetchDataCallback
servicesConfig?: ModuleJoinerConfig[]
} = {
servicesConfig: [],
}
) {
constructor({
modulesLoaded,
customRemoteFetchData,
servicesConfig = [],
}: {
modulesLoaded?: LoadedModule[]
customRemoteFetchData?: RemoteFetchDataCallback
servicesConfig?: ModuleJoinerConfig[]
}) {
if (!modulesLoaded?.length) {
modulesLoaded = MedusaModule.getLoadedModules().map(
(mod) => Object.values(mod)[0]