
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.
lambda-dev
Advanced tools
Develop and Bundle Your Lambda Functions With Ease.
npm install --save-dev lambda-dev
yarn add --dev lambda-dev
Use lambda-dev
to develop lambda functions locally. lambda-dev serve
starts an Express server that proxies http requests to your lambda functions. They are transpiled with @babel/core and @babel/preset-env, with the node target set to --node [target]
(default 6.10
). This is done through webpack with the help of babel-loader.
lambda-dev serve --help
lambda-dev serve src/functions --node 8.10 --port 9000 --basePath /lambda
Now a given function src/functions/test.js
will be invoked with requests to http://localhost:9000/lambda/test
.
lambda-dev build --help
lambda-dev serve src/functions build/functions --node 8.10
Bundled functions will be at build/functions
.
It is possible to supply a custom Webpack configuration for serving and building your Lambda functions:
lambda-dev serve src/functions --webpack-config ./my-webpack.config.js
where the default export of my-webpack.config.js
should be either and object or a function. If it's an object, it will be merged with the default configuration using merge.smart
from webpack-merge. If it's a function, it will receive the default configuration as its argument and should return a full valid configuration.
It's not possible to directly supply a custom babel configuration, but you can override the webpack configuration's babel-loader options:
const myBabelOptions = require('./my-babel.config.js');
module.exports = {
module: {
rules: [
{
test: /\.js$/,
use: {
loader: require.resolve('babel-loader'),
options: {
babelrc: false,
options: myBabelOptions
}
}
}
]
}
};
Lambda functions should export a handler
function that receives the following arguments:
import { Request } from 'express';
type Event = {
path: Request.path,
httpMethod: Request.method,
queryStringParameters: Request.query,
headers: Request.headers,
body: Request.body
};
type Context = {} // Empty with `lambda-dev serve`
exports.handler: (event: Event, context: Context, callback) => callback(error: Error | null, response: Response | null);
FAQs
Develop and Bundle Your Lambda Functions With Ease
The npm package lambda-dev receives a total of 83 weekly downloads. As such, lambda-dev popularity was classified as not popular.
We found that lambda-dev 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.
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.