@mettlecast/domain-cdk-packer 0.2.0 → 0.2.2
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.
- package/dist/DomainStack.js +1 -1
- package/dist/pack-flows.js +13 -5
- package/package.json +1 -1
package/dist/DomainStack.js
CHANGED
|
@@ -169,7 +169,7 @@ export class DomainStack extends cdk.Stack {
|
|
|
169
169
|
apiRoute = { ...apiRouteBase, authorizer: jwtAuthorizer };
|
|
170
170
|
}
|
|
171
171
|
else if (api.authType === 'api-key') {
|
|
172
|
-
|
|
172
|
+
cdk.Annotations.of(this).addWarning(`[DomainStack] API "${api.id}" uses authType "api-key" which is not supported on HTTP API v2 — route is UNAUTHENTICATED. Switch to "jwt" or implement a Lambda authorizer.`);
|
|
173
173
|
apiRoute = apiRouteBase;
|
|
174
174
|
}
|
|
175
175
|
else {
|
package/dist/pack-flows.js
CHANGED
|
@@ -127,16 +127,24 @@ export class FlowsStack extends cdk.Stack {
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
case 'flow-control':
|
|
130
|
-
return this.translateFlowControl(step);
|
|
130
|
+
return this.translateFlowControl(step, options, flowId);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
translateFlowControl(step) {
|
|
133
|
+
translateFlowControl(step, options, flowId) {
|
|
134
134
|
switch (step.control) {
|
|
135
135
|
case 'choice':
|
|
136
136
|
return { Type: 'Choice', Choices: step.choices.map(c => ({ Variable: '$.path', StringEquals: c.when, Next: c.next })), Default: step.default };
|
|
137
|
-
case 'parallel':
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
case 'parallel': {
|
|
138
|
+
const branches = step.branches.map(branchSteps => {
|
|
139
|
+
if (branchSteps.length === 0)
|
|
140
|
+
return { StartAt: 'Pass', States: { Pass: { Type: 'Pass', End: true } } };
|
|
141
|
+
const branchStates = {};
|
|
142
|
+
for (const s of branchSteps)
|
|
143
|
+
branchStates[s.name] = this.translateStep(s, options, flowId);
|
|
144
|
+
return { StartAt: branchSteps[0].name, States: branchStates };
|
|
145
|
+
});
|
|
146
|
+
return { Type: 'Parallel', Branches: branches, ...(step.next ? { Next: step.next } : { End: true }) };
|
|
147
|
+
}
|
|
140
148
|
case 'wait':
|
|
141
149
|
return { Type: 'Wait', Seconds: step.seconds, ...(step.next ? { Next: step.next } : { End: true }) };
|
|
142
150
|
case 'succeed':
|