Initial commit

This commit is contained in:
2026-04-05 15:28:04 +02:00
commit 0435b3d07d
43 changed files with 4394 additions and 0 deletions

38
shared/bootstrap.js vendored Normal file
View File

@@ -0,0 +1,38 @@
const {
dataDir,
resourcesDir,
resourceTypeToDirName,
workOrdersPendingDir,
workOrdersRunningDir,
workOrdersFinishedDir,
eventsDir,
logsDir,
snapshotsSystemDir,
snapshotsTenantsDir,
idempotencyDir,
authNodesDir,
} = require('./paths');
const { ensureDir } = require('./fs');
async function bootstrapDataLayout() {
await ensureDir(dataDir);
await ensureDir(resourcesDir);
for (const dirName of Object.values(resourceTypeToDirName)) {
await ensureDir(`${resourcesDir}/${dirName}`);
}
await ensureDir(workOrdersPendingDir);
await ensureDir(workOrdersRunningDir);
await ensureDir(workOrdersFinishedDir);
await ensureDir(eventsDir);
await ensureDir(logsDir);
await ensureDir(snapshotsSystemDir);
await ensureDir(snapshotsTenantsDir);
await ensureDir(idempotencyDir);
await ensureDir(authNodesDir);
}
module.exports = {
bootstrapDataLayout,
};