elastalert_server.ts- Object is possibly null (check is vars like _testController are deffined corectly)server_config.ts- Added JSON.parse - probably not neede check how it was done before (old joi autoparse to object)3)//"precommit": "./node_modules/eslint/bin/eslint.js ."in package.json4)file_system.tsgetEmptyDirectoryIndex()- add typecontrollers\rules\index.ts- flat model for rules instead of{ rules: ["rule1", "rule2"]}controllers\templates\index.ts- flat model for rules instead of{ templates: ["template1", "template2"]}controllers\rules\index.tsandcontrollers\templates\index.tsare almost the same make base class or somethingrequest_error.tsdata more specify- JOI for
TestRuleOptionsor find way to handling defaults statusHandlernullable status?- Better implement
ConfigServiceas singleton and refactor to not using config/index.ts - Refactor
rulesController.rule metadataHandlerfixresp.hits.hits.map(h => h._source);metadataHandlerfixgetQueryString->(<any>request.query).rule_name)15)scripts/replace_templates.shprobably not needed- Better error handling and documentation - for now global error handling in
elastalert_server.tshttps://tsoa-community.github.io/docs/error-handling.html#setting-up-error-handling - Logging requst change RouteLogger to
morgan (https://rsbh.dev/blog/rest-api-with-express-typescript)bunyan-middleware (https://www.npmjs.com/package/bunyan-middleware) - Split logic form metadata.controller.ts to metadata.service.ts
- Migrate latest fixes from https://github.com/johnsusek/elastalert-server
20) Verify test rule on WS IMO something is wrong here: e84a3fa8fc79520eaddf701c220d3f92291bb9c9 Last catch in testRule() supresses all errors