Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sls-yaml

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sls-yaml

Serverless framework yaml extension parser

  • 1.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-82.56%
Maintainers
1
Weekly downloads
 
Created
Source

Serverless YAML extension parser

CircleCI Maintainability Test Coverage

This tiny library will parse YAML extensions used in serverless framework.

Supported extensions

  • Include external file ${file(path/to/file.yml)}
  • Inject environment variable ${env:NODE_ENV}
  • Inject global variables ${global:path.to.variable}
  • Inject local variables ${self:path.to.variable}

Include external file

This extension will include content of external yaml files.

  • config.yml
version : 1
env: dev
config: ${file(./common.yml)}
  • common.yml
endpoint: http://service-url
  • Generated final yaml
version : 1
env: dev
config: 
  endpoint: http://service-url

Inject environment variable

This extension will inject envronment values

  • config.yml export NODE_ENV = development
version : 1
env: ${env:NODE_ENV}
  • Generated final yaml
version : 1
env: development

Inject global variables

This extension will inject variable from global scope.

  • config.yml
version : 1
env: stage
config: ${file(./common.yml)}
  • common.yml
endpoint: http://service-${global:env}
  • Generated final yaml
version : 1
env: stage
config: 
  endpoint: http://service-stage

Inject local variables

This extension will inject variable from local scope.

  • config.yml
version : 1
env: stage
config: ${file(./common.yml)}
  • common.yml
port: 8080
endpoint: http://service:${self:port}
  • Generated final yaml
version : 1
env: stage
config: 
  port: 8080
  endpoint: http://service:8080

FAQs

Package last updated on 30 Jul 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc