statelint 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/data/StateMachine.j2119 +6 -0
- data/lib/statelint/state_node.rb +3 -2
- data/statelint.gemspec +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5262124338dfbdc1d35c192fdd7489f32fa033b00d0d770fd4401b65f867f7af
|
4
|
+
data.tar.gz: ffa8f53eb75b50b9f19e3ffe9921bbf21b375ba46f9bca34d33f26bd1f07f60e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d90e211e7e76d11b1086a07df8b57c6a364abd36ddaa0132d9cae3282e4eca57e087fed77edb977303369edd094b8c8aa839166ec506095449e6819c2ecdc95
|
7
|
+
data.tar.gz: 381c044574782f87de89426762fb235dbf209c0e9e89b5af9d4ab843db78cecc4be9ff2fe7e26deb1ba324eb373a2369331f37dc4dfd8bf40bc642eb417a6de0
|
data/data/StateMachine.j2119
CHANGED
@@ -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".
|
data/lib/statelint/state_node.rb
CHANGED
@@ -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|
|
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
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.
|
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:
|
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
|
-
|
73
|
-
|
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: []
|