
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.
@bafsllc/serverless-import-config-plugin
Advanced tools
Adds possibility to import YAML files in serverless.yaml config file
Split your serverless.yaml
config file into smaller modules and import them.
By using this plugin you can build your serverless config from smaller parts separated by functionalities. Imported config is merged, so all keys are supported and lists are concatenated (without duplicates).
Works on importing yaml files by path or node module, especially useful in multi-package repositories.
Install with npm:
npm install --save-dev serverless-import-config-plugin
And then add the plugin to your serverless.yml
file:
plugins:
- serverless-import-config-plugin
Specify config files to import in custom.import
list:
custom:
import:
- ./path/to/serverless.yml # path to YAML file with serverless config
- ./path/to/dir # directory where serverless.yml can be find
- module-name # node module where serverless.yml can be find
- '@myproject/users-api' # monorepo package with serverless.yml config file
- module-name/custom-serverless.yml # path to custom config file of a node module
custom.import
can be also a string, when only one file needs to be imported:
custom:
import: '@myproject/users-api'
All function handler paths are automatically prefixed by the imported config directory.
functions:
postOrder:
handler: functions/postOrder.handler # relative to the imported config
For other fields you need to use ${dirname}
variable manually.
${dirname}
points to a directory of imported config file.
custom:
webpack:
webpackConfig: ${dirname}/webpack.config.js
In case you want to customize imported config in more dynamic way, provide it as javascript file (serverless.js
).
module.exports = ({ name, schema }) => ({
provider: {
iamRoleStatements: [
// ...
],
},
// ...
})
You can pass arguments to the imported file using module
and inputs
fields:
custom:
import:
- module: '@myproject/aws-dynamodb' # can be also a path to js file
inputs:
name: custom-table
schema:
# ...
FAQs
Adds possibility to import YAML files in serverless.yaml config file
The npm package @bafsllc/serverless-import-config-plugin receives a total of 2 weekly downloads. As such, @bafsllc/serverless-import-config-plugin popularity was classified as not popular.
We found that @bafsllc/serverless-import-config-plugin 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.
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.