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)//"precommit": "./node_modules/eslint/bin/eslint.js ."
in package.jsonfile_system.ts
getEmptyDirectoryIndex()
- 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.ts
andcontrollers\templates\index.ts
are almost the same make base class or somethingrequest_error.ts
data more specify- JOI for
TestRuleOptions
or find way to handling defaults statusHandler
nullable status?- Better implement
ConfigService
as singleton and refactor to not using config/index.ts - Refactor
rulesController.rule
metadataHandler
fixresp.hits.hits.map(h => h._source);
metadataHandler
fixgetQueryString
->(<any>request.query).rule_name)
scripts/replace_templates.sh
probably not needed- Better error handling and documentation - for now global error handling in
elastalert_server.ts
https://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)
- Split logic form metadata.controller.ts to metadata.service.ts
- Migrate latest fixes from https://github.com/johnsusek/elastalert-server