[deps] Replace faker with @faker-js (#201105)

## Summary

The `faker` library is[ not maintained
anymore](https://fakerjs.dev/about/announcements/2022-01-14.html#i-heard-something-happened-what-s-the-tldr)
and is replaced by a community fork `@faker-js`.
This PR migrates all the usages of faker to the new library, trying to
use the same methods (even if they have slight differences in results
like `faker.random.number()` has a max of 99999 where instead
`faker.number.int()` have a MAX_SAFE_INTEGER as max).
This commit is contained in:
Marco Vettorello 2024-12-03 18:17:49 +01:00 committed by GitHub
parent 230d6617ab
commit b61ad41284
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 122 additions and 130 deletions

View file

@ -6,7 +6,7 @@
*/
const { Client } = require('@elastic/elasticsearch');
const faker = require('faker');
const { faker } = require('@faker-js/faker');
const THREAT_INDEX = 'logs-ti';