Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
d5b561e
Add flat file viewing feature for publications
alexbottenberg Nov 27, 2025
2edb9b3
Fix node-forge security vulnerabilities
alexbottenberg Nov 27, 2025
69c7432
Update helmet middleware tests for PDF embedding support
alexbottenberg Nov 27, 2025
7cdc684
Fix flat file error handling and page title
alexbottenberg Nov 27, 2025
ac77ab1
Update app.test.ts for public pages API routes
alexbottenberg Nov 27, 2025
2eceb3d
Add optional tracking parameter to createFlatFileArtefact helper
alexbottenberg Nov 27, 2025
812a755
Add comprehensive unit tests for hearing lists page controller
alexbottenberg Nov 27, 2025
510543d
Add comprehensive unit tests for flat file download API route
alexbottenberg Nov 27, 2025
0c50098
Remove slow large buffer test that was timing out
alexbottenberg Nov 27, 2025
815012d
Add comprehensive unit tests for publication not found page
alexbottenberg Nov 27, 2025
19ac230
Merge branch 'master' into feature/VIBE-215-view-publication-flat-files
junaidiqbalmoj Nov 28, 2025
22ce1b6
fix bug
junaidiqbalmoj Nov 28, 2025
79edd67
Merge branch 'master' into feature/VIBE-215-view-publication-flat-files
junaidiqbalmoj Nov 28, 2025
39a8f15
fix e2e tests
junaidiqbalmoj Nov 28, 2025
cc44634
fix code review comments
junaidiqbalmoj Nov 28, 2025
702c501
fix tests
junaidiqbalmoj Nov 28, 2025
926986a
Merge branch 'master' into feature/VIBE-215-view-publication-flat-files
junaidiqbalmoj Dec 15, 2025
fa5ebb8
fix build
junaidiqbalmoj Dec 15, 2025
fefea2f
fix end to end test build issue
junaidiqbalmoj Dec 15, 2025
2d4d8ac
fix bug
junaidiqbalmoj Dec 15, 2025
beb367d
fix end to end test
junaidiqbalmoj Dec 15, 2025
82c8c6a
fix end to end test
junaidiqbalmoj Dec 15, 2025
4c37866
fix end to end test
junaidiqbalmoj Dec 15, 2025
7d19d90
fix e2e test
junaidiqbalmoj Dec 15, 2025
f37454b
fix end to end test
junaidiqbalmoj Dec 15, 2025
a78adfb
fix end to end tests
junaidiqbalmoj Dec 15, 2025
550e9c3
Merge branch 'master' into feature/VIBE-215-view-publication-flat-files
junaidiqbalmoj Dec 18, 2025
67dda3d
Merge branch 'master' into feature/VIBE-215-view-publication-flat-files
junaidiqbalmoj Dec 18, 2025
daffe9e
code review comments
junaidiqbalmoj Dec 18, 2025
27af3b7
add more tests
junaidiqbalmoj Dec 18, 2025
0ca136a
Merge branch 'master' into feature/VIBE-215-view-publication-flat-files
junaidiqbalmoj Dec 24, 2025
6772e54
Merge remote-tracking branch 'origin/master' into feature/VIBE-215-vi…
KianKwa Jan 21, 2026
660d4ca
Fixed merging issues
KianKwa Jan 21, 2026
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
3 changes: 2 additions & 1 deletion apps/api/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import path from "node:path";
import { fileURLToPath } from "node:url";
import { healthcheck } from "@hmcts/cloud-native-platform";
import { apiRoutes as locationRoutes } from "@hmcts/location/config";
import { apiRoutes as publicPagesRoutes } from "@hmcts/public-pages/config";
import { createSimpleRouter } from "@hmcts/simple-router";
import compression from "compression";
import cors from "cors";
Expand All @@ -27,7 +28,7 @@ export async function createApp(): Promise<Express> {
app.use(express.json());
app.use(express.urlencoded({ extended: true }));

const routeMounts = [{ path: `${__dirname}/routes` }, locationRoutes];
const routeMounts = [{ path: `${__dirname}/routes` }, locationRoutes, publicPagesRoutes];

app.use(await createSimpleRouter(...routeMounts));

Expand Down
9 changes: 9 additions & 0 deletions apps/web/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ nodejs:
aadIdentityName: cath
ingressHost: cath-web.{{ .Values.global.environment }}.platform.hmcts.net
image: 'hmctspublic.azurecr.io/cath/cath-web:latest'

# Single pod deployment required due to ephemeral filesystem storage
# Files are stored in container storage at storage/temp/uploads/
# Multiple pods would have isolated filesystems causing file access issues
# TODO: Enable autoscaling after Azure Blob Storage implementation (follow-up ticket)
replicas: 1
autoscaling:
enabled: false

environment:
REDIS_HOST: 'cath-{{ .Values.global.environment }}.redis.cache.windows.net'
BASE_URL: 'https://{{ .Values.nodejs.ingressHost }}'
Expand Down
8 changes: 4 additions & 4 deletions apps/web/src/app.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ describe("Web Application", () => {

it("should register public pages routes", async () => {
const { createSimpleRouter } = await import("@hmcts/simple-router");
// Should be called 8 times: location API routes, civil-family-cause-list pages, web pages, auth routes, public pages, verified pages, system-admin pages, admin routes
expect(createSimpleRouter).toHaveBeenCalledTimes(8);
// Should be called 9 times: location API routes, public pages API routes, civil-family-cause-list pages, web pages, auth routes, public pages, verified pages, system-admin pages, admin routes
expect(createSimpleRouter).toHaveBeenCalledTimes(9);
});

it("should register system-admin page routes", async () => {
const { createSimpleRouter } = await import("@hmcts/simple-router");
const calls = vi.mocked(createSimpleRouter).mock.calls;

// Verify system-admin routes were registered (should have 8 total calls)
expect(calls.length).toBeGreaterThanOrEqual(8);
// Verify system-admin routes were registered (should have 9 total calls)
expect(calls.length).toBeGreaterThanOrEqual(9);
});

it("should configure error handlers at the end", async () => {
Expand Down
7 changes: 5 additions & 2 deletions apps/web/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { moduleRoot as civilFamilyCauseListModuleRoot, pageRoutes as civilFamily
import { configurePropertiesVolume, healthcheck, monitoringMiddleware } from "@hmcts/cloud-native-platform";
import { moduleRoot as listTypesCommonModuleRoot } from "@hmcts/list-types-common/config";
import { apiRoutes as locationApiRoutes } from "@hmcts/location/config";
import { moduleRoot as publicPagesModuleRoot, pageRoutes as publicPagesRoutes } from "@hmcts/public-pages/config";
import { apiRoutes as publicPagesApiRoutes, moduleRoot as publicPagesModuleRoot, pageRoutes as publicPagesRoutes } from "@hmcts/public-pages/config";
import { createSimpleRouter } from "@hmcts/simple-router";
import { moduleRoot as systemAdminModuleRoot, pageRoutes as systemAdminPageRoutes } from "@hmcts/system-admin-pages/config";
import { moduleRoot as verifiedPagesModuleRoot, pageRoutes as verifiedPagesRoutes } from "@hmcts/verified-pages/config";
Expand Down Expand Up @@ -95,9 +95,12 @@ export async function createApp(): Promise<Express> {
// Manual route registration for CFT callback (maintains /cft-login/return URL for external CFT IDAM config)
app.get("/cft-login/return", cftCallbackHandler);

// Register API routes for location autocomplete
// Register location autocomplete routes (no prefix - frontend expects /locations)
app.use(await createSimpleRouter(locationApiRoutes));

// Register API routes for public pages (flat file download)
app.use(await createSimpleRouter({ ...publicPagesApiRoutes, prefix: "/api" }));

// Register civil-and-family-daily-cause-list routes first to ensure proper route matching
app.use(await createSimpleRouter(civilFamilyCauseListRoutes));

Expand Down
Loading
Loading