
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@thinkmill/keystone-mosql-yaml-gen
Advanced tools
A basic and somewhat crappy generator of a MoSQL YAML config from KeystoneJS models
Tools for generating a MoSQL-compatible YAML document describing the lists and models configured for your Keystone instance.
Require the package like always:
const mosqlYaml = require('@thinkmill/keystone-mosql-yaml-gen');
The simplest way to use is to drop the included endpoint in your routes, like this:
app.get('/api/keystoneListsYaml', mosqlYaml.createMosqlYamlEndpoint(keystone));
Or, if there isn't already middleware restricting access, maybe closer to this:
app.get('/api/keystoneListsYaml', bsMiddleware.restrictWithUserFlag('isAdmin'), mosqlYaml.createMosqlYamlEndpoint(keystone));
Here we've use the blueshyft middleware package to restrict access to admins.
If you wanted to create your own endpoint, here's a reasonable starting point:
'use strict';
const keystone = require('keystone');
const mosqlYaml = require('@thinkmill/keystone-mosql-yaml-gen');
module.exports = function (req, res, next) {
const yamlGen = new mosqlYaml.YamlGenerator(keystone);
res.set('content-disposition', `attachment; filename="${yamlGen.getFilename()}"`);
res.set('content-Type', 'application/x-yaml');
res.send(yamlGen.generateYaml());
};
FAQs
A basic generator of MoSQL YAML config files for KeystoneJS models
The npm package @thinkmill/keystone-mosql-yaml-gen receives a total of 4 weekly downloads. As such, @thinkmill/keystone-mosql-yaml-gen popularity was classified as not popular.
We found that @thinkmill/keystone-mosql-yaml-gen demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 16 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.