
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
raml-generator
Advanced tools
Generate files from a RAML document and templates.
npm install raml-generator --save
The module accepts a map of functions (usually compiled templates, such as Handlebars), and returns a function that will generate files given an instance of the RAML 1 parser JSON.
For an example module, take a look at the raml-javascript-generator.
Why use this? It's just a simple, high level API for creating generators with a standard API.
Create the generator function from config. The returned object accepts two arguments, the RAML object and user config.
var fs = require('fs')
var Handlebars = require('handlebars')
var generator = require('raml-generator')
module.exports = generator({
templates: {
'index.js': Handlebars.compile(fs.readFileSync(__dirname + '/templates/index.js.hbs', 'utf8'))
}
}) //=> [Function]
A bin
script is provided for you to use with your custom generator. Just require raml-generator/bin
and pass in the generator function (from above), package information (package.json
) and process.argv
.
#!/usr/bin/env node
var bin = require('raml-generator/bin')
var generator = /* The generator function */
bin(generator, require('./package.json'), process.argv)
Generated CLI:
generator --out [directory]
--data, -d Path to JSON configuration file
--include, -i Include additional RAML files (E.g. extensions)
Apache License 2.0
FAQs
Generate files from a RAML document and template functions
The npm package raml-generator receives a total of 22 weekly downloads. As such, raml-generator popularity was classified as not popular.
We found that raml-generator 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
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.