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

@wmfs/tymly-statelint

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wmfs/tymly-statelint - npm Package Compare versions

Comparing version 1.14.0 to 1.14.1

lib/j2119_schema_loader.js

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [1.14.1](https://github.com/wmfs/tymly-statelint/compare/v1.14.0...v1.14.1) (2019-11-21)
### 🐛 Bug Fixes
* Fix parameter and resource-config validation to allow them to contain any fields. ([103d1e6](https://github.com/wmfs/tymly-statelint/commit/103d1e6d3f0a5f1ec7ba53ed3e77a50dc1ae62e4))
# [1.14.0](https://github.com/wmfs/tymly-statelint/compare/v1.13.0...v1.14.0) (2019-11-14)

@@ -2,0 +9,0 @@

6

lib/task_node.js
const path = require('path')
const fs = require('fs')
const j2119Validator = require('@wmfs/j2119')
const j2119SubObjectValidator = require('./j2119_schema_loader')
const jsonSchemaValidator = require('./json_schema_loader')

@@ -12,3 +12,3 @@ const kebabCase = require('lodash.kebabcase')

const schemaTypes = {
j2119: j2119Validator,
j2119: j2119SubObjectValidator,
json: jsonSchemaValidator

@@ -97,3 +97,3 @@ }

const usedValidator = this.recheckResourceConfig(name, resourceConfig, rcOk, validator)
this.recheckParameters(name, state.Parameters, pOk, usedValidator ? null : validator, fixUps)
this.recheckParameters(name, parameters, pOk, usedValidator ? null : validator, fixUps)
} // checkResource

@@ -100,0 +100,0 @@

{
"name": "@wmfs/tymly-statelint",
"version": "1.14.0",
"version": "1.14.1",
"description": "Validator for Amazon States Language with Tymly Extensions JSON.",

@@ -5,0 +5,0 @@ "author": "West Midlands Fire Service",

@@ -24,2 +24,5 @@ /* eslint-env mocha */

rootDirPath: path.resolve(__dirname, './fixtures/call-function/')
},
FreeFormParameters: {
rootDirPath: path.resolve(__dirname, './fixtures/free-form-parameters/')
}

@@ -452,2 +455,69 @@ }

})
describe('Task Parameters validation where parameters may have any shape', () => {
const machine = {
StartAt: 'A',
States: {
A: {
Type: 'Task',
Resource: 'module:FreeFormParameters',
End: true
}
}
}
verify(
'Parameters validate when none given',
machine,
0
)
machine.States.A['Parameters'] = {
'function': 'getFruitName',
'parameter': 'chirimoya'
}
verify(
'Parameters validate with string fields',
machine,
0
)
machine.States.A['Parameters'] = {
'object': {
'parameter': 'chirimoya'
}
}
verify(
'Parameters validate with object field',
machine,
0
)
machine.States.A['Parameters'] = {
functionName: 100
}
verify(
'Parameters validate with integer',
machine,
0
)
machine.States.A['Parameters'] = {
'functionName.$': '$.isBanana'
}
verify(
'Parameters validates when extracting values',
machine,
0
)
machine.States.A['Parameters'] = {
'functionName.$': 'Wango'
}
verify(
'Parameters extract value must be a Path ',
machine,
1
)
})
})

@@ -454,0 +524,0 @@

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