@gradientedge/cdk-utils 9.21.0 → 9.23.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.
@@ -103,7 +103,8 @@ class EventHandler extends common_1.CommonConstruct {
103
103
  * @summary Method to resolve the event bus name or use the default bus.
104
104
  */
105
105
  resolveEventBus() {
106
- this.handler.eventBus = aws_events_1.EventBus.fromEventBusName(this, `${this.id}-bus`, this.props.eventBusName ?? 'default');
106
+ this.handler.eventBus = aws_events_1.EventBus.fromEventBusName(this, `${this.id}-bus`, this.resourceNameFormatter.format(this.props.eventBusName, this.props.resourceNameOptions?.eventbridgeBus) ??
107
+ 'default');
107
108
  }
108
109
  /**
109
110
  * @summary Method to create an event archive if the event rule is not a scheduled one.
@@ -47,7 +47,7 @@ class EventManager {
47
47
  ...props,
48
48
  eventBusName,
49
49
  });
50
- (0, utils_1.createCfnOutput)(`${id}-eventBusName`, scope, `${props.eventBusName}-${scope.props.stage}`);
50
+ (0, utils_1.createCfnOutput)(`${id}-eventBusName`, scope, eventBusName);
51
51
  (0, utils_1.createCfnOutput)(`${id}-eventBusArn`, scope, eventBus.eventBusArn);
52
52
  return eventBus;
53
53
  }
@@ -12,7 +12,6 @@ const lodash_1 = __importDefault(require("lodash"));
12
12
  const common_1 = require("../../common");
13
13
  const utils_1 = require("../../utils");
14
14
  const cloudfront_1 = require("../cloudfront");
15
- const systems_manager_1 = require("../systems-manager");
16
15
  /**
17
16
  * @classdesc Provides operations on AWS Lambda
18
17
  * - A new instance of this class is injected into {@link CommonConstruct} constructor.
@@ -89,9 +88,6 @@ class LambdaManager {
89
88
  code,
90
89
  deadLetterQueue,
91
90
  environment: {
92
- LAST_MODIFIED_TS: props.excludeLastModifiedTimestamp
93
- ? ''
94
- : scope.ssmManager.readStringParameter(`${id}-sm-ts`, scope, `${systems_manager_1.SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}`),
95
91
  LOG_LEVEL: props.logLevel,
96
92
  REGION: scope.props.region,
97
93
  STAGE: scope.props.stage,
@@ -194,9 +190,6 @@ class LambdaManager {
194
190
  code,
195
191
  deadLetterQueue,
196
192
  environment: {
197
- LAST_MODIFIED_TS: props.excludeLastModifiedTimestamp
198
- ? ''
199
- : scope.ssmManager.readStringParameter(`${id}-sm-ts`, scope, `${systems_manager_1.SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}`),
200
193
  LOG_LEVEL: props.logLevel,
201
194
  REGION: scope.props.region,
202
195
  STAGE: scope.props.stage,
@@ -0,0 +1 @@
1
+ {"root":["../app/api-destined-function/src/lib/lambda.ts","../app/api-destined-function/src/test/lambda.test.ts"],"version":"5.6.2"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "9.21.0",
3
+ "version": "9.23.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -50,19 +50,19 @@
50
50
  }
51
51
  },
52
52
  "dependencies": {
53
- "@aws-sdk/client-secrets-manager": "^3.637.0",
54
- "@aws-sdk/credential-providers": "^3.637.0",
55
- "@aws-sdk/types": "^3.609.0",
56
- "@cdktf/provider-aws": "^19.33.0",
57
- "@cdktf/provider-azurerm": "^13.0.0",
58
- "@cdktf/provider-cloudflare": "^11.18.0",
59
- "@types/lodash": "^4.17.7",
60
- "@types/node": "^22.5.2",
53
+ "@aws-sdk/client-secrets-manager": "^3.662.0",
54
+ "@aws-sdk/credential-providers": "^3.662.0",
55
+ "@aws-sdk/types": "^3.662.0",
56
+ "@cdktf/provider-aws": "^19.35.0",
57
+ "@cdktf/provider-azurerm": "^13.3.0",
58
+ "@cdktf/provider-cloudflare": "^11.21.0",
59
+ "@types/lodash": "^4.17.10",
60
+ "@types/node": "^22.7.4",
61
61
  "@types/uuid": "^10.0.0",
62
62
  "app-root-path": "^3.1.0",
63
- "aws-cdk-lib": "^2.155.0",
64
- "cdktf": "^0.20.8",
65
- "cdktf-local-exec": "^0.5.36",
63
+ "aws-cdk-lib": "^2.160.0",
64
+ "cdktf": "^0.20.9",
65
+ "cdktf-local-exec": "^0.5.39",
66
66
  "constructs": "^10.3.0",
67
67
  "lodash": "^4.17.21",
68
68
  "moment": "^2.30.1",
@@ -72,40 +72,40 @@
72
72
  "uuid": "^10.0.0"
73
73
  },
74
74
  "devDependencies": {
75
- "@babel/core": "^7.25.2",
76
- "@babel/eslint-parser": "^7.25.1",
75
+ "@babel/core": "^7.25.7",
76
+ "@babel/eslint-parser": "^7.25.7",
77
77
  "@babel/plugin-proposal-class-properties": "^7.18.6",
78
- "@types/jest": "^29.5.12",
79
- "@typescript-eslint/eslint-plugin": "^8.4.0",
80
- "@typescript-eslint/parser": "^8.4.0",
81
- "aws-cdk": "^2.155.0",
78
+ "@types/jest": "^29.5.13",
79
+ "@typescript-eslint/eslint-plugin": "^8.8.0",
80
+ "@typescript-eslint/parser": "^8.8.0",
81
+ "aws-cdk": "^2.160.0",
82
82
  "better-docs": "^2.7.3",
83
83
  "codecov": "^3.8.3",
84
- "commitizen": "^4.3.0",
84
+ "commitizen": "^4.3.1",
85
85
  "docdash": "^2.0.2",
86
86
  "dotenv": "^16.4.5",
87
- "eslint": "^9.9.1",
87
+ "eslint": "^9.11.1",
88
88
  "eslint-config-prettier": "^9.1.0",
89
- "eslint-plugin-import": "^2.29.1",
90
- "eslint-plugin-jsdoc": "^50.2.2",
91
- "husky": "^9.1.5",
89
+ "eslint-plugin-import": "^2.31.0",
90
+ "eslint-plugin-jsdoc": "^50.3.1",
91
+ "husky": "^9.1.6",
92
92
  "jest": "^29.7.0",
93
93
  "jest-extended": "^4.0.2",
94
94
  "jest-junit": "^16.0.0",
95
95
  "jsdoc": "^4.0.3",
96
96
  "jsdoc-babel": "^0.5.0",
97
97
  "jsdoc-mermaid": "^1.0.0",
98
- "jsdoc-plugin-typescript": "^2.3.0",
99
- "jsdoc-to-markdown": "^9.0.0",
98
+ "jsdoc-plugin-typescript": "^3.0.0",
99
+ "jsdoc-to-markdown": "^9.0.2",
100
100
  "prettier": "^3.3.3",
101
- "prettier-plugin-organize-imports": "^4.0.0",
101
+ "prettier-plugin-organize-imports": "^4.1.0",
102
102
  "rimraf": "^6.0.1",
103
- "semantic-release": "^24.1.0",
103
+ "semantic-release": "^24.1.2",
104
104
  "taffydb": "^2.7.3",
105
105
  "ts-jest": "^29.2.5",
106
106
  "ts-node": "^10.9.2",
107
- "typescript": "5.5.4",
108
- "yaml": "^2.5.0"
107
+ "typescript": "5.6.2",
108
+ "yaml": "^2.5.1"
109
109
  },
110
110
  "optionalDependencies": {
111
111
  "prop-types": "^15.8.1",
@@ -117,7 +117,12 @@ export class EventHandler extends CommonConstruct {
117
117
  * @summary Method to resolve the event bus name or use the default bus.
118
118
  */
119
119
  protected resolveEventBus() {
120
- this.handler.eventBus = EventBus.fromEventBusName(this, `${this.id}-bus`, this.props.eventBusName ?? 'default')
120
+ this.handler.eventBus = EventBus.fromEventBusName(
121
+ this,
122
+ `${this.id}-bus`,
123
+ this.resourceNameFormatter.format(this.props.eventBusName, this.props.resourceNameOptions?.eventbridgeBus) ??
124
+ 'default'
125
+ )
121
126
  }
122
127
 
123
128
  /**
@@ -57,7 +57,7 @@ export class EventManager {
57
57
  eventBusName,
58
58
  })
59
59
 
60
- createCfnOutput(`${id}-eventBusName`, scope, `${props.eventBusName}-${scope.props.stage}`)
60
+ createCfnOutput(`${id}-eventBusName`, scope, eventBusName)
61
61
  createCfnOutput(`${id}-eventBusArn`, scope, eventBus.eventBusArn)
62
62
 
63
63
  return eventBus
@@ -130,13 +130,6 @@ export class LambdaManager {
130
130
  code,
131
131
  deadLetterQueue,
132
132
  environment: {
133
- LAST_MODIFIED_TS: props.excludeLastModifiedTimestamp
134
- ? ''
135
- : scope.ssmManager.readStringParameter(
136
- `${id}-sm-ts`,
137
- scope,
138
- `${SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}`
139
- ),
140
133
  LOG_LEVEL: props.logLevel,
141
134
  REGION: scope.props.region,
142
135
  STAGE: scope.props.stage,
@@ -291,13 +284,6 @@ export class LambdaManager {
291
284
  code,
292
285
  deadLetterQueue,
293
286
  environment: {
294
- LAST_MODIFIED_TS: props.excludeLastModifiedTimestamp
295
- ? ''
296
- : scope.ssmManager.readStringParameter(
297
- `${id}-sm-ts`,
298
- scope,
299
- `${SsmManager.SECRETS_MODIFIED_TIMESTAMP_PARAM}`
300
- ),
301
287
  LOG_LEVEL: props.logLevel,
302
288
  REGION: scope.props.region,
303
289
  STAGE: scope.props.stage,