@defra/fcp-sfd-frontend-engine 0.5.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -246,7 +246,6 @@ var businessVatSchema = import_joi6.default.object({
246
246
  // src/schemas/business/business-schemas.js
247
247
  var businessSchemas = {
248
248
  sbi: businessSbiSchema,
249
- address: addressSchema,
250
249
  details: {
251
250
  name: businessNameSchema,
252
251
  address: addressSchema,
package/dist/index.js CHANGED
@@ -208,7 +208,6 @@ var businessVatSchema = Joi6.object({
208
208
  // src/schemas/business/business-schemas.js
209
209
  var businessSchemas = {
210
210
  sbi: businessSbiSchema,
211
- address: addressSchema,
212
211
  details: {
213
212
  name: businessNameSchema,
214
213
  address: addressSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defra/fcp-sfd-frontend-engine",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "Shared frontend engine used by both the internal and external frontend applications.",
5
5
  "main": "./dist/index.cjs",
6
6
  "exports": {
@@ -38,11 +38,11 @@
38
38
  },
39
39
  "homepage": "https://github.com/DEFRA/fcp-sfd-frontend-engine#readme",
40
40
  "devDependencies": {
41
- "@vitest/coverage-v8": "4.1.8",
41
+ "@vitest/coverage-v8": "4.1.10",
42
42
  "eslint": "9.39.2",
43
43
  "neostandard": "0.13.0",
44
44
  "tsup": "8.5.1",
45
- "vitest": "4.1.8"
45
+ "vitest": "4.1.10"
46
46
  },
47
47
  "dependencies": {
48
48
  "joi": "18.2.1"
@@ -5,9 +5,14 @@ import { businessEmailSchema } from './business-email-schema.js'
5
5
  import { businessPhoneSchema } from './business-phone-schema.js'
6
6
  import { businessVatSchema } from './business-vat-schema.js'
7
7
 
8
+ /**
9
+ * The businessSchema object has a nested property of `details`.
10
+ * This is due to the interrupter journey. The journey required the business details to be validated in a single step,
11
+ * these include name, address, phone, email and vat. The `details` property is used to group these schemas together.
12
+ * The `sbi` property is separate as it is validated in a different step of the journey.
13
+ */
8
14
  export const businessSchemas = {
9
15
  sbi: businessSbiSchema,
10
- address: addressSchema,
11
16
  details: {
12
17
  name: businessNameSchema,
13
18
  address: addressSchema,