* docs: prepare Vendoo 1.41.2 git-ignore boundary hotfix * fix: track native source modules with root-anchored runtime ignores
29 lines
769 B
JavaScript
29 lines
769 B
JavaScript
import manifest from './module.json' with { type: 'json' };
|
|
import { ModuleManagerService } from './service.mjs';
|
|
|
|
let service = null;
|
|
|
|
export function createModuleManagerModule() {
|
|
return {
|
|
manifest,
|
|
source: 'builtin',
|
|
lifecycle: {
|
|
async start(context) {
|
|
service = new ModuleManagerService({
|
|
modules: context.modules,
|
|
stateStore: context.moduleStateStore,
|
|
packageStore: context.modulePackageStore,
|
|
context,
|
|
});
|
|
},
|
|
async stop() { service = null; },
|
|
async health() { return { ok: Boolean(service), protected: true }; },
|
|
},
|
|
};
|
|
}
|
|
|
|
export function getModuleManagerService() {
|
|
if (!service) throw new Error('Module Manager ist noch nicht gestartet.');
|
|
return service;
|
|
}
|