// src/output.ts
import fs from "fs-extra";
import path from "path";
import chalk from "chalk";
async function writeOutput(outPath, techs, config) {
  const outDirectory = path.dirname(outPath);
  await fs.ensureDir(outDirectory);
  await fs.writeJSON(
    outPath,
    {
      generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
      tech: techs
    },
    { spaces: 2 }
  );
  console.log(chalk.blue(`\u2192 Saved ${techs.length} tech entries to ${outPath}`));
}

export {
  writeOutput
};
