@gradientedge/cdk-utils 8.106.0 → 8.108.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
- const step = new sfn.Parallel(scope, `${props.name}`, {
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "8.106.0",
3
+ "version": "8.108.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -50,10 +50,10 @@
50
50
  "@aws-sdk/credential-providers": "^3.363.0",
51
51
  "@aws-sdk/types": "^3.357.0",
52
52
  "@types/lodash": "^4.14.195",
53
- "@types/node": "^20.3.3",
53
+ "@types/node": "^20.4.1",
54
54
  "@types/uuid": "^9.0.2",
55
55
  "app-root-path": "^3.1.0",
56
- "aws-cdk-lib": "^2.86.0",
56
+ "aws-cdk-lib": "^2.87.0",
57
57
  "constructs": "^10.2.69",
58
58
  "lodash": "^4.17.21",
59
59
  "moment": "^2.29.4",
@@ -63,13 +63,13 @@
63
63
  "uuid": "^9.0.0"
64
64
  },
65
65
  "devDependencies": {
66
- "@babel/core": "^7.22.6",
67
- "@babel/eslint-parser": "^7.22.6",
66
+ "@babel/core": "^7.22.8",
67
+ "@babel/eslint-parser": "^7.22.7",
68
68
  "@babel/plugin-proposal-class-properties": "^7.18.6",
69
- "@types/jest": "^29.5.2",
70
- "@typescript-eslint/eslint-plugin": "^5.61.0",
71
- "@typescript-eslint/parser": "^5.61.0",
72
- "aws-cdk": "^2.86.0",
69
+ "@types/jest": "^29.5.3",
70
+ "@typescript-eslint/eslint-plugin": "^6.0.0",
71
+ "@typescript-eslint/parser": "^6.0.0",
72
+ "aws-cdk": "^2.87.0",
73
73
  "better-docs": "^2.7.2",
74
74
  "codecov": "^3.8.3",
75
75
  "commitizen": "^4.3.0",
@@ -80,7 +80,7 @@
80
80
  "eslint-plugin-import": "^2.27.5",
81
81
  "eslint-plugin-jsdoc": "^46.4.3",
82
82
  "husky": "^8.0.3",
83
- "jest": "^29.6.0",
83
+ "jest": "^29.6.1",
84
84
  "jest-extended": "^4.0.0",
85
85
  "jest-junit": "^16.0.0",
86
86
  "jsdoc": "^4.0.2",
@@ -88,10 +88,10 @@
88
88
  "jsdoc-mermaid": "^1.0.0",
89
89
  "jsdoc-plugin-typescript": "^2.2.1",
90
90
  "jsdoc-to-markdown": "^8.0.0",
91
- "prettier": "^2.8.8",
91
+ "prettier": "^3.0.0",
92
92
  "prettier-plugin-organize-imports": "^3.2.2",
93
93
  "rimraf": "^5.0.1",
94
- "semantic-release": "^21.0.6",
94
+ "semantic-release": "^21.0.7",
95
95
  "taffydb": "^2.7.3",
96
96
  "ts-jest": "^29.1.1",
97
97
  "ts-node": "^10.9.1",
@@ -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()
@@ -384,12 +384,13 @@ export class SiteWithEcsBackend extends CommonConstruct {
384
384
  })
385
385
 
386
386
  if (this.props.siteTask.mountPoints && this.props.siteTask.mountPoints.length > 0) {
387
- this.props.siteTask.mountPoints.forEach(mountPoint =>
388
- this.siteEcsTaskDefinition.defaultContainer?.addMountPoints({
389
- containerPath: mountPoint.containerPath,
390
- readOnly: mountPoint.readOnly,
391
- sourceVolume: `${this.id}-fs`,
392
- })
387
+ this.props.siteTask.mountPoints.forEach(
388
+ mountPoint =>
389
+ this.siteEcsTaskDefinition.defaultContainer?.addMountPoints({
390
+ containerPath: mountPoint.containerPath,
391
+ readOnly: mountPoint.readOnly,
392
+ sourceVolume: `${this.id}-fs`,
393
+ })
393
394
  )
394
395
  }
395
396
  }
@@ -56,7 +56,10 @@ export interface LogGroupNoPolicyProps extends targets.TargetBaseProps {
56
56
  * Use an AWS CloudWatch LogGroup as an event rule target, but don't apply a policy.
57
57
  */
58
58
  export class CloudWatchLogGroupNoPolicy implements events.IRuleTarget {
59
- constructor(private readonly logGroup: logs.ILogGroup, private readonly props: LogGroupNoPolicyProps = {}) {}
59
+ constructor(
60
+ private readonly logGroup: logs.ILogGroup,
61
+ private readonly props: LogGroupNoPolicyProps = {}
62
+ ) {}
60
63
 
61
64
  /**
62
65
  * Returns a RuleTarget that can be used to log an event into a CloudWatch LogGroup
@@ -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
- const step = new sfn.Parallel(scope, `${props.name}`, {
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
  /**