@gradientedge/cdk-utils 5.11.0 → 5.14.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.
@@ -60,10 +60,14 @@ class SqsManager {
60
60
  throw `Queue props undefined`;
61
61
  const queue = new sqs.Queue(scope, id, {
62
62
  queueName: props.queueName,
63
- visibilityTimeout: cdk.Duration.seconds(props.visibilityTimeoutInSecs),
64
- receiveMessageWaitTime: cdk.Duration.seconds(props.receiveMessageWaitTimeInSecs),
63
+ visibilityTimeout: props.visibilityTimeoutInSecs
64
+ ? cdk.Duration.seconds(props.visibilityTimeoutInSecs)
65
+ : undefined,
66
+ receiveMessageWaitTime: props.receiveMessageWaitTimeInSecs
67
+ ? cdk.Duration.seconds(props.receiveMessageWaitTimeInSecs)
68
+ : undefined,
65
69
  contentBasedDeduplication: props.contentBasedDeduplication,
66
- dataKeyReuse: cdk.Duration.seconds(props.dataKeyReuseInSecs),
70
+ dataKeyReuse: props.dataKeyReuseInSecs ? cdk.Duration.seconds(props.dataKeyReuseInSecs) : undefined,
67
71
  deadLetterQueue: !deadLetterQueue
68
72
  ? undefined
69
73
  : {
@@ -71,7 +75,7 @@ class SqsManager {
71
75
  maxReceiveCount: props.maxReceiveCount,
72
76
  },
73
77
  deduplicationScope: props.deduplicationScope,
74
- deliveryDelay: cdk.Duration.seconds(props.deliveryDelayInSecs),
78
+ deliveryDelay: props.deliveryDelayInSecs ? cdk.Duration.seconds(props.deliveryDelayInSecs) : undefined,
75
79
  encryption: props.encryption,
76
80
  encryptionMasterKey: props.encryptionMasterKey,
77
81
  fifo: props.fifo,
@@ -92,10 +96,9 @@ class SqsManager {
92
96
  * @param {types.LambdaProps} props the lambda properties
93
97
  */
94
98
  createRedriveQueueForLambda(id, scope, props) {
95
- if (!props.dlq || !props.redriveq)
99
+ if (!props.redriveq)
96
100
  throw `Redrive queue props for Lambda undefined`;
97
101
  return this.createQueue(`${id}`, scope, {
98
- ...props.dlq,
99
102
  ...props.redriveq,
100
103
  ...{
101
104
  queueName: `${props.functionName}-redriveq-${scope.props.stage}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "5.11.0",
3
+ "version": "5.14.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -46,52 +46,52 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@types/lodash": "^4.14.182",
49
- "@types/node": "^18.0.0",
49
+ "@types/node": "^18.6.4",
50
50
  "app-root-path": "^3.0.0",
51
- "aws-cdk-lib": "^2.28.1",
52
- "aws-sdk": "^2.1158.0",
53
- "constructs": "^10.1.42",
51
+ "aws-cdk-lib": "^2.35.0",
52
+ "aws-sdk": "^2.1189.0",
53
+ "constructs": "^10.1.67",
54
54
  "lodash": "^4.17.21",
55
- "moment": "^2.29.3",
55
+ "moment": "^2.29.4",
56
56
  "nconf": "^0.12.0",
57
57
  "pluralize": "^8.0.0",
58
- "ts-node": "^10.8.1"
58
+ "ts-node": "^10.9.1"
59
59
  },
60
60
  "devDependencies": {
61
- "@babel/plugin-proposal-class-properties": "^7.17.12",
62
- "@types/jest": "^28.1.2",
63
- "@typescript-eslint/eslint-plugin": "^5.29.0",
64
- "@typescript-eslint/parser": "^5.29.0",
61
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
62
+ "@types/jest": "^28.1.6",
63
+ "@typescript-eslint/eslint-plugin": "^5.32.0",
64
+ "@typescript-eslint/parser": "^5.32.0",
65
65
  "aws-cdk": "*",
66
66
  "babel-eslint": "^10.1.0",
67
67
  "better-docs": "^2.7.2",
68
68
  "codecov": "^3.8.3",
69
- "commitizen": "^4.2.4",
69
+ "commitizen": "^4.2.5",
70
70
  "dotenv": "^16.0.1",
71
- "eslint": "^8.18.0",
71
+ "eslint": "^8.21.0",
72
72
  "eslint-config-prettier": "^8.5.0",
73
73
  "eslint-plugin-import": "^2.26.0",
74
74
  "husky": "^8.0.1",
75
- "jest": "^28.1.1",
76
- "jest-extended": "^2.0.0",
77
- "jest-junit": "^13.2.0",
78
- "jsdoc": "^3.6.10",
75
+ "jest": "^28.1.3",
76
+ "jest-extended": "^3.0.2",
77
+ "jest-junit": "^14.0.0",
78
+ "jsdoc": "^3.6.11",
79
79
  "jsdoc-babel": "^0.5.0",
80
80
  "jsdoc-mermaid": "^1.0.0",
81
- "lerna": "^5.1.4",
81
+ "lerna": "^5.3.0",
82
82
  "prettier": "^2.7.1",
83
- "prettier-plugin-organize-imports": "^3.0.0",
83
+ "prettier-plugin-organize-imports": "^3.0.1",
84
84
  "rimraf": "^3.0.2",
85
85
  "semantic-release": "^19.0.3",
86
- "ts-jest": "^28.0.5",
87
- "ts-node": "^10.8.1",
86
+ "ts-jest": "^28.0.7",
87
+ "ts-node": "^10.9.1",
88
88
  "typescript": "4.7.4"
89
89
  },
90
90
  "optionalDependencies": {
91
- "@babel/core": "^7.18.5",
91
+ "@babel/core": "^7.18.10",
92
92
  "prop-types": "^15.8.1",
93
- "react": "^17.0.2",
94
- "react-dom": "^17.0.2"
93
+ "react": "^18.2.0",
94
+ "react-dom": "^18.2.0"
95
95
  },
96
96
  "config": {
97
97
  "commitizen": {
@@ -37,10 +37,14 @@ export class SqsManager {
37
37
 
38
38
  const queue = new sqs.Queue(scope, id, {
39
39
  queueName: props.queueName,
40
- visibilityTimeout: cdk.Duration.seconds(props.visibilityTimeoutInSecs),
41
- receiveMessageWaitTime: cdk.Duration.seconds(props.receiveMessageWaitTimeInSecs),
40
+ visibilityTimeout: props.visibilityTimeoutInSecs
41
+ ? cdk.Duration.seconds(props.visibilityTimeoutInSecs)
42
+ : undefined,
43
+ receiveMessageWaitTime: props.receiveMessageWaitTimeInSecs
44
+ ? cdk.Duration.seconds(props.receiveMessageWaitTimeInSecs)
45
+ : undefined,
42
46
  contentBasedDeduplication: props.contentBasedDeduplication,
43
- dataKeyReuse: cdk.Duration.seconds(props.dataKeyReuseInSecs),
47
+ dataKeyReuse: props.dataKeyReuseInSecs ? cdk.Duration.seconds(props.dataKeyReuseInSecs) : undefined,
44
48
  deadLetterQueue: !deadLetterQueue
45
49
  ? undefined
46
50
  : {
@@ -48,7 +52,7 @@ export class SqsManager {
48
52
  maxReceiveCount: props.maxReceiveCount,
49
53
  },
50
54
  deduplicationScope: props.deduplicationScope,
51
- deliveryDelay: cdk.Duration.seconds(props.deliveryDelayInSecs),
55
+ deliveryDelay: props.deliveryDelayInSecs ? cdk.Duration.seconds(props.deliveryDelayInSecs) : undefined,
52
56
  encryption: props.encryption,
53
57
  encryptionMasterKey: props.encryptionMasterKey,
54
58
  fifo: props.fifo,
@@ -72,10 +76,9 @@ export class SqsManager {
72
76
  * @param {types.LambdaProps} props the lambda properties
73
77
  */
74
78
  public createRedriveQueueForLambda(id: string, scope: common.CommonConstruct, props: types.LambdaProps) {
75
- if (!props.dlq || !props.redriveq) throw `Redrive queue props for Lambda undefined`
79
+ if (!props.redriveq) throw `Redrive queue props for Lambda undefined`
76
80
 
77
81
  return this.createQueue(`${id}`, scope, {
78
- ...props.dlq,
79
82
  ...props.redriveq,
80
83
  ...{
81
84
  queueName: `${props.functionName}-redriveq-${scope.props.stage}`,