diff --git a/src/api/repository.ts b/src/api/repository.ts index 1115a2b..df18114 100644 --- a/src/api/repository.ts +++ b/src/api/repository.ts @@ -37,6 +37,7 @@ export const repository = ( { id: faker.word(), name: changeCase.capitalCase(faker.word()), + is_master: true, }, ], tags: generateTags({ diff --git a/src/lib/buildImageFieldImage.ts b/src/lib/buildImageFieldImage.ts index 82e3880..d472447 100644 --- a/src/lib/buildImageFieldImage.ts +++ b/src/lib/buildImageFieldImage.ts @@ -31,6 +31,7 @@ export const buildImageFieldImage = < ): prismic.ImageFieldImage => { if (config.state === "empty") { return { + id: null, url: null, dimensions: null, alt: null, @@ -51,6 +52,7 @@ export const buildImageFieldImage = < url.searchParams.set("fit", "crop"); return { + id: faker.hash(11), url: url.toString(), dimensions, alt: changeCase.sentenceCase(faker.words(faker.range(5, 15))), diff --git a/src/value/linkToMedia.ts b/src/value/linkToMedia.ts index f42a56d..702be45 100644 --- a/src/value/linkToMedia.ts +++ b/src/value/linkToMedia.ts @@ -31,6 +31,7 @@ export const linkToMedia = < } else { return { link_type: prismic.LinkType.Media, + id: faker.hash(11), name: `${changeCase.snakeCase(faker.words(faker.range(1, 2)))}.example`, kind: changeCase.snakeCase(faker.word()), url: faker.url(), diff --git a/test/snapshots/api-query.test.ts.snap b/test/snapshots/api-query.test.ts.snap index 8b4feff..5357806 100644 Binary files a/test/snapshots/api-query.test.ts.snap and b/test/snapshots/api-query.test.ts.snap differ diff --git a/test/snapshots/api-ref.test.ts.snap b/test/snapshots/api-ref.test.ts.snap index 02ded57..8f3c77d 100644 Binary files a/test/snapshots/api-ref.test.ts.snap and b/test/snapshots/api-ref.test.ts.snap differ diff --git a/test/snapshots/api-repository.test.ts.md b/test/snapshots/api-repository.test.ts.md index a7aa6d2..591c211 100644 --- a/test/snapshots/api-repository.test.ts.md +++ b/test/snapshots/api-repository.test.ts.md @@ -17,6 +17,7 @@ Generated by [AVA](https://avajs.dev). languages: [ { id: 'est', + is_master: true, name: 'Malesuada', }, ], @@ -46,6 +47,7 @@ Generated by [AVA](https://avajs.dev). languages: [ { id: 'est', + is_master: true, name: 'Malesuada', }, ], @@ -82,6 +84,7 @@ Generated by [AVA](https://avajs.dev). languages: [ { id: 'vel', + is_master: true, name: 'Ultrices', }, ], @@ -111,6 +114,7 @@ Generated by [AVA](https://avajs.dev). languages: [ { id: 'vel', + is_master: true, name: 'Ultrices', }, ], diff --git a/test/snapshots/api-repository.test.ts.snap b/test/snapshots/api-repository.test.ts.snap index 2dc0255..8d5da97 100644 Binary files a/test/snapshots/api-repository.test.ts.snap and b/test/snapshots/api-repository.test.ts.snap differ diff --git a/test/snapshots/api-tags.test.ts.snap b/test/snapshots/api-tags.test.ts.snap index 0a3fc0c..a464a8a 100644 Binary files a/test/snapshots/api-tags.test.ts.snap and b/test/snapshots/api-tags.test.ts.snap differ diff --git a/test/snapshots/lib-buildMockGroupFieldMap.test.ts.snap b/test/snapshots/lib-buildMockGroupFieldMap.test.ts.snap index a6acb2c..159b3d6 100644 Binary files a/test/snapshots/lib-buildMockGroupFieldMap.test.ts.snap and b/test/snapshots/lib-buildMockGroupFieldMap.test.ts.snap differ diff --git a/test/snapshots/model-boolean.test.ts.snap b/test/snapshots/model-boolean.test.ts.snap index d4c4f22..283dea3 100644 Binary files a/test/snapshots/model-boolean.test.ts.snap and b/test/snapshots/model-boolean.test.ts.snap differ diff --git a/test/snapshots/model-color.test.ts.snap b/test/snapshots/model-color.test.ts.snap index 937007c..d8f1f75 100644 Binary files a/test/snapshots/model-color.test.ts.snap and b/test/snapshots/model-color.test.ts.snap differ diff --git a/test/snapshots/model-contentRelationship.test.ts.snap b/test/snapshots/model-contentRelationship.test.ts.snap index 1eeed90..2536e6e 100644 Binary files a/test/snapshots/model-contentRelationship.test.ts.snap and b/test/snapshots/model-contentRelationship.test.ts.snap differ diff --git a/test/snapshots/model-customType.test.ts.snap b/test/snapshots/model-customType.test.ts.snap index 9fba542..c3b0927 100644 Binary files a/test/snapshots/model-customType.test.ts.snap and b/test/snapshots/model-customType.test.ts.snap differ diff --git a/test/snapshots/model-date.test.ts.snap b/test/snapshots/model-date.test.ts.snap index d516619..9e12f2d 100644 Binary files a/test/snapshots/model-date.test.ts.snap and b/test/snapshots/model-date.test.ts.snap differ diff --git a/test/snapshots/model-embed.test.ts.snap b/test/snapshots/model-embed.test.ts.snap index ff97c31..e186a6b 100644 Binary files a/test/snapshots/model-embed.test.ts.snap and b/test/snapshots/model-embed.test.ts.snap differ diff --git a/test/snapshots/model-geoPoint.test.ts.snap b/test/snapshots/model-geoPoint.test.ts.snap index 270557e..28a9b52 100644 Binary files a/test/snapshots/model-geoPoint.test.ts.snap and b/test/snapshots/model-geoPoint.test.ts.snap differ diff --git a/test/snapshots/model-group.test.ts.snap b/test/snapshots/model-group.test.ts.snap index 025e8d6..2b3d0f4 100644 Binary files a/test/snapshots/model-group.test.ts.snap and b/test/snapshots/model-group.test.ts.snap differ diff --git a/test/snapshots/model-image.test.ts.snap b/test/snapshots/model-image.test.ts.snap index 202a940..a04be34 100644 Binary files a/test/snapshots/model-image.test.ts.snap and b/test/snapshots/model-image.test.ts.snap differ diff --git a/test/snapshots/model-integration.test.ts.snap b/test/snapshots/model-integration.test.ts.snap index 0155e25..3d9b540 100644 Binary files a/test/snapshots/model-integration.test.ts.snap and b/test/snapshots/model-integration.test.ts.snap differ diff --git a/test/snapshots/model-keyText.test.ts.snap b/test/snapshots/model-keyText.test.ts.snap index 16a3e7b..e58741d 100644 Binary files a/test/snapshots/model-keyText.test.ts.snap and b/test/snapshots/model-keyText.test.ts.snap differ diff --git a/test/snapshots/model-link.test.ts.snap b/test/snapshots/model-link.test.ts.snap index 217d7de..d0f39ed 100644 Binary files a/test/snapshots/model-link.test.ts.snap and b/test/snapshots/model-link.test.ts.snap differ diff --git a/test/snapshots/model-linkToMedia.test.ts.snap b/test/snapshots/model-linkToMedia.test.ts.snap index 91cd2ae..b8f3d94 100644 Binary files a/test/snapshots/model-linkToMedia.test.ts.snap and b/test/snapshots/model-linkToMedia.test.ts.snap differ diff --git a/test/snapshots/model-number.test.ts.snap b/test/snapshots/model-number.test.ts.snap index a0ec591..17c8865 100644 Binary files a/test/snapshots/model-number.test.ts.snap and b/test/snapshots/model-number.test.ts.snap differ diff --git a/test/snapshots/model-richText.test.ts.snap b/test/snapshots/model-richText.test.ts.snap index 312daa5..536be8d 100644 Binary files a/test/snapshots/model-richText.test.ts.snap and b/test/snapshots/model-richText.test.ts.snap differ diff --git a/test/snapshots/model-select.test.ts.snap b/test/snapshots/model-select.test.ts.snap index 21727af..3f68266 100644 Binary files a/test/snapshots/model-select.test.ts.snap and b/test/snapshots/model-select.test.ts.snap differ diff --git a/test/snapshots/model-sharedSlice.test.ts.snap b/test/snapshots/model-sharedSlice.test.ts.snap index 5880d91..9565fd0 100644 Binary files a/test/snapshots/model-sharedSlice.test.ts.snap and b/test/snapshots/model-sharedSlice.test.ts.snap differ diff --git a/test/snapshots/model-sharedSliceChoice.test.ts.snap b/test/snapshots/model-sharedSliceChoice.test.ts.snap index c149ac0..6415a0d 100644 Binary files a/test/snapshots/model-sharedSliceChoice.test.ts.snap and b/test/snapshots/model-sharedSliceChoice.test.ts.snap differ diff --git a/test/snapshots/model-sharedSliceVariation.test.ts.snap b/test/snapshots/model-sharedSliceVariation.test.ts.snap index 8fed3f4..8384f75 100644 Binary files a/test/snapshots/model-sharedSliceVariation.test.ts.snap and b/test/snapshots/model-sharedSliceVariation.test.ts.snap differ diff --git a/test/snapshots/model-slice.test.ts.snap b/test/snapshots/model-slice.test.ts.snap index fc42d43..c8ae9cc 100644 Binary files a/test/snapshots/model-slice.test.ts.snap and b/test/snapshots/model-slice.test.ts.snap differ diff --git a/test/snapshots/model-sliceZone.test.ts.snap b/test/snapshots/model-sliceZone.test.ts.snap index 1a4c7ff..bb52912 100644 Binary files a/test/snapshots/model-sliceZone.test.ts.snap and b/test/snapshots/model-sliceZone.test.ts.snap differ diff --git a/test/snapshots/model-timestamp.test.ts.snap b/test/snapshots/model-timestamp.test.ts.snap index 5ae79d1..94142bd 100644 Binary files a/test/snapshots/model-timestamp.test.ts.snap and b/test/snapshots/model-timestamp.test.ts.snap differ diff --git a/test/snapshots/model-title.test.ts.snap b/test/snapshots/model-title.test.ts.snap index 12b2a0a..02166a4 100644 Binary files a/test/snapshots/model-title.test.ts.snap and b/test/snapshots/model-title.test.ts.snap differ diff --git a/test/snapshots/model-uid.test.ts.snap b/test/snapshots/model-uid.test.ts.snap index b026851..8b37bb8 100644 Binary files a/test/snapshots/model-uid.test.ts.snap and b/test/snapshots/model-uid.test.ts.snap differ diff --git a/test/snapshots/value-boolean.test.ts.snap b/test/snapshots/value-boolean.test.ts.snap index ea84022..d0364bb 100644 Binary files a/test/snapshots/value-boolean.test.ts.snap and b/test/snapshots/value-boolean.test.ts.snap differ diff --git a/test/snapshots/value-color.test.ts.snap b/test/snapshots/value-color.test.ts.snap index 29be55e..c1442cb 100644 Binary files a/test/snapshots/value-color.test.ts.snap and b/test/snapshots/value-color.test.ts.snap differ diff --git a/test/snapshots/value-contentRelationship.test.ts.snap b/test/snapshots/value-contentRelationship.test.ts.snap index 796b81b..9a3b8b0 100644 Binary files a/test/snapshots/value-contentRelationship.test.ts.snap and b/test/snapshots/value-contentRelationship.test.ts.snap differ diff --git a/test/snapshots/value-customType.test.ts.snap b/test/snapshots/value-customType.test.ts.snap index 3a73917..fff0038 100644 Binary files a/test/snapshots/value-customType.test.ts.snap and b/test/snapshots/value-customType.test.ts.snap differ diff --git a/test/snapshots/value-date.test.ts.snap b/test/snapshots/value-date.test.ts.snap index 8d2c209..51eb827 100644 Binary files a/test/snapshots/value-date.test.ts.snap and b/test/snapshots/value-date.test.ts.snap differ diff --git a/test/snapshots/value-embed.test.ts.snap b/test/snapshots/value-embed.test.ts.snap index be5fa39..fa5446e 100644 Binary files a/test/snapshots/value-embed.test.ts.snap and b/test/snapshots/value-embed.test.ts.snap differ diff --git a/test/snapshots/value-geoPoint.test.ts.snap b/test/snapshots/value-geoPoint.test.ts.snap index c5aa983..6f6c95a 100644 Binary files a/test/snapshots/value-geoPoint.test.ts.snap and b/test/snapshots/value-geoPoint.test.ts.snap differ diff --git a/test/snapshots/value-group.test.ts.snap b/test/snapshots/value-group.test.ts.snap index 35790a4..e81080b 100644 Binary files a/test/snapshots/value-group.test.ts.snap and b/test/snapshots/value-group.test.ts.snap differ diff --git a/test/snapshots/value-image.test.ts.md b/test/snapshots/value-image.test.ts.md index 80c0559..da48034 100644 --- a/test/snapshots/value-image.test.ts.md +++ b/test/snapshots/value-image.test.ts.md @@ -10,33 +10,35 @@ Generated by [AVA](https://avajs.dev). [ { - alt: 'In vitae turpis massa sed elementum tempus egestas sed', - copyright: 'Adipiscing elit ut aliquam purus sit amet', + alt: 'Etiam dignissim diam quis enim lobortis scelerisque fermentum dui faucibus', + copyright: 'Lectus sit amet est placerat in egestas erat imperdiet sed euismod', dimensions: { height: 4253, width: 6373, }, edit: { - background: '#8ccdec', - x: -2575, - y: -298, - zoom: 1.365900692848, + background: '#f5b2ae', + x: 2071, + y: -2054, + zoom: 1.3291021141524197, }, + id: '8052f65df7f', url: 'https://images.unsplash.com/reserve/HgZuGu3gSD6db21T3lxm_San%20Zenone.jpg?w=6373&h=4253&fit=crop', }, { - alt: 'In vitae turpis massa sed elementum tempus egestas sed', - copyright: 'Adipiscing elit ut aliquam purus sit amet', + alt: 'Etiam dignissim diam quis enim lobortis scelerisque fermentum dui faucibus', + copyright: 'Lectus sit amet est placerat in egestas erat imperdiet sed euismod', dimensions: { height: 4253, width: 6373, }, edit: { - background: '#8ccdec', - x: -2575, - y: -298, - zoom: 1.365900692848, + background: '#f5b2ae', + x: 2071, + y: -2054, + zoom: 1.3291021141524197, }, + id: '8052f65df7f', url: 'https://images.unsplash.com/reserve/HgZuGu3gSD6db21T3lxm_San%20Zenone.jpg?w=6373&h=4253&fit=crop', }, ] @@ -47,33 +49,35 @@ Generated by [AVA](https://avajs.dev). [ { - alt: 'Quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus mattis rhoncus urna', - copyright: 'Quis auctor elit sed vulputate mi sit amet mauris commodo quis imperdiet massa tincidunt', + alt: 'Maecenas sed enim ut sem viverra aliquet eget sit', + copyright: 'Leo duis ut diam quam nulla porttitor massa id neque aliquam vestibulum', dimensions: { height: 3744, width: 5616, }, edit: { - background: '#e1d2fe', - x: -1092, - y: 1445, - zoom: 1.2798682074714145, + background: '#6385eb', + x: 1163, + y: -1271, + zoom: 1.155937177631058, }, + id: 'dd98a8a9eba', url: 'https://images.unsplash.com/photo-1426604966848-d7adac402bff?w=5616&h=3744&fit=crop', }, { - alt: 'Quis eleifend quam adipiscing vitae proin sagittis nisl rhoncus mattis rhoncus urna', - copyright: 'Quis auctor elit sed vulputate mi sit amet mauris commodo quis imperdiet massa tincidunt', + alt: 'Maecenas sed enim ut sem viverra aliquet eget sit', + copyright: 'Leo duis ut diam quam nulla porttitor massa id neque aliquam vestibulum', dimensions: { height: 3744, width: 5616, }, edit: { - background: '#e1d2fe', - x: -1092, - y: 1445, - zoom: 1.2798682074714145, + background: '#6385eb', + x: 1163, + y: -1271, + zoom: 1.155937177631058, }, + id: 'dd98a8a9eba', url: 'https://images.unsplash.com/photo-1426604966848-d7adac402bff?w=5616&h=3744&fit=crop', }, ] diff --git a/test/snapshots/value-image.test.ts.snap b/test/snapshots/value-image.test.ts.snap index d767bd2..5d4cefa 100644 Binary files a/test/snapshots/value-image.test.ts.snap and b/test/snapshots/value-image.test.ts.snap differ diff --git a/test/snapshots/value-integration.test.ts.snap b/test/snapshots/value-integration.test.ts.snap index 9ea3c40..d69652f 100644 Binary files a/test/snapshots/value-integration.test.ts.snap and b/test/snapshots/value-integration.test.ts.snap differ diff --git a/test/snapshots/value-keyText.test.ts.snap b/test/snapshots/value-keyText.test.ts.snap index bc21083..0abc755 100644 Binary files a/test/snapshots/value-keyText.test.ts.snap and b/test/snapshots/value-keyText.test.ts.snap differ diff --git a/test/snapshots/value-link.test.ts.md b/test/snapshots/value-link.test.ts.md index d60fcd2..541cc47 100644 --- a/test/snapshots/value-link.test.ts.md +++ b/test/snapshots/value-link.test.ts.md @@ -10,22 +10,24 @@ Generated by [AVA](https://avajs.dev). [ { - height: '2806', - kind: 'neque', + height: '2427', + id: '27f8fbcfcc8', + kind: 'cras', link_type: 'Media', - name: 'malesuada.example', - size: '2002', - url: 'https://urna.example', - width: '848', + name: 'ornare.example', + size: '1888', + url: 'https://volutpat.example', + width: '2531', }, { - height: '2806', - kind: 'neque', + height: '2427', + id: '27f8fbcfcc8', + kind: 'cras', link_type: 'Media', - name: 'malesuada.example', - size: '2002', - url: 'https://urna.example', - width: '848', + name: 'ornare.example', + size: '1888', + url: 'https://volutpat.example', + width: '2531', }, ] diff --git a/test/snapshots/value-link.test.ts.snap b/test/snapshots/value-link.test.ts.snap index 418f826..c11fcc7 100644 Binary files a/test/snapshots/value-link.test.ts.snap and b/test/snapshots/value-link.test.ts.snap differ diff --git a/test/snapshots/value-linkToMedia.test.ts.md b/test/snapshots/value-linkToMedia.test.ts.md index 83aafcc..1684bb1 100644 --- a/test/snapshots/value-linkToMedia.test.ts.md +++ b/test/snapshots/value-linkToMedia.test.ts.md @@ -10,22 +10,24 @@ Generated by [AVA](https://avajs.dev). [ { - height: '749', - kind: 'at', + height: '1921', + id: 'f30d96d5ee2', + kind: 'laoreet', link_type: 'Media', - name: 'posuere.example', - size: '1216', - url: 'https://vel.example', - width: '2326', + name: 'scelerisque.example', + size: '2617', + url: 'https://donec.example', + width: '2593', }, { - height: '749', - kind: 'at', + height: '1921', + id: 'f30d96d5ee2', + kind: 'laoreet', link_type: 'Media', - name: 'posuere.example', - size: '1216', - url: 'https://vel.example', - width: '2326', + name: 'scelerisque.example', + size: '2617', + url: 'https://donec.example', + width: '2593', }, ] @@ -35,21 +37,23 @@ Generated by [AVA](https://avajs.dev). [ { - height: '1907', - kind: 'in', + height: '1741', + id: '2dd98a8a9eb', + kind: 'nec', link_type: 'Media', - name: 'ut.example', - size: '2949', - url: 'https://quis.example', - width: '1263', + name: 'sed.example', + size: '2434', + url: 'https://maecenas.example', + width: '2267', }, { - height: '1907', - kind: 'in', + height: '1741', + id: '2dd98a8a9eb', + kind: 'nec', link_type: 'Media', - name: 'ut.example', - size: '2949', - url: 'https://quis.example', - width: '1263', + name: 'sed.example', + size: '2434', + url: 'https://maecenas.example', + width: '2267', }, ] diff --git a/test/snapshots/value-linkToMedia.test.ts.snap b/test/snapshots/value-linkToMedia.test.ts.snap index 2dd8711..1d76c7d 100644 Binary files a/test/snapshots/value-linkToMedia.test.ts.snap and b/test/snapshots/value-linkToMedia.test.ts.snap differ diff --git a/test/snapshots/value-number.test.ts.snap b/test/snapshots/value-number.test.ts.snap index 54565e7..4749367 100644 Binary files a/test/snapshots/value-number.test.ts.snap and b/test/snapshots/value-number.test.ts.snap differ diff --git a/test/snapshots/value-richText.test.ts.snap b/test/snapshots/value-richText.test.ts.snap index f7a00a3..468dd65 100644 Binary files a/test/snapshots/value-richText.test.ts.snap and b/test/snapshots/value-richText.test.ts.snap differ diff --git a/test/snapshots/value-select.test.ts.snap b/test/snapshots/value-select.test.ts.snap index 335a16b..14f8add 100644 Binary files a/test/snapshots/value-select.test.ts.snap and b/test/snapshots/value-select.test.ts.snap differ diff --git a/test/snapshots/value-sharedSlice.test.ts.snap b/test/snapshots/value-sharedSlice.test.ts.snap index 35c2ab0..7e8abe7 100644 Binary files a/test/snapshots/value-sharedSlice.test.ts.snap and b/test/snapshots/value-sharedSlice.test.ts.snap differ diff --git a/test/snapshots/value-sharedSliceVariation.test.ts.snap b/test/snapshots/value-sharedSliceVariation.test.ts.snap index d15f4fe..0f22eff 100644 Binary files a/test/snapshots/value-sharedSliceVariation.test.ts.snap and b/test/snapshots/value-sharedSliceVariation.test.ts.snap differ diff --git a/test/snapshots/value-slice.test.ts.snap b/test/snapshots/value-slice.test.ts.snap index 349b965..22c786a 100644 Binary files a/test/snapshots/value-slice.test.ts.snap and b/test/snapshots/value-slice.test.ts.snap differ diff --git a/test/snapshots/value-sliceZone.test.ts.snap b/test/snapshots/value-sliceZone.test.ts.snap index 429dcb4..70ec2db 100644 Binary files a/test/snapshots/value-sliceZone.test.ts.snap and b/test/snapshots/value-sliceZone.test.ts.snap differ diff --git a/test/snapshots/value-timestamp.test.ts.snap b/test/snapshots/value-timestamp.test.ts.snap index 6378bd8..447a14b 100644 Binary files a/test/snapshots/value-timestamp.test.ts.snap and b/test/snapshots/value-timestamp.test.ts.snap differ diff --git a/test/snapshots/value-title.test.ts.snap b/test/snapshots/value-title.test.ts.snap index 55836a5..ec611bb 100644 Binary files a/test/snapshots/value-title.test.ts.snap and b/test/snapshots/value-title.test.ts.snap differ diff --git a/test/snapshots/value-uid.test.ts.snap b/test/snapshots/value-uid.test.ts.snap index 18a6063..b8a324f 100644 Binary files a/test/snapshots/value-uid.test.ts.snap and b/test/snapshots/value-uid.test.ts.snap differ diff --git a/test/value-image.test.ts b/test/value-image.test.ts index 4a97316..3d90795 100644 --- a/test/value-image.test.ts +++ b/test/value-image.test.ts @@ -32,11 +32,13 @@ test("can be configured to return an empty value", (t) => { }); t.deepEqual(actual, { + id: null, url: null, alt: null, copyright: null, dimensions: null, Foo: { + id: null, url: null, alt: null, copyright: null,