From 229bc146419ea3a25b52791f7a33e1497bc4ba6b Mon Sep 17 00:00:00 2001 From: David Stone Date: Thu, 16 Oct 2025 14:56:34 +0100 Subject: [PATCH 1/3] Add ordnanceSurveyApiKey envar and config --- src/config/index.ts | 11 ++++++++++- src/server/index.ts | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/config/index.ts b/src/config/index.ts index 554f19852..22e90429f 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -287,11 +287,20 @@ export const config = convict({ default: '', env: 'GOOGLE_ANALYTICS_TRACKING_ID' }, + saveAndExitExpiryDays: { format: Number, default: 28, env: 'SAVE_AND_EXIT_EXPIRY_IN_DAYS' - } + }, + + ordnanceSurveyApiKey: { + doc: 'The ordnance survey api key use by the postcode lookup plugin', + format: String, + nullable: true, + default: undefined, + env: 'ORDNANCE_SURVEY_API_KEY' + } as SchemaObj }) config.validate({ allowed: 'strict' }) diff --git a/src/server/index.ts b/src/server/index.ts index e6ec15b07..b4006c0cb 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -165,7 +165,8 @@ export const configureEnginePlugin = async ({ }, controllers: { SummaryPageWithConfirmationEmailController - } + }, + ordnanceSurveyApiKey: config.get('ordnanceSurveyApiKey') } } const routeOptions = { From 0f9fddb22bd3d0e103d6bd9a247a73b4201913b3 Mon Sep 17 00:00:00 2001 From: David Stone Date: Mon, 20 Oct 2025 13:19:03 +0100 Subject: [PATCH 2/3] Bump @defra/forms-engine-plugin to v4.0.1 --- package-lock.json | 16 ++++++++-------- package.json | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index b15183baa..468f1c0c3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "license": "SEE LICENSE IN LICENSE", "dependencies": { "@aws-sdk/client-sns": "^3.864.0", - "@defra/forms-engine-plugin": "^3.0.9", + "@defra/forms-engine-plugin": "^4.0.1", "@defra/forms-model": "^3.0.559", "@defra/hapi-tracing": "^1.26.0", "@elastic/ecs-pino-format": "^1.5.0", @@ -2904,13 +2904,13 @@ } }, "node_modules/@defra/forms-engine-plugin": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/@defra/forms-engine-plugin/-/forms-engine-plugin-3.0.9.tgz", - "integrity": "sha512-RRAycdYqBwjoPqDwawIEzSab2QZjtl8wtvQPvurKGDRD2ZMbAZg44LKd3X9RKRW5eztdLs+deGgJkBPVdSVhdw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@defra/forms-engine-plugin/-/forms-engine-plugin-4.0.1.tgz", + "integrity": "sha512-DK0NMqqXiE8Vj4g6hAPkAQ0VFZelaiR980PF8jbhhz1usFgejJH30UalItmtql429EOzNrtgQgWcFcWPT/o8Wg==", "hasInstallScript": true, "license": "SEE LICENSE IN LICENSE", "dependencies": { - "@defra/forms-model": "^3.0.559", + "@defra/forms-model": "^3.0.560", "@defra/hapi-tracing": "^1.26.0", "@elastic/ecs-pino-format": "^1.5.0", "@hapi/boom": "^10.0.1", @@ -2973,9 +2973,9 @@ } }, "node_modules/@defra/forms-model": { - "version": "3.0.559", - "resolved": "https://registry.npmjs.org/@defra/forms-model/-/forms-model-3.0.559.tgz", - "integrity": "sha512-dSMrTnhUXnapflHKdeQLMGDwK2QlFhp/08XwzLNHzLHmgx7pqHAgelzVeRsyHtzYDu7B7tF4r5cyR+SxI4UmXw==", + "version": "3.0.563", + "resolved": "https://registry.npmjs.org/@defra/forms-model/-/forms-model-3.0.563.tgz", + "integrity": "sha512-g2L+EKbToZXPj4XfraaAlP6v+Gd1j+8r1ZUiF7Wn4zljfzwHZUcW4sT7wHKDQhXwW2PLvZdhegK0rzEMgIST+w==", "license": "OGL-UK-3.0", "dependencies": { "@joi/date": "^2.1.1", diff --git a/package.json b/package.json index de0f07a43..e916fed4b 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "license": "SEE LICENSE IN LICENSE", "dependencies": { "@aws-sdk/client-sns": "^3.864.0", - "@defra/forms-engine-plugin": "^3.0.9", + "@defra/forms-engine-plugin": "^4.0.1", "@defra/forms-model": "^3.0.559", "@defra/hapi-tracing": "^1.26.0", "@elastic/ecs-pino-format": "^1.5.0", From 0c1634cc800fd98ad1670cd03f384d2387b57862 Mon Sep 17 00:00:00 2001 From: David Stone Date: Mon, 20 Oct 2025 13:58:45 +0100 Subject: [PATCH 3/3] Fix typo --- src/config/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/index.ts b/src/config/index.ts index 22e90429f..2fb2ae18b 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -295,7 +295,7 @@ export const config = convict({ }, ordnanceSurveyApiKey: { - doc: 'The ordnance survey api key use by the postcode lookup plugin', + doc: 'The ordnance survey api key used by the postcode lookup plugin', format: String, nullable: true, default: undefined,