import {
  getEventCatalogConfigFile
} from "./chunk-6QENHZZP.js";

// src/features.ts
import { join } from "path";
import fs from "fs";
var getProjectOutDir = async () => {
  const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
  return config?.outDir || "dist";
};
var isOutputServer = async () => {
  const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
  return config?.output === "server";
};
var isIndexedSearchEnabled = async () => {
  const config = await getEventCatalogConfigFile(process.env.PROJECT_DIR || "");
  return config?.search?.type === "indexed";
};
var isAuthEnabled = async () => {
  const directory = process.env.PROJECT_DIR || process.cwd();
  const hasAuthConfig = fs.existsSync(join(directory, "eventcatalog.auth.js"));
  return hasAuthConfig;
};

export {
  getProjectOutDir,
  isOutputServer,
  isIndexedSearchEnabled,
  isAuthEnabled
};
