@gradientedge/cdk-utils 8.106.0 → 8.107.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.
|
@@ -47,12 +47,9 @@ class ApiToLambdaTarget extends common_1.CommonConstruct {
|
|
|
47
47
|
this.apiToLambdaTargetRestApi = new api_1.ApiToLambdaTargetRestApi();
|
|
48
48
|
}
|
|
49
49
|
initResources() {
|
|
50
|
-
/* application related resources */
|
|
51
50
|
this.resolveSecrets();
|
|
52
|
-
/* core resources */
|
|
53
51
|
this.resolveHostedZone();
|
|
54
52
|
this.resolveCertificate();
|
|
55
|
-
/* restApi related resources */
|
|
56
53
|
this.createApiToLambdaTargetMethodResponse();
|
|
57
54
|
this.createApiToLambdaTargetMethodErrorResponse();
|
|
58
55
|
this.resolveApiToLambdaTargetFunction();
|
|
@@ -26,10 +26,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.SfnManager = void 0;
|
|
27
27
|
const cdk = __importStar(require("aws-cdk-lib"));
|
|
28
28
|
const sfn = __importStar(require("aws-cdk-lib/aws-stepfunctions"));
|
|
29
|
+
const aws_stepfunctions_1 = require("aws-cdk-lib/aws-stepfunctions");
|
|
29
30
|
const tasks = __importStar(require("aws-cdk-lib/aws-stepfunctions-tasks"));
|
|
30
31
|
const utils = __importStar(require("../../../utils"));
|
|
31
32
|
const uuid_1 = require("uuid");
|
|
32
|
-
const aws_stepfunctions_1 = require("aws-cdk-lib/aws-stepfunctions");
|
|
33
33
|
const DEFAULT_RETRY_CONFIG = [
|
|
34
34
|
{
|
|
35
35
|
backoffRate: 2,
|
|
@@ -112,21 +112,12 @@ class SfnManager {
|
|
|
112
112
|
createParallelStep(id, scope, props) {
|
|
113
113
|
if (!props)
|
|
114
114
|
throw `Step props undefined for ${id}`;
|
|
115
|
-
|
|
115
|
+
return new sfn.Parallel(scope, `${props.name}`, {
|
|
116
116
|
...props,
|
|
117
117
|
...{
|
|
118
118
|
comment: `Parallel step for ${props.name} - ${scope.props.stage} stage`,
|
|
119
119
|
},
|
|
120
120
|
});
|
|
121
|
-
let retries = props.retries;
|
|
122
|
-
if (!retries || retries.length === 0) {
|
|
123
|
-
retries = DEFAULT_RETRY_CONFIG;
|
|
124
|
-
}
|
|
125
|
-
retries.forEach(retry => step.addRetry({
|
|
126
|
-
...retry,
|
|
127
|
-
...{ interval: retry.intervalInSecs ? cdk.Duration.seconds(retry.intervalInSecs) : retry.interval },
|
|
128
|
-
}));
|
|
129
|
-
return step;
|
|
130
121
|
}
|
|
131
122
|
/**
|
|
132
123
|
* @summary Method to create a choice step
|
package/package.json
CHANGED
|
@@ -31,14 +31,9 @@ export class ApiToLambdaTarget extends CommonConstruct {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
protected initResources() {
|
|
34
|
-
/* application related resources */
|
|
35
34
|
this.resolveSecrets()
|
|
36
|
-
|
|
37
|
-
/* core resources */
|
|
38
35
|
this.resolveHostedZone()
|
|
39
36
|
this.resolveCertificate()
|
|
40
|
-
|
|
41
|
-
/* restApi related resources */
|
|
42
37
|
this.createApiToLambdaTargetMethodResponse()
|
|
43
38
|
this.createApiToLambdaTargetMethodErrorResponse()
|
|
44
39
|
this.resolveApiToLambdaTargetFunction()
|
|
@@ -6,6 +6,7 @@ import * as lambda from 'aws-cdk-lib/aws-lambda'
|
|
|
6
6
|
import * as logs from 'aws-cdk-lib/aws-logs'
|
|
7
7
|
import * as sqs from 'aws-cdk-lib/aws-sqs'
|
|
8
8
|
import * as sfn from 'aws-cdk-lib/aws-stepfunctions'
|
|
9
|
+
import { DefinitionBody } from 'aws-cdk-lib/aws-stepfunctions'
|
|
9
10
|
import * as tasks from 'aws-cdk-lib/aws-stepfunctions-tasks'
|
|
10
11
|
import * as utils from '../../../utils'
|
|
11
12
|
import { v4 as uuidv4 } from 'uuid'
|
|
@@ -27,7 +28,6 @@ import {
|
|
|
27
28
|
SfnSucceedProps,
|
|
28
29
|
SfnWaitProps,
|
|
29
30
|
} from './types'
|
|
30
|
-
import { DefinitionBody } from 'aws-cdk-lib/aws-stepfunctions'
|
|
31
31
|
|
|
32
32
|
const DEFAULT_RETRY_CONFIG = [
|
|
33
33
|
{
|
|
@@ -111,26 +111,12 @@ export class SfnManager {
|
|
|
111
111
|
*/
|
|
112
112
|
public createParallelStep(id: string, scope: CommonConstruct, props: SfnParallelProps) {
|
|
113
113
|
if (!props) throw `Step props undefined for ${id}`
|
|
114
|
-
|
|
114
|
+
return new sfn.Parallel(scope, `${props.name}`, {
|
|
115
115
|
...props,
|
|
116
116
|
...{
|
|
117
117
|
comment: `Parallel step for ${props.name} - ${scope.props.stage} stage`,
|
|
118
118
|
},
|
|
119
119
|
})
|
|
120
|
-
|
|
121
|
-
let retries = props.retries
|
|
122
|
-
if (!retries || retries.length === 0) {
|
|
123
|
-
retries = DEFAULT_RETRY_CONFIG
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
retries.forEach(retry =>
|
|
127
|
-
step.addRetry({
|
|
128
|
-
...retry,
|
|
129
|
-
...{ interval: retry.intervalInSecs ? cdk.Duration.seconds(retry.intervalInSecs) : retry.interval },
|
|
130
|
-
})
|
|
131
|
-
)
|
|
132
|
-
|
|
133
|
-
return step
|
|
134
120
|
}
|
|
135
121
|
|
|
136
122
|
/**
|