// src/config.ts
function getDefaultOptions(config) {
  return {
    entry: ["./src/*.ts"],
    platform: "node",
    target: "esnext",
    mode: "production",
    dts: true,
    unused: {
      level: "error",
      ignore: ["typescript"]
    },
    publint: true,
    fixedExtension: true,
    ...config
  };
}
function toTSDownFormat(format) {
  if (!format || Array.isArray(format) && format.length === 0) {
    return ["cjs", "es"];
  } else if (format === "esm") {
    return "es";
  } else if (Array.isArray(format)) {
    return format.map((f) => f === "esm" ? "es" : f);
  }
  return format;
}

export {
  getDefaultOptions,
  toTSDownFormat
};
