@lafken/state-machine 0.11.9 → 0.11.10
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.
|
@@ -716,7 +716,7 @@ interface MapReaderCSVItem extends MapReaderItemBase {
|
|
|
716
716
|
}
|
|
717
717
|
interface MapWriteResult {
|
|
718
718
|
bucket: BucketNames;
|
|
719
|
-
prefix
|
|
719
|
+
prefix: string;
|
|
720
720
|
config?: {
|
|
721
721
|
outputType: 'JSON' | 'JSONL';
|
|
722
722
|
transformation?: 'NONE' | 'COMPACT' | 'FLATTEN';
|
|
@@ -23,7 +23,7 @@ class Schema {
|
|
|
23
23
|
this.props = props;
|
|
24
24
|
this.stateNames = props.stateNames || new schema_utils_1.StateNames();
|
|
25
25
|
this.lambdaStates = props.lambdas || new schema_utils_1.LambdaStates();
|
|
26
|
-
this.getMetadata(props.initializeAssets ?? false);
|
|
26
|
+
this.getMetadata(props.initializeAssets ?? false, props.minify);
|
|
27
27
|
}
|
|
28
28
|
get definition() {
|
|
29
29
|
const startName = this.getNextState(this.resourceMetadata.startAt);
|
|
@@ -128,7 +128,7 @@ class Schema {
|
|
|
128
128
|
Type: 'Pass',
|
|
129
129
|
Assign: currentState.assign,
|
|
130
130
|
Output: currentState.output,
|
|
131
|
-
End: currentState.end,
|
|
131
|
+
End: currentState.next !== undefined ? undefined : currentState.end,
|
|
132
132
|
Next: this.getNextState(currentState.next, currentState.end),
|
|
133
133
|
};
|
|
134
134
|
break;
|
|
@@ -143,7 +143,7 @@ class Schema {
|
|
|
143
143
|
stateNames: this.stateNames,
|
|
144
144
|
minify: this.props.minify,
|
|
145
145
|
});
|
|
146
|
-
this.
|
|
146
|
+
this.lambdaResources.push(...branchSchema.resources);
|
|
147
147
|
branchStates.push(branchSchema.definition);
|
|
148
148
|
this.mergeBucketPermissions(branchSchema.buckets);
|
|
149
149
|
this.setUnresolvedDependency(branchSchema.unresolvedDependency);
|
|
@@ -153,7 +153,7 @@ class Schema {
|
|
|
153
153
|
Arguments: this.getParallelArguments(currentState.arguments),
|
|
154
154
|
Output: currentState.output,
|
|
155
155
|
Assign: currentState.assign,
|
|
156
|
-
End: currentState.
|
|
156
|
+
End: currentState.next !== undefined ? undefined : (currentState.end ?? true),
|
|
157
157
|
Next: this.getNextState(currentState.next, currentState.end),
|
|
158
158
|
Branches: branchStates,
|
|
159
159
|
};
|
|
@@ -167,7 +167,7 @@ class Schema {
|
|
|
167
167
|
stateNames: this.stateNames,
|
|
168
168
|
minify: this.props.minify,
|
|
169
169
|
});
|
|
170
|
-
this.
|
|
170
|
+
this.lambdaResources.push(...mapSchema.resources);
|
|
171
171
|
this.mergeBucketPermissions(mapSchema.buckets);
|
|
172
172
|
const mapState = mapSchema.definition;
|
|
173
173
|
this.setUnresolvedDependency(mapSchema.hasUnresolvedDependency);
|
|
@@ -181,7 +181,7 @@ class Schema {
|
|
|
181
181
|
Type: 'Map',
|
|
182
182
|
Items: currentState.items,
|
|
183
183
|
ItemProcessor: itemProcessor,
|
|
184
|
-
End: currentState.
|
|
184
|
+
End: currentState.next !== undefined ? undefined : (currentState.end ?? true),
|
|
185
185
|
Next: this.getNextState(currentState.next, currentState.end),
|
|
186
186
|
Output: currentState.output,
|
|
187
187
|
Assign: currentState.assign,
|
|
@@ -299,14 +299,14 @@ class Schema {
|
|
|
299
299
|
addTaskState(handler) {
|
|
300
300
|
const stateName = this.stateNames.createName(handler.name);
|
|
301
301
|
if (this.states[stateName]) {
|
|
302
|
-
return
|
|
302
|
+
return stateName;
|
|
303
303
|
}
|
|
304
304
|
const task = {
|
|
305
305
|
Type: 'Task',
|
|
306
306
|
Resource: '',
|
|
307
307
|
Arguments: {},
|
|
308
308
|
Next: this.getNextState(handler.next, handler.end),
|
|
309
|
-
End: handler.end,
|
|
309
|
+
End: handler.next !== undefined ? undefined : handler.end,
|
|
310
310
|
Assign: handler.assign,
|
|
311
311
|
...(handler.integrationResource !== undefined
|
|
312
312
|
? this.getIntegrationTask(handler)
|
|
@@ -419,10 +419,9 @@ class Schema {
|
|
|
419
419
|
this.addRetry(state, stateName);
|
|
420
420
|
}
|
|
421
421
|
setUnresolvedDependency(unresolved) {
|
|
422
|
-
if (
|
|
423
|
-
|
|
422
|
+
if (unresolved) {
|
|
423
|
+
this.unresolvedDependency = true;
|
|
424
424
|
}
|
|
425
|
-
this.unresolvedDependency = true;
|
|
426
425
|
}
|
|
427
426
|
mergeBucketPermissions(bucketPermissions) {
|
|
428
427
|
for (const bucket in bucketPermissions) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lafken/state-machine",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.10",
|
|
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.11.
|
|
53
|
+
"@lafken/resolver": "0.11.10"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@cdktn/provider-aws": "^23.9.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.11.
|
|
66
|
+
"@lafken/common": "0.11.10"
|
|
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.11.
|
|
72
|
+
"@lafken/common": "0.11.10"
|
|
73
73
|
},
|
|
74
74
|
"engines": {
|
|
75
75
|
"node": ">=20.19"
|