Files
vendoo/app/modules/publishing/index.mjs
T
Masterluke77andGitHub 6f48827f4d Vendoo 1.41.2 – Git Ignore Boundary & Module Tracking Hotfix (#18)
* docs: prepare Vendoo 1.41.2 git-ignore boundary hotfix

* fix: track native source modules with root-anchored runtime ignores
2026-07-09 17:09:00 +02:00

24 lines
689 B
JavaScript

import manifest from './module.json' with { type: 'json' };
let runtime = null;
let started = false;
export function configurePublishingModule(deps = {}) {
runtime = {
start: deps.start || (() => {}),
stop: deps.stop || (() => {}),
};
}
export function createPublishingModule() {
return {
manifest,
source: 'builtin',
lifecycle: {
async start() { if (!runtime) throw new Error('Publishing-Modul ist nicht konfiguriert.'); await runtime.start(); started = true; },
async stop() { await runtime?.stop?.(); started = false; },
async health() { return { ok: Boolean(runtime && started), native: true, queue: 'publishing-jobs' }; },
},
};
}