- add POST /import, an import page and the import_yaml mcp tool; items are validated up front and imported in dependency order - switch list page import buttons to the central import - write scenario exports as separate --- yaml documents per entity - give each test app its own files dir to avoid cross-suite races - use node: prefix for node built-in imports - bump version to 1.18.0
15 lines
488 B
TypeScript
15 lines
488 B
TypeScript
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" });
|
|
}
|