* docs: prepare Vendoo 1.41.2 git-ignore boundary hotfix * fix: track native source modules with root-anchored runtime ignores
27 lines
843 B
JavaScript
27 lines
843 B
JavaScript
import { readFileSync } from 'node:fs';
|
|
import { dirname, join } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
import { secretStoreStatus } from '../../../lib/secret-store.mjs';
|
|
import { getRequestTelemetry } from '../../../lib/structured-logger.mjs';
|
|
|
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
const manifest = JSON.parse(readFileSync(join(here, 'module.json'), 'utf8'));
|
|
|
|
export function createSecurityModule() {
|
|
return {
|
|
manifest,
|
|
lifecycle: {
|
|
async start() {},
|
|
async stop() {},
|
|
async health() {
|
|
const secrets = secretStoreStatus();
|
|
return { ok: true, provider: secrets.provider, encrypted_secrets: secrets.encrypted };
|
|
},
|
|
},
|
|
};
|
|
}
|
|
|
|
export function getSecurityFoundationStatus() {
|
|
return { secrets: secretStoreStatus(), requests: getRequestTelemetry() };
|
|
}
|