@gradientedge/cdk-utils-aws 2.8.0 → 2.9.1

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.
@@ -98,7 +98,12 @@ export class CommonStack extends Stack {
98
98
  const extraContextProps = JSON.parse(extraContextPropsBuffer.toString('utf-8'));
99
99
  /* set each of the property into the cdk node context */
100
100
  _.keys(extraContextProps).forEach((propKey) => {
101
- this.node.setContext(propKey, extraContextProps[propKey]);
101
+ if (typeof extraContextProps[propKey] === 'object' && !Array.isArray(extraContextProps[propKey])) {
102
+ this.node.setContext(propKey, _.merge(this.node.tryGetContext(propKey), extraContextProps[propKey]));
103
+ }
104
+ else {
105
+ this.node.setContext(propKey, extraContextProps[propKey]);
106
+ }
102
107
  });
103
108
  });
104
109
  }
@@ -134,7 +139,12 @@ export class CommonStack extends Stack {
134
139
  const regionContextProps = JSON.parse(regionContextPropsBuffer.toString('utf-8'));
135
140
  /* set each of the property into the cdk node context */
136
141
  _.keys(regionContextProps).forEach((propKey) => {
137
- this.node.setContext(propKey, regionContextProps[propKey]);
142
+ if (typeof regionContextProps[propKey] === 'object' && !Array.isArray(regionContextProps[propKey])) {
143
+ this.node.setContext(propKey, _.merge(this.node.tryGetContext(propKey), regionContextProps[propKey]));
144
+ }
145
+ else {
146
+ this.node.setContext(propKey, regionContextProps[propKey]);
147
+ }
138
148
  });
139
149
  }
140
150
  /**
@@ -208,7 +218,12 @@ export class CommonStack extends Stack {
208
218
  const stageRegionContextProps = JSON.parse(stageRegionContextPropsBuffer.toString('utf-8'));
209
219
  /* set each of the property into the cdk node context */
210
220
  _.keys(stageRegionContextProps).forEach((propKey) => {
211
- this.node.setContext(propKey, stageRegionContextProps[propKey]);
221
+ if (typeof stageRegionContextProps[propKey] === 'object' && !Array.isArray(stageRegionContextProps[propKey])) {
222
+ this.node.setContext(propKey, _.merge(this.node.tryGetContext(propKey), stageRegionContextProps[propKey]));
223
+ }
224
+ else {
225
+ this.node.setContext(propKey, stageRegionContextProps[propKey]);
226
+ }
212
227
  });
213
228
  }
214
229
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils-aws",
3
- "version": "2.8.0",
3
+ "version": "2.9.1",
4
4
  "description": "AWS CDK utilities for @gradientedge/cdk-utils",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -14,12 +14,12 @@
14
14
  "dist/src/"
15
15
  ],
16
16
  "dependencies": {
17
- "@aws-sdk/client-secrets-manager": "3.1048.0",
18
- "@aws-sdk/credential-providers": "3.1048.0",
17
+ "@aws-sdk/client-secrets-manager": "3.1050.0",
18
+ "@aws-sdk/credential-providers": "3.1050.0",
19
19
  "@aws-sdk/types": "3.973.8",
20
20
  "@types/lodash": "4.17.24",
21
21
  "app-root-path": "3.1.0",
22
- "aws-cdk-lib": "2.254.0",
22
+ "aws-cdk-lib": "2.256.0",
23
23
  "lodash": "4.18.1",
24
24
  "constructs": "10.6.0",
25
25
  "moment": "2.30.1",