Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Release v7.0.3
  • Loading branch information
gsingh04 committed May 8, 2025
commit 0a227bfbcd73dd9441c664de7ee53bceca1d292e
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [7.0.3] - 2025-05-10

### Fixed

- `SOLUTION_VERSION` environment variable in metrics lambda construct

## [7.0.2] - 2025-04-09

### Security
Expand Down
757 changes: 702 additions & 55 deletions NOTICE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.0.2
7.0.3
2 changes: 1 addition & 1 deletion source/constructs/cdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"app": "npx ts-node --prefer-ts-exts bin/constructs.ts",
"context": {
"solutionId": "SO0023",
"solutionVersion": "custom-v7.0.1",
"solutionVersion": "custom-v7.0.3",
"solutionName": "dynamic-image-transformation-for-amazon-cloudfront"
}
}
4 changes: 2 additions & 2 deletions source/constructs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/constructs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "constructs",
"version": "7.0.2",
"version": "7.0.3",
"description": "Dynamic Image Transformation for Amazon CloudFront Constructs",
"license": "Apache-2.0",
"author": {
Expand Down
4 changes: 2 additions & 2 deletions source/custom-resource/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/custom-resource/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "custom-resource",
"version": "7.0.2",
"version": "7.0.3",
"private": true,
"description": "Dynamic Image Transformation for Amazon CloudFront custom resource",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions source/demo-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/demo-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "demo-ui",
"version": "7.0.2",
"version": "7.0.3",
"private": true,
"description": "Dynamic Image Transformation for Amazon CloudFront demo ui",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions source/image-handler/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/image-handler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "image-handler",
"version": "7.0.2",
"version": "7.0.3",
"private": true,
"description": "A Lambda function for performing on-demand image edits and manipulations.",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions source/metrics-utils/lib/solutions-metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class SolutionsMetrics extends Construct {

constructor(scope: Construct, id: string, props: SolutionsMetricProps) {
super(scope, id);

const { VERSION } = process.env;
this.metricsLambdaFunction = new NodejsFunction(this, "MetricsLambda", {
description: "Metrics util",
entry: path.join(__dirname, "../lambda/index.ts"),
Expand All @@ -44,7 +44,7 @@ export class SolutionsMetrics extends Construct {
QUERY_PREFIX: `${Aws.STACK_NAME}-`,
SOLUTION_ID: scope.node.tryGetContext("solutionId"),
SOLUTION_NAME: scope.node.tryGetContext("solutionName"),
SOLUTION_VERSION: scope.node.tryGetContext("solutionVersion"),
SOLUTION_VERSION: VERSION ?? scope.node.tryGetContext("solutionVersion"),
UUID: props.uuid ?? "",
EXECUTION_DAY: props.executionDay ? props.executionDay : ExecutionDay.MONDAY,
},
Expand Down
4 changes: 2 additions & 2 deletions source/metrics-utils/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions source/metrics-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "metrics-utils",
"version": "7.0.1",
"version": "7.0.3",
"main": "index.ts",
"description": "A construct for providing additional anonymous metrics.",
"license": "Apache-2.0",
"scripts": {
"build": "tsc",
"watch": "tsc -w",
"test": "jest --coverage"
"test": "jest --coverage",
"bump-version": "npm version $(cat ../../VERSION.txt) --allow-same-version"
},
"devDependencies": {
"@types/jest": "^29.5.12",
Expand Down
19 changes: 19 additions & 0 deletions source/metrics-utils/test/lib/solutions-metrics.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,25 @@ test("Test that identifier with invalid values throws an error", () => {
}).toThrow();
});

test("Test correct version identifier on lambda environment variables", () => {
// arrange
process.env["VERSION"] = "my-version";
const stack = new cdk.Stack();

// act
new SolutionsMetrics(stack, "test-version", {});
const template = Template.fromStack(stack);

// assert
template.hasResourceProperties("AWS::Lambda::Function", {
Environment: {
Variables: {
SOLUTION_VERSION: process.env["VERSION"],
},
},
});
});

function assertPolicyStatementContains(template: Template, pattern: any[]) {
template.hasResourceProperties("AWS::IAM::Policy", {
PolicyDocument: {
Expand Down
4 changes: 2 additions & 2 deletions source/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions source/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "source",
"version": "7.0.2",
"version": "7.0.3",
"private": true,
"description": "ESLint and prettier dependencies to be used within the solution",
"license": "Apache-2.0",
Expand All @@ -17,7 +17,7 @@
"install:metrics-utils": "cd ./metrics-utils && npm ci",
"install:dependencies": "npm run install:metrics-utils && npm run install:custom-resource && npm run install:image-handler && npm run install:demo-ui",
"bump-version": "npm version $(cat ../VERSION.txt) --allow-same-version && npm run bump-child-version",
"bump-child-version": " npm --prefix ./image-handler run bump-version && npm --prefix ./custom-resource run bump-version && npm --prefix ./constructs run bump-version && npm --prefix ./solution-utils run bump-version && npm --prefix ./demo-ui run bump-version"
"bump-child-version": " npm --prefix ./image-handler run bump-version && npm --prefix ./custom-resource run bump-version && npm --prefix ./constructs run bump-version && npm --prefix ./solution-utils run bump-version && npm --prefix ./demo-ui run bump-version && npm --prefix ./metrics-utils run bump-version"
},
"devDependencies": {
"@types/node": "^20.10.4",
Expand Down
4 changes: 2 additions & 2 deletions source/solution-utils/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/solution-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "solution-utils",
"version": "7.0.2",
"version": "7.0.3",
"private": true,
"description": "Utilities to be used within this solution",
"license": "Apache-2.0",
Expand Down