@gradientedge/cdk-utils 8.125.0 → 8.126.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.
@@ -6,12 +6,12 @@ case `uname` in
6
6
  esac
7
7
 
8
8
  if [ -z "$NODE_PATH" ]; then
9
- export NODE_PATH="/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/src/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.1/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/node_modules"
9
+ export NODE_PATH="/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.4/node_modules/rimraf/dist/esm/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.4/node_modules/rimraf/dist/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.4/node_modules/rimraf/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.4/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/node_modules"
10
10
  else
11
- export NODE_PATH="/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/src/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/cjs/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.1/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/node_modules:$NODE_PATH"
11
+ export NODE_PATH="/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.4/node_modules/rimraf/dist/esm/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.4/node_modules/rimraf/dist/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.4/node_modules/rimraf/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/rimraf@5.0.4/node_modules:/home/runner/work/cdk-utils/cdk-utils/node_modules/.pnpm/node_modules:$NODE_PATH"
12
12
  fi
13
13
  if [ -x "$basedir/node" ]; then
14
- exec "$basedir/node" "$basedir/../rimraf/dist/cjs/src/bin.js" "$@"
14
+ exec "$basedir/node" "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
15
15
  else
16
- exec node "$basedir/../rimraf/dist/cjs/src/bin.js" "$@"
16
+ exec node "$basedir/../rimraf/dist/esm/bin.mjs" "$@"
17
17
  fi
@@ -21,6 +21,6 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "mkdirp": "^3.0.1",
24
- "rimraf": "^5.0.1"
24
+ "rimraf": "^5.0.4"
25
25
  }
26
26
  }
@@ -182,7 +182,7 @@ class CloudWatchManager {
182
182
  const metricProps = props.metricProps;
183
183
  return this.createWidget(id, scope, {
184
184
  ...props,
185
- metricProps: lodash_1.default.map(metricProps, { ...lodash_1.default, distributionId }),
185
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, distributionId })),
186
186
  });
187
187
  }
188
188
  /**
@@ -198,7 +198,7 @@ class CloudWatchManager {
198
198
  const metricProps = props.metricProps;
199
199
  return this.createWidget(id, scope, {
200
200
  ...props,
201
- metricProps: lodash_1.default.map(metricProps, { ...lodash_1.default, stateMachineArn }),
201
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, stateMachineArn })),
202
202
  });
203
203
  }
204
204
  /**
@@ -215,7 +215,7 @@ class CloudWatchManager {
215
215
  const metricProps = props.metricProps;
216
216
  return this.createWidget(id, scope, {
217
217
  ...props,
218
- metricProps: lodash_1.default.map(metricProps, { ...lodash_1.default, eventBusName, ruleName }),
218
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, eventBusName, ruleName })),
219
219
  });
220
220
  }
221
221
  /**
@@ -231,7 +231,7 @@ class CloudWatchManager {
231
231
  const metricProps = props.metricProps;
232
232
  return this.createWidget(id, scope, {
233
233
  ...props,
234
- metricProps: lodash_1.default.map(metricProps, { ...lodash_1.default, apiName }),
234
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, apiName })),
235
235
  });
236
236
  }
237
237
  /**
@@ -247,7 +247,7 @@ class CloudWatchManager {
247
247
  const metricProps = props.metricProps;
248
248
  return this.createWidget(id, scope, {
249
249
  ...props,
250
- metricProps: lodash_1.default.map(metricProps, { ...lodash_1.default, functionName }),
250
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, functionName })),
251
251
  });
252
252
  }
253
253
  /**
@@ -263,7 +263,7 @@ class CloudWatchManager {
263
263
  const metricProps = props.metricProps;
264
264
  return this.createWidget(id, scope, {
265
265
  ...props,
266
- metricProps: lodash_1.default.map(metricProps, { ...lodash_1.default, service }),
266
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, service })),
267
267
  });
268
268
  }
269
269
  /**
@@ -279,7 +279,7 @@ class CloudWatchManager {
279
279
  const metricProps = props.metricProps;
280
280
  return this.createWidget(id, scope, {
281
281
  ...props,
282
- metricProps: lodash_1.default.map(metricProps, { ...lodash_1.default, clusterName }),
282
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, clusterName })),
283
283
  });
284
284
  }
285
285
  /**
@@ -296,7 +296,7 @@ class CloudWatchManager {
296
296
  const metricProps = props.metricProps;
297
297
  return this.createWidget(id, scope, {
298
298
  ...props,
299
- metricProps: lodash_1.default.map(metricProps, { ...lodash_1.default, clusterName, serviceName }),
299
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, clusterName, serviceName })),
300
300
  });
301
301
  }
302
302
  /**
@@ -312,7 +312,7 @@ class CloudWatchManager {
312
312
  const metricProps = props.metricProps;
313
313
  return this.createWidget(id, scope, {
314
314
  ...props,
315
- metricProps: lodash_1.default.map(metricProps, { ...lodash_1.default, loadBalancer }),
315
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, loadBalancer })),
316
316
  });
317
317
  }
318
318
  /**
@@ -328,7 +328,7 @@ class CloudWatchManager {
328
328
  const metricProps = props.metricProps;
329
329
  return this.createWidget(id, scope, {
330
330
  ...props,
331
- metricProps: lodash_1.default.map(metricProps, { ...lodash_1.default, cacheClusterId }),
331
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, cacheClusterId })),
332
332
  });
333
333
  }
334
334
  /**
@@ -1,7 +1,7 @@
1
1
  import { ISecurityGroup, IVpc, SubnetSelection } from 'aws-cdk-lib/aws-ec2';
2
2
  import { IAccessPoint } from 'aws-cdk-lib/aws-efs';
3
3
  import { CfnRole, Role } from 'aws-cdk-lib/aws-iam';
4
- import { Alias, AssetCode, DockerImageCode, DockerImageFunction, Function, ILayerVersion, IVersion, LayerVersion } from 'aws-cdk-lib/aws-lambda';
4
+ import { Alias, Architecture, AssetCode, DockerImageCode, DockerImageFunction, Function, ILayerVersion, IVersion, LayerVersion } from 'aws-cdk-lib/aws-lambda';
5
5
  import { CommonConstruct } from '../../common';
6
6
  import { LambdaAliasProps, LambdaEdgeProps, LambdaProps } from './types';
7
7
  /**
@@ -26,8 +26,9 @@ export declare class LambdaManager {
26
26
  * @param id scoped id of the resource
27
27
  * @param scope scope in which this resource is defined
28
28
  * @param code
29
+ * @param architectures
29
30
  */
30
- createLambdaLayer(id: string, scope: CommonConstruct, code: AssetCode): LayerVersion;
31
+ createLambdaLayer(id: string, scope: CommonConstruct, code: AssetCode, architectures?: Architecture[]): LayerVersion;
31
32
  /**
32
33
  * @summary Method to create a lambda function (nodejs)
33
34
  * @param id scoped id of the resource
@@ -35,10 +35,12 @@ class LambdaManager {
35
35
  * @param id scoped id of the resource
36
36
  * @param scope scope in which this resource is defined
37
37
  * @param code
38
+ * @param architectures
38
39
  */
39
- createLambdaLayer(id, scope, code) {
40
+ createLambdaLayer(id, scope, code, architectures) {
40
41
  const lambdaLayer = new aws_lambda_1.LayerVersion(scope, `${id}`, {
41
42
  code: code,
43
+ compatibleArchitectures: architectures ?? [aws_lambda_1.Architecture.ARM_64],
42
44
  compatibleRuntimes: [scope.props.nodejsRuntime ?? common_1.CommonStack.NODEJS_RUNTIME],
43
45
  description: `${id}`,
44
46
  layerVersionName: `${id}-${scope.props.stage}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils",
3
- "version": "8.125.0",
3
+ "version": "8.126.0",
4
4
  "description": "Utilities for AWS CDK provisioning",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -46,15 +46,15 @@
46
46
  }
47
47
  },
48
48
  "dependencies": {
49
- "@aws-sdk/client-secrets-manager": "^3.414.0",
50
- "@aws-sdk/credential-providers": "^3.414.0",
51
- "@aws-sdk/types": "^3.413.0",
52
- "@cdktf/provider-azurerm": "^10.0.3",
53
- "@types/lodash": "^4.14.198",
54
- "@types/node": "^20.6.2",
49
+ "@aws-sdk/client-secrets-manager": "^3.418.0",
50
+ "@aws-sdk/credential-providers": "^3.418.0",
51
+ "@aws-sdk/types": "^3.418.0",
52
+ "@cdktf/provider-azurerm": "^10.0.4",
53
+ "@types/lodash": "^4.14.199",
54
+ "@types/node": "^20.7.0",
55
55
  "@types/uuid": "^9.0.4",
56
56
  "app-root-path": "^3.1.0",
57
- "aws-cdk-lib": "^2.96.2",
57
+ "aws-cdk-lib": "^2.97.1",
58
58
  "cdktf": "^0.18.0",
59
59
  "constructs": "^10.2.70",
60
60
  "lodash": "^4.17.21",
@@ -65,22 +65,22 @@
65
65
  "uuid": "^9.0.1"
66
66
  },
67
67
  "devDependencies": {
68
- "@babel/core": "^7.22.20",
68
+ "@babel/core": "^7.23.0",
69
69
  "@babel/eslint-parser": "^7.22.15",
70
70
  "@babel/plugin-proposal-class-properties": "^7.18.6",
71
71
  "@types/jest": "^29.5.5",
72
- "@typescript-eslint/eslint-plugin": "^6.7.0",
73
- "@typescript-eslint/parser": "^6.7.0",
74
- "aws-cdk": "^2.96.2",
72
+ "@typescript-eslint/eslint-plugin": "^6.7.3",
73
+ "@typescript-eslint/parser": "^6.7.3",
74
+ "aws-cdk": "^2.97.1",
75
75
  "better-docs": "^2.7.2",
76
76
  "codecov": "^3.8.3",
77
77
  "commitizen": "^4.3.0",
78
78
  "docdash": "^2.0.2",
79
79
  "dotenv": "^16.3.1",
80
- "eslint": "^8.49.0",
80
+ "eslint": "^8.50.0",
81
81
  "eslint-config-prettier": "^9.0.0",
82
82
  "eslint-plugin-import": "^2.28.1",
83
- "eslint-plugin-jsdoc": "^46.8.1",
83
+ "eslint-plugin-jsdoc": "^46.8.2",
84
84
  "husky": "^8.0.3",
85
85
  "jest": "^29.7.0",
86
86
  "jest-extended": "^4.0.1",
@@ -92,8 +92,8 @@
92
92
  "jsdoc-to-markdown": "^8.0.0",
93
93
  "prettier": "^3.0.3",
94
94
  "prettier-plugin-organize-imports": "^3.2.3",
95
- "rimraf": "^5.0.1",
96
- "semantic-release": "^22.0.0",
95
+ "rimraf": "^5.0.4",
96
+ "semantic-release": "^22.0.5",
97
97
  "taffydb": "^2.7.3",
98
98
  "ts-jest": "^29.1.1",
99
99
  "ts-node": "^10.9.1",
@@ -180,7 +180,7 @@ export class CloudWatchManager {
180
180
  const metricProps: any[] = props.metricProps
181
181
  return this.createWidget(id, scope, {
182
182
  ...props,
183
- metricProps: _.map(metricProps, { ..._, distributionId }),
183
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, distributionId })),
184
184
  })
185
185
  }
186
186
 
@@ -196,7 +196,7 @@ export class CloudWatchManager {
196
196
  const metricProps: any[] = props.metricProps
197
197
  return this.createWidget(id, scope, {
198
198
  ...props,
199
- metricProps: _.map(metricProps, { ..._, stateMachineArn }),
199
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, stateMachineArn })),
200
200
  })
201
201
  }
202
202
 
@@ -213,7 +213,7 @@ export class CloudWatchManager {
213
213
  const metricProps: any[] = props.metricProps
214
214
  return this.createWidget(id, scope, {
215
215
  ...props,
216
- metricProps: _.map(metricProps, { ..._, eventBusName, ruleName }),
216
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, eventBusName, ruleName })),
217
217
  })
218
218
  }
219
219
 
@@ -229,7 +229,7 @@ export class CloudWatchManager {
229
229
  const metricProps: any[] = props.metricProps
230
230
  return this.createWidget(id, scope, {
231
231
  ...props,
232
- metricProps: _.map(metricProps, { ..._, apiName }),
232
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, apiName })),
233
233
  })
234
234
  }
235
235
 
@@ -245,7 +245,7 @@ export class CloudWatchManager {
245
245
  const metricProps: any[] = props.metricProps
246
246
  return this.createWidget(id, scope, {
247
247
  ...props,
248
- metricProps: _.map(metricProps, { ..._, functionName }),
248
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, functionName })),
249
249
  })
250
250
  }
251
251
 
@@ -261,7 +261,7 @@ export class CloudWatchManager {
261
261
  const metricProps: any[] = props.metricProps
262
262
  return this.createWidget(id, scope, {
263
263
  ...props,
264
- metricProps: _.map(metricProps, { ..._, service }),
264
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, service })),
265
265
  })
266
266
  }
267
267
 
@@ -277,7 +277,7 @@ export class CloudWatchManager {
277
277
  const metricProps: any[] = props.metricProps
278
278
  return this.createWidget(id, scope, {
279
279
  ...props,
280
- metricProps: _.map(metricProps, { ..._, clusterName }),
280
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, clusterName })),
281
281
  })
282
282
  }
283
283
 
@@ -300,7 +300,7 @@ export class CloudWatchManager {
300
300
  const metricProps: any[] = props.metricProps
301
301
  return this.createWidget(id, scope, {
302
302
  ...props,
303
- metricProps: _.map(metricProps, { ..._, clusterName, serviceName }),
303
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, clusterName, serviceName })),
304
304
  })
305
305
  }
306
306
 
@@ -316,7 +316,7 @@ export class CloudWatchManager {
316
316
  const metricProps: any[] = props.metricProps
317
317
  return this.createWidget(id, scope, {
318
318
  ...props,
319
- metricProps: _.map(metricProps, { ..._, loadBalancer }),
319
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, loadBalancer })),
320
320
  })
321
321
  }
322
322
 
@@ -332,7 +332,7 @@ export class CloudWatchManager {
332
332
  const metricProps: any[] = props.metricProps
333
333
  return this.createWidget(id, scope, {
334
334
  ...props,
335
- metricProps: _.map(metricProps, { ..._, cacheClusterId }),
335
+ metricProps: metricProps.map(metricProp => ({ ...metricProp, cacheClusterId })),
336
336
  })
337
337
  }
338
338
 
@@ -44,10 +44,12 @@ export class LambdaManager {
44
44
  * @param id scoped id of the resource
45
45
  * @param scope scope in which this resource is defined
46
46
  * @param code
47
+ * @param architectures
47
48
  */
48
- public createLambdaLayer(id: string, scope: CommonConstruct, code: AssetCode) {
49
+ public createLambdaLayer(id: string, scope: CommonConstruct, code: AssetCode, architectures?: Architecture[]) {
49
50
  const lambdaLayer = new LayerVersion(scope, `${id}`, {
50
51
  code: code,
52
+ compatibleArchitectures: architectures ?? [Architecture.ARM_64],
51
53
  compatibleRuntimes: [scope.props.nodejsRuntime ?? CommonStack.NODEJS_RUNTIME],
52
54
  description: `${id}`,
53
55
  layerVersionName: `${id}-${scope.props.stage}`,