Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
API documentation generator for hapi
lout is a documentation generator for hapi servers, providing a human-readable guide for every endpoint using the route configuration. The module allows full customization of the output.
You can find a live demo of lout using the unit tests routes. The routes are of course fake but you can get a grasp of what lout looks like given various inputs.
Lout depends on vision and inert, make sure you register them with hapi.
const Hapi = require('hapi');
const server = Hapi.server({ port: 80 });
await server.register([require('vision'), require('inert'), require('lout')]);
server.start().then(
console.log('Server running at:', server.info.uri)
);
The following options are available when registering the plugin:
method
and path
and returns a boolean value to exclude routes.If you want a specific route not to appear in lout's documentation, you have to set lout settings for this specific route to false.
Here is an example snippet of a route configuration :
{
method: 'GET',
path: '/myroute',
options: {
handler: [...],
[...]
plugins: {
lout: false
}
}
}
If you want to exclude multiple routes using conditions, you can use filterRoutes
when registering lout :
server.register([require('vision'), require('inert'), {
plugin: require('lout'),
options: {
filterRoutes: (route) => {
return route.method !== '*' && !/^\/private\//.test(route.path);
}
}
}]).then(() => {
server.start(() => {
console.log('Server running at:', server.info.uri);
});
});
FAQs
API documentation generator plugin for hapi
The npm package lout receives a total of 2,091 weekly downloads. As such, lout popularity was classified as popular.
We found that lout 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.