tgraph dtos

Emits response DTOs for every model in the Prisma schema (no @tg_form() requirement).

Output directory

  • Uses config.dtosPath (default src/dtos/generated).
  • setupOutputDirectory() runs first:
    • If the directory already exists, it is deleted recursively (fs.rmSync(..., { recursive: true, force: true })).
    • A fresh directory is then created with fs.mkdirSync(..., { recursive: true }).
  • Any files or subfolders that previously lived in the target directory are permanently removed.

Generated files

<dtosPath>/
├── <model-name>-response.dto.ts
└── index.ts
  • <model-name> is the lowercase Prisma model name (e.g., Useruser-response.dto.ts).
  • Each DTO file contains a tagAutoGenerated banner and the response DTO produced by NestDtoGenerator.
  • index.ts re-exports every generated DTO and carries the same auto-generated tag.
  • Files are formatted individually with npx prettier --write.