feat(scenario): run logs, lint/format tooling, CONTRIBUTING

- add ScenarioRunLogEntity to persist step script output to DB
- stepLogger dual-writes to NestJS logger and DB (fire-and-forget)
- add GET /scenarios/:id/run/:runId returning run, stepRuns and logs
- add POST /scenarios/:id/run/:runId/wait (polls until terminal state)
- 9 new integration tests for the two endpoints (136 total)
- add eslint with typescript-eslint and eslint-config-prettier
- add npm scripts: format, lint, lint:fix
- resolve all lint errors across src and test (no any types)
- add CONTRIBUTING.md covering dev workflow
This commit is contained in:
ars9 committed 2026-04-08 18:10:42 +03:00
1 parent b0c02a1cdc
commit 9a9ccbfe37
67 files changed
+3809 -1412

No files matched your search

+8 -6
View File
@@ -5,9 +5,9 @@ import {
ExceptionFilter,
HttpException,
InternalServerErrorException,
} from '@nestjs/common';
import { TraceLogger } from '../common/trace-logger';
import type { Request, Response } from 'express';
} from "@nestjs/common";
import { TraceLogger } from "../common/trace-logger";
import type { Request, Response } from "express";
@Catch(BadRequestException, InternalServerErrorException)
export class HttpExceptionFilter implements ExceptionFilter {
@@ -20,8 +20,8 @@ export class HttpExceptionFilter implements ExceptionFilter {
const status = exception.getStatus();
const body = exception.getResponse();
const cause = (exception as any).cause as Error | undefined;
const causeMessage = cause ? ` | cause: ${cause.message}` : '';
const cause = (exception as unknown as { cause?: Error }).cause;
const causeMessage = cause ? ` | cause: ${cause.message}` : "";
const message = `${exception.message}${causeMessage}`;
if (status >= 500) {
@@ -30,7 +30,9 @@ export class HttpExceptionFilter implements ExceptionFilter {
cause?.stack ?? exception.stack,
);
} else {
this.logger.warn(`[${request.method} ${request.url}] ${status} — ${message}`);
this.logger.warn(
`[${request.method} ${request.url}] ${status} — ${message}`,
);
}
response.status(status).json(body);