"use strict"; const fs = require("node:fs"); const path = require("node:path"); const crypto = require("node:crypto"); const GUIDANCE_FILES = Object.freeze({ cs: "provozni-bezpecnost-a-zalohovani.md", de: "betriebssicherheit-und-datensicherung.md", en: "operational-safety-and-backup-guidance.md" }); function loadGuidanceDocuments(docsRoot) { const documents = {}; for (const [language, filename] of Object.entries(GUIDANCE_FILES)) { const text = fs.readFileSync(path.join(docsRoot, filename), "utf8"); if (text.length < 1000) throw new Error(`Missing or incomplete operational guidance: ${filename}`); documents[language] = text; } const sha256 = crypto.createHash("sha256").update(JSON.stringify(documents)).digest("hex"); return { documents, sha256 }; } module.exports = { GUIDANCE_FILES, loadGuidanceDocuments };