
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
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
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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.