import type { NestExpressApplication } from "@nestjs/platform-express"; /** Content types accepted as raw YAML text (e.g. by `POST /import`). */ export const YAML_CONTENT_TYPES = [ "application/yaml", "application/x-yaml", "text/yaml", "text/x-yaml", ]; /** Registers body parsers beyond Nest's default JSON/urlencoded ones. */ export function configureBodyParsers(app: NestExpressApplication): void { app.useBodyParser("text", { type: YAML_CONTENT_TYPES, limit: "10mb" }); }