Thanks for your interest in contributing!
git clone https://github.com/IQAIcom/alert-logger.git
cd alert-logger
npm installnpm test # Run tests
npm run test:watch # Run tests in watch mode
npm run lint # Type check
npm run build # Build with tsup- Fork the repo and create a branch from
main - Write your changes
- Add tests for new functionality
- Ensure all tests pass:
npm test - Ensure types check:
npm run lint - Submit a pull request
To create a custom adapter, implement the AlertAdapter interface:
import type { AlertAdapter, FormattedAlert, AlertLevel } from '@iqai/alert-logger'
class MyAdapter implements AlertAdapter {
readonly name = 'my-adapter'
levels: AlertLevel[] = ['info', 'warning', 'critical']
rateLimits() {
return { maxPerWindow: 60, windowMs: 60_000 }
}
async send(alert: FormattedAlert): Promise<void> {
// Your sending logic here
}
}- TypeScript strict mode
- ESM with
.jsextensions in imports - No external runtime dependencies in core
By contributing, you agree that your contributions will be licensed under the MIT License.