Merge pull request #32 from otrumb/fix/module-mountpoint-error
fix(app): validate module mountpoints at runtime
This commit is contained in:
2 files changed
+20
-1
No files matched your search
@@ -789,6 +789,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