asl-validator
Advanced tools
Comparing version 1.5.1 to 1.6.0
{ | ||
"name": "asl-validator", | ||
"version": "1.5.1", | ||
"version": "1.6.0", | ||
"description": "Amazon States Language validator", | ||
@@ -15,3 +15,3 @@ "main": "./src/validator.js", | ||
"type": "git", | ||
"url": "git+https://github.com/airware/asl-validator.git" | ||
"url": "git+https://github.com/ChristopheBougere/asl-validator.git" | ||
}, | ||
@@ -30,8 +30,8 @@ "keywords": [ | ||
"bugs": { | ||
"url": "https://github.com/airware/asl-validator/issues" | ||
"url": "https://github.com/ChristopheBougere/asl-validator/issues" | ||
}, | ||
"homepage": "https://github.com/airware/asl-validator#readme", | ||
"homepage": "https://github.com/ChristopheBougere/asl-validator#readme", | ||
"dependencies": { | ||
"ajv": "^6.12.2", | ||
"commander": "^2.20.3", | ||
"commander": "^5.1.0", | ||
"jsonpath": "^1.0.2" | ||
@@ -41,9 +41,9 @@ }, | ||
"codecov": "^3.6.5", | ||
"eslint": "^5.9.0", | ||
"eslint-config-airbnb-base": "^13.2.0", | ||
"eslint": "^7.0.0", | ||
"eslint-config-airbnb-base": "^14.1.0", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-jest": "^22.21.0", | ||
"jest": "^23.6.0", | ||
"jest-junit": "^5.2.0" | ||
"eslint-plugin-jest": "^23.10.0", | ||
"jest": "^26.0.1", | ||
"jest-junit": "^10.0.0" | ||
} | ||
} |
# asl-validator | ||
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/airware/asl-validator/blob/master/LICENSE) | ||
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/ChristopheBougere/asl-validator/blob/master/LICENSE) | ||
[![npm version](https://badge.fury.io/js/asl-validator.svg)](https://badge.fury.io/js/asl-validator) | ||
[![CircleCI](https://circleci.com/gh/airware/asl-validator/tree/master.svg?style=shield&circle-token=cbc6b9369907c4854a5881d486c244ddcc1b1f55)](https://circleci.com/gh/airware/asl-validator/tree/master) | ||
[![codecov](https://codecov.io/gh/airware/asl-validator/branch/master/graph/badge.svg)](https://codecov.io/gh/airware/asl-validator) | ||
@@ -8,0 +6,0 @@ [![NPM](https://nodei.co/npm/asl-validator.png?stars=true)](https://www.npmjs.com/package/asl-validator) |
const jp = require('jsonpath'); | ||
module.exports = definition => jp.query(definition, '$..[\'InputPath\',\'OutputPath\',\'ResultPath\']') | ||
.filter(path => typeof path === 'string') | ||
module.exports = (definition) => jp.query(definition, '$..[\'InputPath\',\'OutputPath\',\'ResultPath\']') | ||
.filter((path) => typeof path === 'string') | ||
.map((path) => { | ||
@@ -13,2 +13,2 @@ try { | ||
}) | ||
.filter(parsed => parsed); // remove null values to keep only errors | ||
.filter((parsed) => parsed); // remove null values to keep only errors |
@@ -13,8 +13,8 @@ const jp = require('jsonpath'); | ||
const reachableStates = jp.query(definition, '$..[\'StartAt\',\'Next\',\'Default\']') | ||
.filter(path => typeof path === 'string') | ||
.filter((path) => typeof path === 'string') | ||
.filter((path, pos, array) => array.indexOf(path) === pos); | ||
// check if all states are reachable | ||
const unreachable = machineStates.filter(state => reachableStates.indexOf(state) === -1) | ||
.map(state => ({ | ||
const unreachable = machineStates.filter((state) => reachableStates.indexOf(state) === -1) | ||
.map((state) => ({ | ||
'Error code': 'MISSING_TRANSITION_TARGET', | ||
@@ -25,4 +25,4 @@ Message: `State ${state} is not reachable`, | ||
// check if all 'Next', 'StartAt' and 'Default' states exist | ||
const inexistant = reachableStates.filter(state => machineStates.indexOf(state) === -1) | ||
.map(state => ({ | ||
const inexistant = reachableStates.filter((state) => machineStates.indexOf(state) === -1) | ||
.map((state) => ({ | ||
'Error code': 'MISSING_TRANSITION_TARGET', | ||
@@ -29,0 +29,0 @@ Message: `Missing 'StartAt'|'Next'|'Default' target: ${state}`, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1
32932
132218
19
776
72
+ Addedcommander@5.1.0(transitive)
- Removedcommander@2.20.3(transitive)
Updatedcommander@^5.1.0