Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
sequelize-es-decorator
Advanced tools
Decorator for Sequelize models that enables auto-indexing of data that goes through the model.
It's a decorator for Sequelize ORM that extends methods with auto-indexing into the Elastic Search.
npm i --save sequelize-es-decorator
Import dependency - it's going to be class Decorator:
const Decorator = require('sequelize-es-decorator');
Initialize class instance:
const decorator = new Decorator(esConfig, database);
Before the decoration add class method getSearchOptions to Sequelize model in this way (method is required):
model.getSearchOptions = () => {
return {
type: '<your_index_type>',
keys: [<keys_of_entity_to_be_indexed>]
}
};
After you can just decorate the model in this way (and export it outside for example):
module.exports = decorator.decorate(model)
You can reindex decorated model fully in this way:
model.index();
Will be available in future release. For now you can use common es search;
FAQs
Decorator for Sequelize models that enables auto-indexing of data that goes through the model.
The npm package sequelize-es-decorator receives a total of 1 weekly downloads. As such, sequelize-es-decorator popularity was classified as not popular.
We found that sequelize-es-decorator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.