fix(app): validate module mountpoints at runtime

Signed-off-by: Ngoc Trung <mr.trung.dhbk@gmail.com>
This commit is contained in:
Ngoc Trung committed 2026-09-23 10:30:02 +07:00
1 parent a16be6a832
commit aaef6cf5b7
2 files changed
+20 -1

No files matched your search

+1
View File
@@ -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);