From 8dbb47816c3bf0423fdce6318c016bbbdbc56f9a Mon Sep 17 00:00:00 2001 From: piotrmaliga-git Date: Mon, 6 Apr 2026 23:08:24 +0200 Subject: [PATCH 1/4] fix(scripts): update production start script and build command for consistency --- phishing-email-analyzer/frontend/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phishing-email-analyzer/frontend/package.json b/phishing-email-analyzer/frontend/package.json index 76dfd23..d4e62fa 100644 --- a/phishing-email-analyzer/frontend/package.json +++ b/phishing-email-analyzer/frontend/package.json @@ -5,8 +5,8 @@ "ng": "ng", "start": "ng serve --configuration=en", "start:pl": "ng serve --configuration=pl", - "start:i18n": "npm run build:i18n && npm run serve:ssr:app", - "build:i18n": "ng build --configuration=i18n", + "start:prod": "npm run build:prod && npm run serve:ssr:app", + "build:prod": "ng build --configuration=production", "watch": "ng build --watch --configuration development", "extract-i18n": "ng extract-i18n --format xlf2 --output-path src/locale --out-file messages.xlf", "test": "ng test", From b9628078bc9645ce5a174fa30abbc377603ed2e8 Mon Sep 17 00:00:00 2001 From: piotrmaliga-git Date: Mon, 6 Apr 2026 23:08:30 +0200 Subject: [PATCH 2/4] fix(ci): update build command to use production build for consistency --- .github/workflows/merge-frontend-ci.yml | 2 +- .github/workflows/pr-frontend-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/merge-frontend-ci.yml b/.github/workflows/merge-frontend-ci.yml index 542d722..f3540ae 100644 --- a/.github/workflows/merge-frontend-ci.yml +++ b/.github/workflows/merge-frontend-ci.yml @@ -30,7 +30,7 @@ jobs: run: npm ci - name: Build - run: npm run build:i18n + run: npm run build:prod unit-tests: name: Unit tests diff --git a/.github/workflows/pr-frontend-ci.yml b/.github/workflows/pr-frontend-ci.yml index ae216e8..28e18a2 100644 --- a/.github/workflows/pr-frontend-ci.yml +++ b/.github/workflows/pr-frontend-ci.yml @@ -27,7 +27,7 @@ jobs: run: npm ci - name: Build - run: npm run build:i18n + run: npm run build:prod lint-format: name: Lint & format From 08fab7cfa23f10fb3d4680e40d60649275cba753 Mon Sep 17 00:00:00 2001 From: piotrmaliga-git Date: Mon, 6 Apr 2026 23:08:38 +0200 Subject: [PATCH 3/4] fix(i18n): enable localization for production build and clean up i18n configuration --- phishing-email-analyzer/frontend/angular.json | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/phishing-email-analyzer/frontend/angular.json b/phishing-email-analyzer/frontend/angular.json index 92c339b..af9e718 100644 --- a/phishing-email-analyzer/frontend/angular.json +++ b/phishing-email-analyzer/frontend/angular.json @@ -62,7 +62,8 @@ "maximumError": "8kB" } ], - "outputHashing": "all" + "outputHashing": "all", + "localize": true }, "development": { "optimization": false, @@ -107,22 +108,6 @@ "pl-dev": { "localize": ["pl"] }, - "i18n": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "550kB", - "maximumError": "1MB" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "4kB", - "maximumError": "8kB" - } - ], - "outputHashing": "all", - "localize": true - }, "i18n-dev": { "localize": true } From 4c7629d8860945a660094e0071ca8db6ff2bddf4 Mon Sep 17 00:00:00 2001 From: piotrmaliga-git Date: Mon, 6 Apr 2026 23:08:43 +0200 Subject: [PATCH 4/4] fix(pre-push): update build command to use production build for pre-push checks --- .husky/pre-push | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/pre-push b/.husky/pre-push index 8f0e994..bc86907 100644 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -4,6 +4,6 @@ set -e echo "Running pre-push checks for frontend..." -npm --prefix phishing-email-analyzer/frontend run build:i18n +npm --prefix phishing-email-analyzer/frontend run build:prod npm --prefix phishing-email-analyzer/frontend run format:check npm --prefix phishing-email-analyzer/frontend run lint \ No newline at end of file