Skip to content

Commit 9edc7cc

Browse files
Merge branch 'main' into ADE-30-manual-steps
2 parents 3697775 + 6706845 commit 9edc7cc

File tree

11 files changed

+225
-83
lines changed

11 files changed

+225
-83
lines changed

.husky/pre-commit

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,18 @@
1-
cd frontend && npm run lint
1+
#!/bin/sh
2+
project_root=$(pwd)
3+
cd $project_root
4+
sh ./lizard.sh
5+
6+
# Only run frontend lint if the directory exists
7+
if [ -d "frontend" ]; then
8+
cd frontend && npm run lint
9+
fi
10+
11+
cd $project_root
12+
13+
# Add backend linting
14+
if [ -d "backend" ]; then
15+
cd backend && npm run lint
16+
fi
17+
18+
exit 0

.husky/pre-push

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,53 @@
11
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
32

4-
cd frontend && npm run lint && npm run test:ci
3+
# Get the range of commits being pushed
4+
# For the remote branch that doesn't exist yet, use the empty tree object
5+
RANGE="$(git rev-parse --verify HEAD)"
6+
7+
echo "Checking commit range: $RANGE"
8+
9+
# Check if any frontend files were modified in the commits being pushed
10+
FRONTEND_CHANGES=$(git diff --name-only $RANGE | grep "^frontend/" || true)
11+
12+
# Only run frontend tests if frontend files were modified
13+
if [ -n "$FRONTEND_CHANGES" ]; then
14+
echo "Frontend changes detected. Running frontend tests..."
15+
16+
# Navigate to frontend directory
17+
cd frontend || exit 1
18+
19+
. "$(dirname -- "$0")/_/husky.sh"
20+
21+
cd frontend && npm run lint && npm run test:ci
22+
23+
# Capture the exit code
24+
TEST_EXIT_CODE=$?
25+
26+
# Return to the original directory
27+
cd ..
28+
29+
# If tests failed, prevent the push
30+
if [ $TEST_EXIT_CODE -ne 0 ]; then
31+
echo "Frontend tests failed. Push aborted."
32+
exit 1
33+
fi
34+
35+
echo "Frontend tests passed."
36+
else
37+
echo "No frontend changes detected. Skipping frontend tests."
38+
fi
39+
40+
# Check if any backend files were modified in the commits being pushed
41+
BACKEND_CHANGES=$(git diff --name-only $RANGE | grep "^backend/" || true)
42+
43+
if [ -n "$BACKEND_CHANGES" ]; then
44+
echo "Backend changes detected. Running backend lint..."
45+
46+
. "$(dirname -- "$0")/_/husky.sh"
47+
cd backend && npm run lint
48+
else
49+
echo "No backend changes detected. Skipping backend tests."
50+
fi
51+
52+
# Continue with the push
53+
exit 0

backend/package-lock.json

Lines changed: 80 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"rxjs": "^7.8.1",
5252
"source-map-support": "^0.5.21",
5353
"web-vitals": "^2.1.4",
54-
"aws-cdk-lib": "2.139.0",
54+
"aws-cdk-lib": "2.184.1",
5555
"@nestjs/swagger": "^7.1.13",
5656
"swagger-ui-express": "^5.0.0",
5757
"passport": "^0.7.0",
@@ -73,7 +73,7 @@
7373
"@typescript-eslint/parser": "^7.9.0",
7474
"@vitest/coverage-c8": "^0.33.0",
7575
"aws-cdk": "2.139.0",
76-
"aws-cdk-lib": "^2.139.0",
76+
"aws-cdk-lib": "^2.184.1",
7777
"dotenv-cli": "^8.0.0",
7878
"eslint": "^8.57.0",
7979
"eslint-config-prettier": "^9.0.0",
@@ -91,6 +91,6 @@
9191
"vitest": "^0.33.0"
9292
},
9393
"peerDependencies": {
94-
"aws-cdk-lib": "2.139.0"
94+
"aws-cdk-lib": "2.184.1"
9595
}
9696
}

frontend/src/common/utils/auth-errors.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import { AuthError } from '../models/auth';
55
*/
66
export const AUTH_ERROR_MESSAGES: Record<string, string> = {
77
// Sign In errors
8-
'UserNotFoundException': 'The email address or password you entered is incorrect.',
9-
'NotAuthorizedException': 'The email address or password you entered is incorrect.',
8+
'UserNotFoundException': 'Incorrect email or password.',
9+
'NotAuthorizedException': 'Incorrect email or password.',
1010
'UserNotConfirmedException': 'Please check your email to verify your account.',
1111
'PasswordResetRequiredException': 'You need to reset your password. Please check your email.',
1212

1313
// Sign Up errors
14-
'UsernameExistsException': 'This email address is already associated with an account. Please sign in or reset your password.',
14+
'UsernameExistsException': 'This email is already linked to an account. Please sign in or reset your password.',
1515
'InvalidPasswordException': 'Password does not meet the requirements. Please use a stronger password.',
1616
'InvalidParameterException': 'Please check your input and try again.',
1717

frontend/src/common/utils/i18n/resources/en/auth.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"numeric": "Must contain only numbers",
7171
"exact-length": "Must be exactly {{length}} characters",
7272
"passwords-match": "Passwords must match",
73-
"email": "Please enter a valid email address",
73+
"email": "Please provide a valid email address (e.g., [email protected]).",
7474
"required": "This field is required",
7575
"min-length": "Must be at least {{length}} characters",
7676
"max-length": "Must be at most {{length}} characters",

frontend/src/pages/Auth/SignUp/SignUpPage.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
height: 100%;
55
display: flex;
66
flex-direction: column;
7-
justify-content: center;
7+
padding-top: 1rem;
88
}
99

1010
.ls-signup-page__form {

0 commit comments

Comments
 (0)