@lafken/state-machine 0.12.4 → 0.12.6
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.
|
@@ -619,8 +619,13 @@ export interface MapStateBase<T> extends CatchAndRetry<T> {
|
|
|
619
619
|
*
|
|
620
620
|
* Specifies the maximum number of items that the `Map` state
|
|
621
621
|
* will process in parallel at the same time.
|
|
622
|
+
* Can be provided as a number or a JSONata expression.
|
|
623
|
+
* @example
|
|
624
|
+
* {
|
|
625
|
+
* maxCurrency: '{% $states.input.concurrency %}'
|
|
626
|
+
* }
|
|
622
627
|
*/
|
|
623
|
-
maxCurrency?: number;
|
|
628
|
+
maxCurrency?: number | JsonAtaString;
|
|
624
629
|
/**
|
|
625
630
|
* Item selector.
|
|
626
631
|
*
|
|
@@ -672,14 +677,23 @@ export interface MapStateBase<T> extends CatchAndRetry<T> {
|
|
|
672
677
|
/**
|
|
673
678
|
* Specifies the maximum percentage of items in the distributed map
|
|
674
679
|
* that are allowed to fail before the entire operation is considered unsuccessful.
|
|
675
|
-
*
|
|
680
|
+
* Can be provided as a number or a JSONata expression.
|
|
681
|
+
* @example
|
|
682
|
+
* {
|
|
683
|
+
* toleratedFailurePercentage: '{% $states.input.failurePercentage %}'
|
|
684
|
+
* }
|
|
676
685
|
*/
|
|
677
|
-
toleratedFailurePercentage?: number;
|
|
686
|
+
toleratedFailurePercentage?: number | JsonAtaString;
|
|
678
687
|
/**
|
|
679
688
|
* Specifies the maximum number of items that can fail during the
|
|
680
689
|
* distributed map execution before the entire operation is considered unsuccessful.
|
|
690
|
+
* Can be provided as a number or a JSONata expression.
|
|
691
|
+
* @example
|
|
692
|
+
* {
|
|
693
|
+
* toleratedFailureCount: '{% $states.input.failureCount %}'
|
|
694
|
+
* }
|
|
681
695
|
*/
|
|
682
|
-
toleratedFailureCount?: number;
|
|
696
|
+
toleratedFailureCount?: number | JsonAtaString;
|
|
683
697
|
/**
|
|
684
698
|
* End state indicator.
|
|
685
699
|
*
|
|
@@ -782,8 +796,13 @@ export interface MapDistributed<T> extends MapStateBase<T> {
|
|
|
782
796
|
* Max Items Per Batch
|
|
783
797
|
*
|
|
784
798
|
* Defines the maximum number of items to be processed per batch in a Map state execution.
|
|
799
|
+
* Can be provided as a number or a JSONata expression.
|
|
800
|
+
* @example
|
|
801
|
+
* {
|
|
802
|
+
* maxItemsPerBatch: '{% $states.input.batchSize %}'
|
|
803
|
+
* }
|
|
785
804
|
*/
|
|
786
|
-
maxItemsPerBatch?: number;
|
|
805
|
+
maxItemsPerBatch?: number | JsonAtaString;
|
|
787
806
|
}
|
|
788
807
|
type MapState<T> = MapInline<T> | MapDistributed<T>;
|
|
789
808
|
export type ErrorType = 'States.ALL' | 'States.HeartbeatTimeout' | 'States.Timeout' | 'States.TaskFailed' | 'States.Permissions' | 'States.ResultPathMatchFailure' | 'States.ParameterPathFailure' | 'States.QueryEvaluationError' | 'States.BranchFailed' | 'States.NoChoiceMatched' | 'States.IntrinsicFailure' | 'States.ExceedToleratedFailureThreshold' | 'States.ItemReaderFailed' | 'States.ResultWriterFailed' | (string & {});
|
|
@@ -89,9 +89,9 @@ export interface MapTask {
|
|
|
89
89
|
ItemBatcher?: ItemBatcher;
|
|
90
90
|
Items?: any[] | string;
|
|
91
91
|
ItemSelector?: string | Record<string, any>;
|
|
92
|
-
MaxConcurrency?: number;
|
|
92
|
+
MaxConcurrency?: number | string;
|
|
93
93
|
ToleratedFailurePercentage?: number | string;
|
|
94
|
-
ToleratedFailureCount?: number;
|
|
94
|
+
ToleratedFailureCount?: number | string;
|
|
95
95
|
Output?: string | Record<string, any>;
|
|
96
96
|
Assign?: Record<string, any>;
|
|
97
97
|
Next?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lafken/state-machine",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Build Step Functions workflows with TypeScript decorators - declarative orchestration with Lafken",
|
|
6
6
|
"keywords": [
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
],
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"reflect-metadata": "^0.2.2",
|
|
53
|
-
"@lafken/resolver": "0.12.
|
|
53
|
+
"@lafken/resolver": "0.12.6"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@cdktn/provider-aws": "^24.0.0",
|
|
@@ -63,13 +63,13 @@
|
|
|
63
63
|
"typescript": "6.0.3",
|
|
64
64
|
"unplugin-swc": "^1.5.9",
|
|
65
65
|
"vitest": "^4.1.5",
|
|
66
|
-
"@lafken/common": "0.12.
|
|
66
|
+
"@lafken/common": "0.12.6"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@cdktn/provider-aws": ">=23.0.0",
|
|
70
70
|
"cdktn": ">=0.22.0",
|
|
71
71
|
"constructs": "^10.4.5",
|
|
72
|
-
"@lafken/common": "0.12.
|
|
72
|
+
"@lafken/common": "0.12.6"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=20.19"
|