import { promises as fs } from "fs";
import path from "path";
import { fileURLToPath } from "url";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const researchFile = path.resolve(__dirname, "../../data/research.json");

export async function getResearchRepository() {
  const raw = await fs.readFile(researchFile, "utf8");
  return JSON.parse(raw);
}
