Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
q3-plugin-changelog
Advanced tools
Leveraging MongoDB's changestream, this plugin aims to track choice modifications to a document after they occur. When globally installed, the plugin will automatically watch for changes in a collection and save their update description. It also synch
Readme
Leveraging MongoDB's changestream, this plugin aims to track choice modifications to a document after they occur. When globally installed, the plugin will automatically watch for changes in a collection and save their update description. It also synchronizes with Q3 session data so that we can see who prompted the change and when.
const mongoose = require('mongoose');
const plugin = require('q3-plugin-changestream')
const watcher = require('q3-plugin-changestream/lib/changestream')
const Person = new mongoose.Schema({
name: String,
friends: [
{
since: Date,
}
]
}, {
changelog: ['name', 'friends.$.since'],
});
Person.plugin(plugin);
// Must happen after all model has been declared.
// More than likely, you'll call this from a different file after a DB connection has been made.
watcher()
async Document.getHistory
Call this method to fetch all records created by the plugin.
Model.getChangelogProperties
Call this static method to get a list of properties the plugin is watching. Essentially, it just references the initial changelog value setup in the Schema.
FAQs
Leveraging MongoDB's changestream, this plugin aims to track choice modifications to a document after they occur. When globally installed, the plugin will automatically watch for changes in a collection and save their update description. It also synch
The npm package q3-plugin-changelog receives a total of 9 weekly downloads. As such, q3-plugin-changelog popularity was classified as not popular.
We found that q3-plugin-changelog 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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.