
Research
/Security News
Intercom’s npm Package Compromised in Ongoing Mini Shai-Hulud Worm Attack
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.
aedes-cached-persistence
Advanced tools
Abstract class to write an Aedes persistence with in-process caching of subscriptions
Abstract class to write an Aedes persistence with in-process caching of subscriptions. It implements the API defined by aedes-persistence.
To install aedes-cached-persistence, simply use npm:
npm install aedes-cached-persistence --save
CachedPersistence()instance.subscriptionsByTopic()instance.cleanSubscriptions()instance.destroy()In order to reuse aedes-cached-persistence, you need to:
const CachedPersistence = require('aedes-cached-persistence')
// if you need http://npm.im/aedes-packet, it is available
// from this module as well
// const { Packet } = CachedPersistence
class MyPersistence extends CachedPersistence {
constructor(opts) {
super(opts)
}
addSubscriptions(client, subs, cb) {
// ..persistence specific implementation..
// call super._addedSubscriptions when you are done
super._addedSubscriptions(client, subs.map(mapSub), cb)
}
removeSubscriptions(client, subs, cb) {
// ..persistence specific implementation..
// call super._removedSubscriptions when you are done
super._removedSubscriptions(client, subs.map(mapSub), cb)
}
}
function mapSub (sub) {
return { topic: sub.topic }
}
A persistence needs to pass all tests defined in ./abstract.js. You can import and use that test suite in the following manner:
const test = require('node:test')
const myperst = require('./')
const abs = require('aedes-cached-persistence/abstract')
abs({
test: test,
persistence: myperst
})
If you require some async stuff before returning, a callback is also supported:
const test = require('node:test')
const myperst = require('./')
const abs = require('aedes-persistence/abstract')
const clean = require('./clean') // invented module
abs({
test: test,
buildEmitter: require('mymqemitter'), // optional
persistence: function build (cb) {
clean(function (err) {
cb(err, myperst())
})
}
})
MIT
FAQs
Abstract class to write an Aedes persistence with in-process caching of subscriptions
The npm package aedes-cached-persistence receives a total of 1,525 weekly downloads. As such, aedes-cached-persistence popularity was classified as popular.
We found that aedes-cached-persistence demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.

Research
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.