
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
npm install designer
var designer = require('designer');
var docs = [
{
_id: '_design/people',
version: 1,
views: {
friendly: {
map: "function(person) { return (doc.manners > 4 && doc.empathy > 7) }"
}
}
}
];
designer('http://localhost:5984/ohai', docs, function(errs) {
errs.forEach(function(err, i) {
console.log('err for', docs[i], 'was', err);
});
});
This is a library for managing your design docs in a couch database.
A nice thing about CouchDB is that your code is data. Configuring your database is just a matter of putting some data (design docs) in it.
The superpower this gives your applications is that your source code can include data that tells the database how the application expects it to behave.
In pseudocode:
start application
application looks on disk for some design documents
application posts all those design documents to its couch
couch now has all the views/etc that the application expects
yay!
I found myself writing the above code across multiple applications.
It gets dreary when you also have to handle making modifications to design docs. In order to update a document, you have to overwrite the old one. Obviously you only want to do this if you've got something newer!
designer expects your documents to have a version property. They get compared with if (new < old) so they should probably just be integers.
FAQs
A lib for managing design docs in couchDB
We found that designer 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.