Files
vendoo/app/modules/deployments/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

29 lines
829 B
JavaScript

import manifest from './module.json' with { type: 'json' };
import { PlatformError } from '../../kernel/errors.mjs';
import { createDeploymentService } from './service.mjs';
let service = null;
let adapters = {};
export function configureDeploymentsModule(nextAdapters = {}) {
adapters = { ...adapters, ...nextAdapters };
}
export function getDeploymentService() {
if (!service) throw new PlatformError('Deployment-Modul ist noch nicht gestartet.', {
code: 'DEPLOYMENT_MODULE_NOT_READY', status: 503, expose: true,
});
return service;
}
export function createDeploymentsModule() {
return {
manifest,
lifecycle: {
async start() { service = createDeploymentService(adapters); },
async stop() { service = null; },
async health() { return getDeploymentService().health(); },
},
};
}