* docs: prepare Vendoo 1.41.2 git-ignore boundary hotfix * fix: track native source modules with root-anchored runtime ignores
32 lines
1.9 KiB
JavaScript
32 lines
1.9 KiB
JavaScript
import { mkdtempSync, rmSync } from 'node:fs';
|
|
import { join } from 'node:path';
|
|
import { tmpdir } from 'node:os';
|
|
|
|
const temp = mkdtempSync(join(tmpdir(), 'vendoo-module-defaults-'));
|
|
process.env.VENDOO_DATA_DIR = temp;
|
|
process.env.VENDOO_CONFIG_PATH = join(temp, 'config', 'vendoo.env');
|
|
process.env.VENDOO_MODULE_STATE_PATH = join(temp, 'config', 'modules-state.json');
|
|
process.env.VENDOO_MODULES_DIR = join(temp, 'modules');
|
|
process.env.VENDOO_INITIAL_DISABLED_MODULES = 'vendoo.flux-studio';
|
|
|
|
const failures = [];
|
|
const assert = (condition, message) => { if (!condition) failures.push(message); };
|
|
try {
|
|
const { createPlatformKernel } = await import('../app/kernel/platform-kernel.mjs');
|
|
const first = createPlatformKernel({ version: '1.41.1-test', hasPermission: () => true });
|
|
assert(first.modules.describe('vendoo.flux-studio')?.enabled === false, 'FLUX Studio ist beim ersten Start nicht deaktiviert');
|
|
assert(first.modules.describe('vendoo.deployments')?.enabled === true, 'Geschütztes Deployment-Modul ist nicht aktiviert');
|
|
const { ModuleStateStore } = await import('../app/core/modules/module-state-store.mjs');
|
|
new ModuleStateStore(process.env.VENDOO_MODULE_STATE_PATH).setEnabled('vendoo.flux-studio', true, { source: 'test' });
|
|
const second = createPlatformKernel({ version: '1.41.1-test', hasPermission: () => true });
|
|
assert(second.modules.describe('vendoo.flux-studio')?.enabled === true, 'Gespeicherte Admin-Aktivierung wird durch Initialwert überschrieben');
|
|
} finally {
|
|
rmSync(temp, { recursive: true, force: true });
|
|
}
|
|
if (failures.length) {
|
|
console.error(`Initial-Module-Gate 1.41.1 fehlgeschlagen (${failures.length}):`);
|
|
failures.forEach(item => console.error(`- ${item}`));
|
|
process.exit(1);
|
|
}
|
|
console.log('Initial-Module-Gate 1.41.1 erfolgreich: FLUX ist beim ersten Start aus und bleibt nach bewusster Admin-Aktivierung dauerhaft aktivierbar.');
|