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.
@startupjs/server-aggregate
Advanced tools
Racer server aggregate plugin. It allows only server-defined aggregate queries.
yarn add @startupjs/server-aggregate
In the client code:
require('@startupjs/server-aggregate/client')
On the server:
const serverAggregate = require('@startupjs/server-aggregate')
serverAggregate(backend, customCheck)
where:
backend
: your ShareDB backend instancecustomCheck (optional)
: your personal check function. It should return an error message if there is an error. IMPORTANT The message must be of type string
.On the server side to add aggregation use backend.addAggregate(collection, queryName, cb)
, where:
collection
: collection namequeryName
: query name (alias)cb(params, shareRequest)
: async function that returns a query object or throw an errorbackend.addAggregate('items', 'main', async (params, shareRequest) => {
// ...
// access control or whatever
// ...
return [
{$match: {type: 'wooden'}}
]
})
model.query('items', {
$aggregationName: 'main',
$params: {
type: 'global'
}
})
When you setup the client side as described in the Setup
section you can use the aggregateQuery(collection, queryName, params)
function which is syntactic sugar over the model.query
, where:
model.aggregateQuery('items', 'main', { type: 'global' })
Copyright (c) 2018 by Artur Zayats
FAQs
Module for describing aggregations on the server
The npm package @startupjs/server-aggregate receives a total of 59 weekly downloads. As such, @startupjs/server-aggregate popularity was classified as not popular.
We found that @startupjs/server-aggregate demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 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.