- 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
1.8 KiB
Contributing
Prerequisites
- Node.js 20+
- Docker + Docker Compose
Install dependencies:
npm install
Copy .env.example to .env and fill in the required values before running.
Starting the application
Development (watch mode, restarts on file changes):
npm run start:dev
Production build, then start:
npm run build
npm run start:prod
The application listens on port 3000 by default.
Running tests
npm run test
Run a single spec file:
npm run test -- --no-coverage test/scenario.controller.spec.ts
Watch mode:
npm run test:watch
Enable verbose NestJS log output during tests:
npm run test:debug
Formatting code
Prettier is used to format all TypeScript source and test files:
npm run format
This rewrites src/**/*.ts and test/**/*.ts in place.
Linting
ESLint with typescript-eslint and eslint-config-prettier is used:
# report issues
npm run lint
# report and auto-fix where possible
npm run lint:fix
The project targets zero errors. Run lint before committing.
Building the container
docker compose build
To rebuild without the layer cache:
docker compose build --no-cache
Running with Docker Compose
Start (detached):
docker compose up -d
Build and start in one step:
docker compose up -d --build
The application is exposed at http://localhost:13000.
SQLite data is persisted in ./data/ and key files are mounted from ./keys/ — both directories are volume-mounted into the container.
Stop and remove containers:
docker compose down
View logs:
docker compose logs -f