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

asl-validator

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asl-validator - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

src/__tests__/definitions/invalid-parallel-missing-branches.json

2

package.json
{
"name": "asl-validator",
"version": "1.0.1",
"version": "1.0.2",
"description": "Amazon States Language validator",

@@ -5,0 +5,0 @@ "main": "./src/validator.js",

# asl-validator
A simple **Amazon States Language** validator based on JSON schemas.
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/airware/asl-validator/blob/master/LICENSE)
A simple [**Amazon States Language**](https://states-language.net/spec.html) validator based on JSON schemas.
When writing your state machine (for AWS step functions), you can't locally validate you state machine definition without creating it. `asl-validator` makes it possible.

@@ -6,0 +8,0 @@

@@ -14,6 +14,9 @@ const fs = require('fs');

const definition = JSON.parse(fs.readFileSync(path.join(__dirname, 'definitions', files[i])));
const { isValid, errors } = validator(definition);
if (match[1] === 'valid') {
expect(validator(definition)).toBeTruthy();
expect(isValid).toBeTruthy();
expect(errors).toBeNull();
} else if (match[1] === 'invalid') {
expect(validator(definition)).toThrowError(/InvalidStateMachineDefinition/);
expect(isValid).toBeFalsy();
expect(errors.length).toBeGreaterThan(0);
}

@@ -20,0 +23,0 @@ });

@@ -39,4 +39,4 @@ {

}],
"required": ["Type"],
"required": ["Type", "Branches"],
"additionalProperties": false
}
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