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.
automerger
Advanced tools
Streaming ETL
npm test
npm install automerger
# setup
{EventEmitter} = require "events"
es = require "event-stream"
AM = require "automerger"
subscriber = es.through (job) ->
console.log "job", job
###
{
action: 'updated',
current: {...}, # the current version of the source document
previous: {...} # the previous version of the source document
}
###
conf =
db:
name: "test-model"
find: (id, cb) -> cb null, null
upsert: (id, doc, cb) -> cb null
model: new EventEmitter
sourceStream: es.through (data) -> @queue data
sourceToIdPieces: (doc) -> [doc.type, doc.field]
subscriberStreams: [subscriber]
schema: ["type", "field"]
version: "test-version"
am = new AM conf
# input a source object
sourceDoc =
current: {type: "none", field: "name"}
am.sourceStream.write sourceDoc
a single readable stream which supplies source documents
an array of one or more writable streams that want to be notified of updates to target documents
an array of fields that will be mapped to the target document from the source document. strings in the example schema above using the default strategy 'assign'. There are a number of other strategies to choose from
there are a few cases where a source document will be "rejected" and tagged unusable or irrelevant:
it may be useful to act on source documents that are rejected. in those cases set up an automerger.on 'source-reject'
event listener.
may optionally pass an array of string properties that must exist on the target document in order to be deemed 'ready'. A document not being ready is different than a source being rejected. Rejected source documents will not be saved while the unready documents will. The difference is that subscribers are not told about documents that are not ready.
automerger instances emit 'target-not-ready'
events when a target fails the readiness requirements
a migration is an optional user-defined function that is applied to existing documents as they come out of the database prior to being updated when new source documents arrive.
optional user-defined function to manipulate source documents in the worker as they arrive from the sourceStream
FAQs
Streaming ETL
We found that automerger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
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.