
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
feathers-mongodb-revisions
Advanced tools
Feathers MongoDB service with revision support.
This Feathers database adapter extends the basic MongoDB adapter, adding revision support.
npm install --save mongodb feathers-mongodb-revisions
This module is used in the same way as other Feathers database adapters, but automatically tracks _revision
metadata.
This adapter currently implements an "embedded revision" data model, however there are numerous ways to model revisions in MongoDB. Future versions of this adapter may introduce other revision models (pull requests gladly accepted).
{
_id: 123, // Resource ID (Mongo ObjectID or as configured)
name: 'Resource Name 2', // Arbitrary properties
_revision: {
id: 2,
createdAt: '2016-05-09T01:23:45.678Z',
history: [
{
_id: 123,
name: 'Resource Name 1',
_revision: {
id: 1,
createdAt: '2016-05-08T01:23:45.678Z'
}
}
]
}
}
id
: The _revision.id
property is an auto-incrementing ID.createdAt
: The _revision.createdAt
date will always be overwritten, even if it is supplied. However, if an updatedAt
property is supplied on the resource, it will be used instead. (TODO: Make this configurable.)history
: An array of previous revisions (omitting the recursive history
properties). When retrieving resources, the history
property is omitted. (It will be possible to include the complete history in a future version of the adapter.)When updating a resource (via either patch
or update
), the current revision ID must be supplied with the resource data. If this ID is missing or does not match the most recent revision, the update will fail.
let service = app.service('resources')
let resource = service.get(1)
service.patch(service.id, {
name: 'updated name',
_revision: {
id: resource._revision.id
}
})
Please refer to the Feathers database adapter documentation for more details or directly at:
This adapter comes with two test suites. First, launch a MongoDB instance on mongodb://localhost:27017
, and run the adapter tests with npm test
.
A copy of the feathers-mongodb
test suite can also be run with npm run test:feathers-mongodb
, however these will not all pass. The update/patch tests will fail due to the requirement of passing in the current revision ID, which the upstream tests do not pass. It is still good practice to run these tests occasionally in order to keep fidelity with the upstream Feathers MongoDB adapter.
FAQs
Feathers MongoDB service with revision support.
We found that feathers-mongodb-revisions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.