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

azure-chaos-fn

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

azure-chaos-fn

The base module for all azure-chaos extensions

  • 2.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
2
Weekly downloads
 
Created
Source

azure-chaos-fn

Build Status

A helper module for all node azure-chaos extensions :gear: :robot:

readme logo

This module defines a javascript framework that is helpful when authoring azure-chaos functions. It provides lightweight helpers that allow extension authors to more easily engineer chaos, without worrying about communication details with the orchestrator.

API

This is the exported API from the azure-chaos-fn module.

validators

Request validation helpers. Useful to ensure data coming in is behaving as expecting.

const validate = require('azure-chaos-fn/validators')
accessToken

Validates that the body of a req object contains a valid accessToken.

try { require('azure-chaos-fn/validators').accessToken(req) } catch (ex) { console.error(`error: ${ex}`) }
resources

Validates that the body of a req object contains a valid resources array.

try { require('azure-chaos-fn/validators').resources(req) } catch (ex) { console.error(`error: ${ex}`) }

parsers

Note: these depend on the validators to ensure only valid data is parsed.

Request parser helpers. Useful to parse valid request data into models.

const parsers = require('azure-chaos-fn/parsers')
accessTokenToCredentials

Inflates the accessToken from a req objects body into a ms-rest-azure compatible credentials object.

const credentials = require('azure-chaos-fn/parsers').accessTokenToCredentials(req)
resourcesToObjects

Inflates the resources from a req objects body into a collection of objects containing the following properties:

  • subscriptionId - the azure subscription id to target
  • resourceGroupName - the azure resource group name to target
  • resourceName - the azure resource name to target
const objs = require('azure-chaos-fn/parsers').resourcesToObjects(req)

License

MIT

Keywords

FAQs

Package last updated on 07 Feb 2018

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