diff --git a/package-lock.json b/package-lock.json index 6f903eded..ec28b4194 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "license": "SEE LICENSE IN LICENSE", "dependencies": { "@aws-sdk/client-sns": "^3.911.0", - "@defra/forms-engine-plugin": "^3.0.9", + "@defra/forms-engine-plugin": "^4.0.1", "@defra/forms-model": "^3.0.563", "@defra/hapi-tracing": "^1.28.0", "@elastic/ecs-pino-format": "^1.5.0", @@ -2914,13 +2914,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", diff --git a/package.json b/package.json index 1ff6c34f8..3afd0bdfd 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "license": "SEE LICENSE IN LICENSE", "dependencies": { "@aws-sdk/client-sns": "^3.911.0", - "@defra/forms-engine-plugin": "^3.0.9", + "@defra/forms-engine-plugin": "^4.0.1", "@defra/forms-model": "^3.0.563", "@defra/hapi-tracing": "^1.28.0", "@elastic/ecs-pino-format": "^1.5.0", diff --git a/src/config/index.ts b/src/config/index.ts index 554f19852..2fb2ae18b 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 used 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 = {