statelint 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f7cf7b9cd3f0f19021f4bb2fb8657b1f282f5dd014914b0ecee706a1f89abdd
4
- data.tar.gz: 11cd1013ed9799022e84986f740d53cc04ebb64dd26555f7131922fb8c862f4d
3
+ metadata.gz: 5262124338dfbdc1d35c192fdd7489f32fa033b00d0d770fd4401b65f867f7af
4
+ data.tar.gz: ffa8f53eb75b50b9f19e3ffe9921bbf21b375ba46f9bca34d33f26bd1f07f60e
5
5
  SHA512:
6
- metadata.gz: cae59e2cd4ac26483138e8f1ae50c74cb09f93f5bb76dab010db0748ae0bde3d86e19679e081ba8d3ae8a2193d9428f755b1882a928d45550ea66201e793978a
7
- data.tar.gz: b325d6cafdbc3ce69ebcfca460a2d8c8eaad5bef6f5fcaad36b90cf49ec79f5381e02d9280ccd4b982b3451c4bf9a639472abeb87c30127cc43a5d38f661e1fe
6
+ metadata.gz: 7d90e211e7e76d11b1086a07df8b57c6a364abd36ddaa0132d9cae3282e4eca57e087fed77edb977303369edd094b8c8aa839166ec506095449e6819c2ecdc95
7
+ data.tar.gz: 381c044574782f87de89426762fb235dbf209c0e9e89b5af9d4ab843db78cecc4be9ff2fe7e26deb1ba324eb373a2369331f37dc4dfd8bf40bc642eb417a6de0
@@ -28,7 +28,11 @@ A Pass State MAY have a field named "Result".
28
28
  A Fail State MUST NOT have a field named "InputPath".
29
29
  A Fail State MUST NOT have a field named "OutputPath".
30
30
  A Fail State MAY have a string field named "Cause".
31
+ A Fail State MAY have a field named "CausePath".
32
+ A Fail State MAY have only one of "Cause" and "CausePath".
31
33
  A Fail State MAY have a string field named "Error".
34
+ A Fail State MAY have a field named "ErrorPath".
35
+ A Fail State MAY have only one of "Error" and "ErrorPath".
32
36
  Each of a Task State, a Parallel State, and a Map State MAY have an object-array field named "Retry"; each element is a "Retrier".
33
37
  A Task State MUST have a URI field named "Resource".
34
38
  A Task State MAY have a positive-integer field named "TimeoutSeconds" whose value MUST be less than 99999999.
@@ -41,6 +45,8 @@ A Retrier MUST have a nonempty-string-array field named "ErrorEquals".
41
45
  A Retrier MAY have an positive-integer field named "IntervalSeconds".
42
46
  A Retrier MAY have a nonnegative-integer field named "MaxAttempts" whose value MUST be less than 99999999.
43
47
  A Retrier MAY have a float field named "BackoffRate" whose value MUST be greater than or equal to 1.0.
48
+ A Retrier MAY have a positive-integer field named "MaxDelaySeconds".
49
+ A Retrier MAY have a string field named "JitterStrategy" whose value MUST be one of "FULL" or "NONE".
44
50
  Each of a Task State, a Parallel State, and a Map State MAY have an object-array field named "Catch"; each element is a "Catcher".
45
51
  A Catcher MUST have an nonempty-string-array field named "ErrorEquals".
46
52
  A Catcher MUST have a string field named "Next".
@@ -35,7 +35,8 @@ module StateMachineLint
35
35
  @payload_builder_fields = ["Parameters", "ResultSelector"]
36
36
  @context_object_access_fields = [{"field"=> "InputPath", "nullable"=> true}, {"field"=> "OutputPath", "nullable"=> true}, {"field"=> "ItemsPath", "nullable"=> false}]
37
37
  @choice_state_nested_operators = ["And", "Or", "Not"]
38
- @intrinsic_invocation_regex = /^States\.(JsonToString|Format|StringToJson|Array)\(.+\)$/
38
+ @intrinsic_invocation_regex = /^States\.(Format|Array|ArrayPartition|ArrayContains|ArrayRange|ArrayGetItem|ArrayLength|ArrayUnique|Base64Encode|Base64Decode|Hash|JsonMerge|JsonToString|StringToJson|MathRandom|MathAdd|StringSplit)\(.+\)$/
39
+ @intrinsic_uuid_invocation_regex = /^States\.UUID\(\)$/
39
40
  end
40
41
 
41
42
  def check(node, path, problems)
@@ -183,7 +184,7 @@ module StateMachineLint
183
184
  end
184
185
 
185
186
  def is_intrinsic_invocation?(val)
186
- if val.is_a?(String) && val.match?(@intrinsic_invocation_regex)
187
+ if val.is_a?(String) && (val.match?(@intrinsic_invocation_regex) || val.match?(@intrinsic_uuid_invocation_regex))
187
188
  return true
188
189
  end
189
190
  return false
data/statelint.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'statelint'
3
- s.version = '0.5.0'
3
+ s.version = '0.6.0'
4
4
  s.summary = "State Machine JSON validator"
5
5
  s.description = "Validates a JSON object representing a State Machine"
6
6
  s.authors = ["Tim Bray"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: statelint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Bray
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-13 00:00:00.000000000 Z
11
+ date: 2023-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: j2119
@@ -54,7 +54,7 @@ licenses:
54
54
  metadata:
55
55
  source_code_uri: https://github.com/awslabs/statelint
56
56
  bug_tracker_uri: https://github.com/awslabs/statelint/issues
57
- post_install_message:
57
+ post_install_message:
58
58
  rdoc_options: []
59
59
  require_paths:
60
60
  - lib
@@ -69,9 +69,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubyforge_project:
73
- rubygems_version: 2.7.4
74
- signing_key:
72
+ rubygems_version: 3.4.10
73
+ signing_key:
75
74
  specification_version: 4
76
75
  summary: State Machine JSON validator
77
76
  test_files: []