fix(app): validate module mountpoints at runtime
Signed-off-by: Ngoc Trung <mr.trung.dhbk@gmail.com>
This commit is contained in:
1 parent
a16be6a832
commit
aaef6cf5b7
2 files changed
+20
-1
No files matched your search
@@ -560,6 +560,7 @@ function collectModules(modules: Ctor[], viewsCtx: ViewsContext): Registry {
|
||||
for (const mod of modules) {
|
||||
const moduleMeta = getModuleMeta(mod);
|
||||
if (!moduleMeta) throw new Error(`${mod.name} is not a @Module`);
|
||||
if (!moduleMeta.mountpoint) throw new Error(`${mod.name} @Module metadata is missing mountpoint`);
|
||||
const origin = `module:${mod.name}`;
|
||||
collectProviders(moduleMeta.providers ?? [], origin, registry);
|
||||
collectSteps(moduleMeta.steps ?? [], origin, registry);
|
||||
|
||||
Reference in new issue
Block a user