@prismicio/mock 0.0.8 → 0.0.9

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.
Files changed (84) hide show
  1. package/dist/api/index.cjs +208 -100
  2. package/dist/api/index.cjs.map +1 -1
  3. package/dist/api/index.d.ts +1 -1
  4. package/dist/api/index.js +208 -100
  5. package/dist/api/index.js.map +1 -1
  6. package/dist/index.cjs +311 -213
  7. package/dist/index.cjs.map +1 -1
  8. package/dist/index.d.ts +9 -5
  9. package/dist/index.js +310 -211
  10. package/dist/index.js.map +1 -1
  11. package/dist/model/index.cjs +168 -74
  12. package/dist/model/index.cjs.map +1 -1
  13. package/dist/model/index.d.ts +1 -1
  14. package/dist/model/index.js +168 -74
  15. package/dist/model/index.js.map +1 -1
  16. package/dist/value/index.cjs +280 -182
  17. package/dist/value/index.cjs.map +1 -1
  18. package/dist/value/index.d.ts +8 -4
  19. package/dist/value/index.js +280 -182
  20. package/dist/value/index.js.map +1 -1
  21. package/package.json +19 -16
  22. package/src/api/query.ts +2 -2
  23. package/src/api/ref.ts +3 -3
  24. package/src/api/repository.ts +5 -5
  25. package/src/lib/buildEmbedField.ts +16 -27
  26. package/src/lib/buildImageFieldImage.ts +3 -2
  27. package/src/lib/createFaker.ts +98 -20
  28. package/src/lib/generateCustomTypeId.ts +1 -1
  29. package/src/lib/generateFieldId.ts +1 -3
  30. package/src/lib/generateTags.ts +4 -12
  31. package/src/lib/getMockEmbedData.ts +33 -12
  32. package/src/lib/getMockImageData.ts +1 -1
  33. package/src/lib/lorem.ts +112 -0
  34. package/src/model/boolean.ts +1 -1
  35. package/src/model/buildMockGroupFieldMap.ts +1 -1
  36. package/src/model/color.ts +2 -2
  37. package/src/model/contentRelationship.ts +2 -2
  38. package/src/model/customType.ts +3 -3
  39. package/src/model/date.ts +2 -2
  40. package/src/model/embed.ts +2 -2
  41. package/src/model/geoPoint.ts +1 -1
  42. package/src/model/group.ts +1 -1
  43. package/src/model/image.ts +5 -9
  44. package/src/model/integrationFields.ts +2 -2
  45. package/src/model/keyText.ts +2 -2
  46. package/src/model/link.ts +3 -3
  47. package/src/model/linkToMedia.ts +2 -2
  48. package/src/model/number.ts +2 -2
  49. package/src/model/richText.ts +6 -6
  50. package/src/model/select.ts +2 -2
  51. package/src/model/sharedSlice.ts +2 -2
  52. package/src/model/sharedSliceVariation.ts +4 -4
  53. package/src/model/slice.ts +4 -4
  54. package/src/model/timestamp.ts +2 -2
  55. package/src/model/title.ts +5 -5
  56. package/src/model/uid.ts +2 -2
  57. package/src/types.ts +7 -10
  58. package/src/value/boolean.ts +1 -1
  59. package/src/value/color.ts +1 -1
  60. package/src/value/contentRelationship.ts +3 -3
  61. package/src/value/customType.ts +5 -5
  62. package/src/value/embed.ts +20 -7
  63. package/src/value/geoPoint.ts +2 -4
  64. package/src/value/group.ts +1 -6
  65. package/src/value/integrationFields.ts +4 -4
  66. package/src/value/keyText.ts +1 -3
  67. package/src/value/link.ts +3 -3
  68. package/src/value/linkToMedia.ts +7 -6
  69. package/src/value/number.ts +1 -1
  70. package/src/value/richText/embed.ts +2 -2
  71. package/src/value/richText/heading.ts +3 -10
  72. package/src/value/richText/image.ts +3 -5
  73. package/src/value/richText/index.ts +3 -8
  74. package/src/value/richText/list.ts +4 -8
  75. package/src/value/richText/oList.ts +4 -8
  76. package/src/value/richText/paragraph.ts +8 -4
  77. package/src/value/richText/preformatted.ts +9 -5
  78. package/src/value/select.ts +2 -2
  79. package/src/value/sharedSlice.ts +1 -1
  80. package/src/value/sharedSliceVariation.ts +2 -6
  81. package/src/value/slice.ts +2 -6
  82. package/src/value/sliceZone.ts +4 -10
  83. package/src/value/timestamp.ts +28 -15
  84. package/src/value/uid.ts +1 -1
package/dist/index.js CHANGED
@@ -1,41 +1,133 @@
1
1
  import * as changeCase from 'change-case';
2
- import * as fakerLocaleEN from 'faker/lib/locales/en/index.js';
3
- import Faker from 'faker/lib/index.js';
2
+ import Rand from 'rand-seed';
4
3
  import * as prismicT from '@prismicio/types';
5
4
 
6
5
  const FAKER_SEED = 1984;
7
6
 
7
+ const wordsString = "lorem ipsum dolor sit amet, consectetur adipiscing elit ut aliquam, purus sit amet luctus venenatis, lectus magna fringilla urna, porttitor rhoncus dolor purus non enim praesent elementum facilisis leo, vel fringilla est ullamcorper eget nulla facilisi etiam dignissim diam quis enim lobortis scelerisque fermentum dui faucibus in ornare quam viverra orci sagittis eu volutpat odio facilisis mauris sit amet massa vitae tortor condimentum lacinia quis vel eros donec ac odio tempor orci dapibus ultrices in iaculis nunc sed augue lacus, viverra vitae congue eu, consequat ac felis donec et odio pellentesque diam volutpat commodo sed egestas egestas fringilla phasellus faucibus scelerisque eleifend donec pretium vulputate sapien nec sagittis aliquam malesuada bibendum arcu vitae elementum curabitur vitae nunc sed velit dignissim sodales ut eu sem integer vitae justo eget magna fermentum iaculis eu non diam phasellus vestibulum lorem sed risus ultricies tristique nulla aliquet enim tortor, at auctor urna nunc id cursus metus aliquam eleifend mi in nulla posuere sollicitudin aliquam ultrices sagittis orci, a scelerisque purus semper eget duis at tellus at urna condimentum mattis pellentesque id nibh tortor, id aliquet lectus proin nibh nisl, condimentum id venenatis a, condimentum vitae sapien pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas sed tempus, urna et pharetra pharetra, massa massa ultricies mi, quis hendrerit dolor magna eget est lorem ipsum dolor sit amet, consectetur adipiscing elit pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas integer eget aliquet nibh praesent tristique magna sit amet purus gravida quis blandit turpis cursus in hac habitasse platea dictumst quisque sagittis, purus sit amet volutpat consequat, mauris nunc congue nisi, vitae suscipit tellus mauris a diam maecenas sed enim ut sem viverra aliquet eget sit amet tellus cras adipiscing enim eu turpis egestas pretium aenean pharetra, magna ac placerat vestibulum, lectus mauris ultrices eros, in cursus turpis massa tincidunt dui ut ornare lectus sit amet est placerat in egestas erat imperdiet sed euismod nisi porta lorem mollis aliquam ut porttitor leo a diam sollicitudin tempor id eu nisl nunc mi ipsum, faucibus vitae aliquet nec, ullamcorper sit amet risus nullam eget felis eget nunc lobortis mattis aliquam faucibus purus in massa tempor nec feugiat nisl pretium fusce id velit ut tortor pretium viverra suspendisse potenti nullam ac tortor vitae purus faucibus ornare suspendisse sed nisi lacus, sed viverra tellus in hac habitasse platea dictumst vestibulum rhoncus est pellentesque elit ullamcorper dignissim cras tincidunt lobortis feugiat vivamus at augue eget arcu dictum varius duis at consectetur lorem donec massa sapien, faucibus et molestie ac, feugiat sed lectus vestibulum mattis ullamcorper velit sed ullamcorper morbi tincidunt ornare massa, eget egestas purus viverra accumsan in nisl nisi, scelerisque eu ultrices vitae, auctor eu augue ut lectus arcu, bibendum at varius vel, pharetra vel turpis nunc eget lorem dolor, sed viverra ipsum nunc aliquet bibendum enim, facilisis gravida neque convallis a cras semper auctor neque, vitae tempus quam pellentesque nec nam aliquam sem et tortor consequat id porta nibh venenatis cras sed felis eget velit aliquet sagittis id consectetur purus ut faucibus pulvinar elementum integer enim neque, volutpat ac tincidunt vitae, semper quis lectus nulla at volutpat diam ut venenatis tellus in metus vulputate eu scelerisque felis imperdiet proin fermentum leo vel orci porta non pulvinar neque laoreet suspendisse interdum consectetur libero, id faucibus nisl tincidunt eget nullam non nisi est, sit amet facilisis magna etiam tempor, orci eu lobortis elementum, nibh tellus molestie nunc, non blandit massa enim nec dui nunc mattis enim ut tellus elementum sagittis vitae et leo duis ut diam quam nulla porttitor massa id neque aliquam vestibulum morbi blandit cursus risus, at ultrices mi tempus imperdiet nulla malesuada pellentesque elit eget gravida cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus mauris vitae ultricies leo integer malesuada nunc vel risus commodo viverra maecenas accumsan, lacus vel facilisis volutpat, est velit egestas dui, id ornare arcu odio ut sem nulla pharetra diam sit amet nisl suscipit adipiscing bibendum est ultricies integer quis auctor elit sed vulputate mi sit amet mauris commodo quis imperdiet massa tincidunt nunc pulvinar sapien et ligula ullamcorper malesuada proin libero nunc, consequat interdum varius sit amet, mattis vulputate enim nulla aliquet porttitor lacus, luctus accumsan tortor posuere ac ut consequat semper viverra nam libero justo, laoreet sit amet cursus sit amet, dictum sit amet justo donec enim diam, vulputate ut pharetra sit amet, aliquam id diam maecenas ultricies mi eget mauris pharetra et ultrices neque ornare aenean euismod elementum nisi, quis eleifend quam adipiscing vitae proin sagittis, nisl rhoncus mattis rhoncus, urna neque viverra justo, nec ultrices dui sapien eget mi proin sed libero enim, sed faucibus turpis in eu mi bibendum neque egestas congue quisque egestas diam in arcu cursus euismod quis viverra nibh cras pulvinar mattis nunc, sed blandit libero volutpat sed cras ornare arcu dui vivamus arcu felis, bibendum ut tristique et, egestas quis ipsum suspendisse ultrices gravida dictum fusce ut placerat orci nulla pellentesque dignissim enim, sit amet venenatis urna cursus eget nunc scelerisque viverra mauris, in aliquam sem fringilla ut morbi tincidunt augue interdum velit euismod in pellentesque massa placerat duis ultricies lacus sed turpis tincidunt id aliquet risus feugiat in ante metus, dictum at tempor commodo, ullamcorper a lacus vestibulum sed arcu non odio euismod lacinia at quis risus sed vulputate odio ut enim blandit volutpat maecenas volutpat blandit aliquam etiam erat velit, scelerisque in dictum non, consectetur a erat nam at lectus urna duis convallis convallis tellus, id interdum velit laoreet id donec ultrices tincidunt arcu, non sodales neque sodales ut etiam sit amet nisl purus, in mollis nunc sed id semper risus in hendrerit gravida rutrum quisque non tellus orci, ac auctor augue mauris augue neque, gravida in fermentum et, sollicitudin ac orci phasellus egestas tellus rutrum tellus pellentesque eu tincidunt tortor aliquam nulla facilisi cras fermentum, odio eu feugiat pretium, nibh ipsum consequat nisl, vel pretium lectus quam id leo in vitae turpis massa sed elementum tempus egestas sed sed risus pretium quam vulputate dignissim suspendisse in est ante in nibh mauris, cursus mattis molestie a, iaculis at erat pellentesque adipiscing commodo elit, at imperdiet dui accumsan sit amet nulla facilisi morbi tempus iaculis urna, id volutpat lacus laoreet non curabitur gravida arcu ac tortor dignissim convallis aenean et tortor at risus viverra adipiscing at in tellus integer feugiat scelerisque varius morbi enim nunc, faucibus a pellentesque sit amet, porttitor eget dolor morbi non arcu risus, quis varius quam quisque id diam vel quam elementum pulvinar etiam non quam lacus suspendisse faucibus interdum posuere lorem ipsum dolor sit amet, consectetur adipiscing elit duis tristique sollicitudin nibh sit amet commodo nulla facilisi nullam vehicula ipsum a arcu cursus vitae congue mauris rhoncus aenean vel elit scelerisque mauris pellentesque pulvinar pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas maecenas pharetra convallis posuere morbi leo urna, molestie at elementum eu, facilisis sed odio morbi quis commodo odio aenean sed adipiscing diam donec adipiscing tristique risus nec feugiat in fermentum posuere urna nec tincidunt praesent semper feugiat nibh sed pulvinar proin gravida hendrerit lectus a molestie";
8
+ const loremWords = wordsString.split(" ");
9
+ const lorem = (length, wordOffset = 0) => {
10
+ const count = parseInt(length.substring(0, length.length - 1));
11
+ const countType = length.charAt(length.length - 1);
12
+ if (!isNaN(count) && (countType === "w" || countType === "c")) {
13
+ if (!lorem.spaceIndices.length) {
14
+ let startIndex = -1;
15
+ do {
16
+ const index = wordsString.indexOf(" ", startIndex + 1);
17
+ lorem.spaceIndices.push(index);
18
+ startIndex = index;
19
+ } while (startIndex !== -1);
20
+ }
21
+ if (countType === "c") {
22
+ return wordsString.substring(0, count);
23
+ } else {
24
+ let sentence = "";
25
+ const startSpaceIndex = lorem.spaceIndices[wordOffset % lorem.spaceIndices.length - 1];
26
+ const endSpaceIndex = lorem.spaceIndices[(wordOffset % lorem.spaceIndices.length + count) % lorem.spaceIndices.length - 1];
27
+ if (count + wordOffset % lorem.spaceIndices.length > lorem.spaceIndices.length) {
28
+ sentence += wordsString.substring(startSpaceIndex + 1) + " ";
29
+ const wraparoundCounts = Math.floor(count / lorem.spaceIndices.length) - 1;
30
+ for (let i = 0; i < wraparoundCounts; i++) {
31
+ sentence += wordsString + " ";
32
+ }
33
+ sentence += wordsString.substring(0, endSpaceIndex);
34
+ } else {
35
+ sentence = wordsString.substring(startSpaceIndex + 1, endSpaceIndex);
36
+ }
37
+ if (sentence.charAt(sentence.length - 1) === ",") {
38
+ return sentence.substring(0, sentence.length - 1);
39
+ } else {
40
+ return sentence.substring(0, sentence.length);
41
+ }
42
+ }
43
+ }
44
+ throw new Error("Length must be of the form `${number}w` or `${number}c`");
45
+ };
46
+ lorem.spaceIndices = [];
47
+
8
48
  const createFaker = (seed = FAKER_SEED) => {
9
- let normalizedSeed;
10
- if (typeof seed === "string") {
11
- normalizedSeed = seed.split("").map((char) => char.charCodeAt(0));
49
+ const normalizedSeed = seed.toString();
50
+ if (createFaker.cache[normalizedSeed]) {
51
+ return createFaker.cache[normalizedSeed];
12
52
  } else {
13
- normalizedSeed = seed;
53
+ const faker = new Faker(normalizedSeed);
54
+ return createFaker.cache[normalizedSeed] = faker;
14
55
  }
15
- const cacheKey = JSON.stringify(normalizedSeed);
16
- if (createFaker.cache[cacheKey]) {
17
- return createFaker.cache[cacheKey];
18
- }
19
- const fakerInstance = new Faker();
20
- fakerInstance.locales["en"] = fakerLocaleEN;
21
- fakerInstance.seed(normalizedSeed);
22
- createFaker.cache[cacheKey] = fakerInstance;
23
- return fakerInstance;
24
56
  };
25
57
  createFaker.cache = {};
58
+ const DAY_MS = 1e3 * 60 * 60 * 24;
59
+ const YEAR_MS = DAY_MS * 365;
60
+ const YEAR_2022_MS = 52 * (YEAR_MS + DAY_MS / 4);
61
+ class Faker {
62
+ constructor(seed) {
63
+ this.rand = new Rand(seed);
64
+ }
65
+ boolean() {
66
+ return this.random() >= 0.5;
67
+ }
68
+ random() {
69
+ return this.rand.next();
70
+ }
71
+ randomElement(elements) {
72
+ return elements[this.range(0, elements.length)];
73
+ }
74
+ randomElements(elements) {
75
+ return elements.filter(() => this.boolean());
76
+ }
77
+ range(min, max) {
78
+ return Math.floor(this.rangeFloat(Math.ceil(min), Math.floor(max)));
79
+ }
80
+ rangeFloat(min, max) {
81
+ return this.random() * (max - min) + min;
82
+ }
83
+ words(length, wordOffset = this.range(0, loremWords.length)) {
84
+ return lorem(`${length}w`, wordOffset);
85
+ }
86
+ word() {
87
+ return this.randomElement(loremWords);
88
+ }
89
+ lorem(length, wordOffset = this.range(0, loremWords.length)) {
90
+ return lorem(length, wordOffset);
91
+ }
92
+ url() {
93
+ return `https://${this.word()}.example`;
94
+ }
95
+ hexColor() {
96
+ return `#${this.hash(6)}`;
97
+ }
98
+ hash(length) {
99
+ let hash = "";
100
+ for (let i = 0; i < length; i++) {
101
+ const chars = this.boolean() ? "abcdef" : "0123456789";
102
+ hash += chars[this.range(0, chars.length)];
103
+ }
104
+ return hash;
105
+ }
106
+ date() {
107
+ return new Date(YEAR_2022_MS + this.range(-YEAR_MS * 3, YEAR_MS * 3));
108
+ }
109
+ dateAfter(date) {
110
+ const timestamp = date.getTime();
111
+ return new Date(this.range(timestamp, timestamp + YEAR_MS * 3));
112
+ }
113
+ dateBefore(date) {
114
+ const timestamp = date.getTime();
115
+ return new Date(this.range(timestamp - YEAR_MS * 3, timestamp));
116
+ }
117
+ dateBetween(min, max) {
118
+ return new Date(this.range(min.getTime(), max.getTime()));
119
+ }
120
+ }
26
121
 
27
122
  const generateTags = (config) => {
28
123
  var _a, _b;
29
124
  const faker = createFaker(config.seed);
30
- return Array(faker.datatype.number({
31
- min: (_a = config.min) != null ? _a : 0,
32
- max: (_b = config.max) != null ? _b : 2
33
- })).fill(void 0).map(() => changeCase.capitalCase(faker.lorem.words(faker.datatype.number({ min: 1, max: 3 }))));
125
+ return Array.from({ length: faker.range((_a = config.min) != null ? _a : 0, (_b = config.max) != null ? _b : 2) }, () => changeCase.capitalCase(faker.words(faker.range(1, 3))));
34
126
  };
35
127
 
36
128
  const boolean$1 = (config = {}) => {
37
129
  const faker = createFaker(config.seed);
38
- return faker.datatype.boolean();
130
+ return faker.boolean();
39
131
  };
40
132
 
41
133
  const valueForModel = (config) => {
@@ -252,7 +344,7 @@ const boolean = (config = {}) => {
252
344
  return {
253
345
  type: prismicT.CustomTypeModelFieldType.Boolean,
254
346
  config: {
255
- label: changeCase.capitalCase(faker.company.bsNoun())
347
+ label: changeCase.capitalCase(faker.word())
256
348
  }
257
349
  };
258
350
  };
@@ -262,8 +354,8 @@ const color$1 = (config = {}) => {
262
354
  return {
263
355
  type: prismicT.CustomTypeModelFieldType.Color,
264
356
  config: {
265
- label: changeCase.capitalCase(faker.company.bsNoun()),
266
- placeholder: changeCase.sentenceCase(faker.lorem.words(3))
357
+ label: changeCase.capitalCase(faker.word()),
358
+ placeholder: changeCase.sentenceCase(faker.words(3))
267
359
  }
268
360
  };
269
361
  };
@@ -273,8 +365,8 @@ const contentRelationship$1 = (config = {}) => {
273
365
  return {
274
366
  type: prismicT.CustomTypeModelFieldType.Link,
275
367
  config: {
276
- label: changeCase.capitalCase(faker.company.bsNoun()),
277
- placeholder: changeCase.sentenceCase(faker.lorem.words(3)),
368
+ label: changeCase.capitalCase(faker.word()),
369
+ placeholder: changeCase.sentenceCase(faker.words(3)),
278
370
  select: prismicT.CustomTypeModelLinkSelectType.Document,
279
371
  customtypes: config.customTypeIDs,
280
372
  tags: config.tags
@@ -285,7 +377,7 @@ const contentRelationship$1 = (config = {}) => {
285
377
  const customType$1 = (config = {}) => {
286
378
  var _a, _b;
287
379
  const faker = createFaker(config.seed);
288
- let label = config.label || changeCase.capitalCase(faker.company.bsNoun());
380
+ let label = config.label || changeCase.capitalCase(faker.words(faker.range(1, 2)));
289
381
  let id = config.id || changeCase.snakeCase(label);
290
382
  if (config.id && !config.label) {
291
383
  label = changeCase.capitalCase(config.id);
@@ -301,8 +393,8 @@ const customType$1 = (config = {}) => {
301
393
  return {
302
394
  id,
303
395
  label,
304
- status: (_a = config.status) != null ? _a : faker.datatype.boolean(),
305
- repeatable: (_b = config.repeatable) != null ? _b : faker.datatype.boolean(),
396
+ status: (_a = config.status) != null ? _a : faker.boolean(),
397
+ repeatable: (_b = config.repeatable) != null ? _b : faker.boolean(),
306
398
  json
307
399
  };
308
400
  };
@@ -312,8 +404,8 @@ const date$1 = (config = {}) => {
312
404
  return {
313
405
  type: prismicT.CustomTypeModelFieldType.Date,
314
406
  config: {
315
- label: changeCase.capitalCase(faker.company.bsNoun()),
316
- placeholder: changeCase.sentenceCase(faker.lorem.words(3))
407
+ label: changeCase.capitalCase(faker.word()),
408
+ placeholder: changeCase.sentenceCase(faker.words(3))
317
409
  }
318
410
  };
319
411
  };
@@ -323,8 +415,8 @@ const embed$2 = (config = {}) => {
323
415
  return {
324
416
  type: prismicT.CustomTypeModelFieldType.Embed,
325
417
  config: {
326
- label: changeCase.capitalCase(faker.company.bsNoun()),
327
- placeholder: changeCase.sentenceCase(faker.lorem.words(3))
418
+ label: changeCase.capitalCase(faker.word()),
419
+ placeholder: changeCase.sentenceCase(faker.words(3))
328
420
  }
329
421
  };
330
422
  };
@@ -334,7 +426,7 @@ const geoPoint$1 = (config = {}) => {
334
426
  return {
335
427
  type: prismicT.CustomTypeModelFieldType.GeoPoint,
336
428
  config: {
337
- label: changeCase.capitalCase(faker.company.bsNoun())
429
+ label: changeCase.capitalCase(faker.word())
338
430
  }
339
431
  };
340
432
  };
@@ -344,7 +436,7 @@ const group$1 = (config = {}) => {
344
436
  return {
345
437
  type: prismicT.CustomTypeModelFieldType.Group,
346
438
  config: {
347
- label: changeCase.capitalCase(faker.company.bsNoun()),
439
+ label: changeCase.capitalCase(faker.word()),
348
440
  fields: config.fields || {}
349
441
  }
350
442
  };
@@ -355,17 +447,17 @@ const image$2 = (config = {}) => {
355
447
  const thumbnails = (config.thumbnailNames || []).map((name) => {
356
448
  return {
357
449
  name,
358
- width: faker.datatype.number({ min: 500, max: 2e3 }),
359
- height: faker.datatype.number({ min: 500, max: 2e3 })
450
+ width: faker.range(500, 2e3),
451
+ height: faker.range(500, 2e3)
360
452
  };
361
453
  });
362
454
  return {
363
455
  type: prismicT.CustomTypeModelFieldType.Image,
364
456
  config: {
365
- label: changeCase.capitalCase(faker.company.bsNoun()),
457
+ label: changeCase.capitalCase(faker.word()),
366
458
  constraint: {
367
- width: config.withConstraint ? faker.datatype.number({ min: 500, max: 2e3 }) : null,
368
- height: config.withConstraint ? faker.datatype.number({ min: 500, max: 2e3 }) : null
459
+ width: config.withConstraint ? faker.range(500, 2e3) : null,
460
+ height: config.withConstraint ? faker.range(500, 2e3) : null
369
461
  },
370
462
  thumbnails
371
463
  }
@@ -377,8 +469,8 @@ const integrationFields$1 = (config = {}) => {
377
469
  return {
378
470
  type: prismicT.CustomTypeModelFieldType.IntegrationFields,
379
471
  config: {
380
- label: changeCase.capitalCase(faker.company.bsNoun()),
381
- catalog: config.catalog || changeCase.snakeCase(faker.lorem.words(4))
472
+ label: changeCase.capitalCase(faker.word()),
473
+ catalog: config.catalog || changeCase.snakeCase(faker.words(2))
382
474
  }
383
475
  };
384
476
  };
@@ -388,8 +480,8 @@ const keyText$1 = (config = {}) => {
388
480
  return {
389
481
  type: prismicT.CustomTypeModelFieldType.Text,
390
482
  config: {
391
- label: changeCase.capitalCase(faker.company.bsNoun()),
392
- placeholder: changeCase.sentenceCase(faker.lorem.words(3))
483
+ label: changeCase.capitalCase(faker.word()),
484
+ placeholder: changeCase.sentenceCase(faker.words(3))
393
485
  }
394
486
  };
395
487
  };
@@ -399,10 +491,10 @@ const link$1 = (config = {}) => {
399
491
  return {
400
492
  type: prismicT.CustomTypeModelFieldType.Link,
401
493
  config: {
402
- label: changeCase.capitalCase(faker.company.bsNoun()),
403
- placeholder: changeCase.sentenceCase(faker.lorem.words(3)),
494
+ label: changeCase.capitalCase(faker.word()),
495
+ placeholder: changeCase.sentenceCase(faker.words(3)),
404
496
  select: null,
405
- allowTargetBlank: ("allowTargetBlank" in config ? config.allowTargetBlank : faker.datatype.boolean()) || void 0
497
+ allowTargetBlank: ("allowTargetBlank" in config ? config.allowTargetBlank : faker.boolean()) || void 0
406
498
  }
407
499
  };
408
500
  };
@@ -412,8 +504,8 @@ const linkToMedia$1 = (config = {}) => {
412
504
  return {
413
505
  type: prismicT.CustomTypeModelFieldType.Link,
414
506
  config: {
415
- label: changeCase.capitalCase(faker.company.bsNoun()),
416
- placeholder: changeCase.sentenceCase(faker.lorem.words(3)),
507
+ label: changeCase.capitalCase(faker.word()),
508
+ placeholder: changeCase.sentenceCase(faker.words(3)),
417
509
  select: prismicT.CustomTypeModelLinkSelectType.Media
418
510
  }
419
511
  };
@@ -424,8 +516,8 @@ const number$1 = (config = {}) => {
424
516
  return {
425
517
  type: prismicT.CustomTypeModelFieldType.Number,
426
518
  config: {
427
- label: changeCase.capitalCase(faker.company.bsNoun()),
428
- placeholder: changeCase.sentenceCase(faker.lorem.words(3))
519
+ label: changeCase.capitalCase(faker.word()),
520
+ placeholder: changeCase.sentenceCase(faker.words(3))
429
521
  }
430
522
  };
431
523
  };
@@ -433,7 +525,7 @@ const number$1 = (config = {}) => {
433
525
  const richText$1 = (config = {}) => {
434
526
  var _a;
435
527
  const faker = createFaker(config.seed);
436
- const blockTypes = faker.random.arrayElements([
528
+ const blockTypes = faker.randomElements([
437
529
  prismicT.RichTextNodeType.heading1,
438
530
  prismicT.RichTextNodeType.heading2,
439
531
  prismicT.RichTextNodeType.heading3,
@@ -450,13 +542,13 @@ const richText$1 = (config = {}) => {
450
542
  prismicT.RichTextNodeType.embed,
451
543
  prismicT.RichTextNodeType.hyperlink
452
544
  ]).join(",");
453
- const blockTypeConfig = ((_a = config.withMultipleBlocks) != null ? _a : faker.datatype.boolean()) ? { multi: blockTypes } : { single: blockTypes };
545
+ const blockTypeConfig = ((_a = config.withMultipleBlocks) != null ? _a : faker.boolean()) ? { multi: blockTypes } : { single: blockTypes };
454
546
  return {
455
547
  type: prismicT.CustomTypeModelFieldType.StructuredText,
456
548
  config: {
457
- label: changeCase.capitalCase(faker.company.bsNoun()),
458
- placeholder: changeCase.sentenceCase(faker.lorem.words(3)),
459
- allowTargetBlank: faker.datatype.boolean() ? true : void 0,
549
+ label: changeCase.capitalCase(faker.word()),
550
+ placeholder: changeCase.sentenceCase(faker.words(3)),
551
+ allowTargetBlank: faker.boolean() ? true : void 0,
460
552
  ...blockTypeConfig
461
553
  }
462
554
  };
@@ -467,8 +559,8 @@ const select$1 = (config = {}) => {
467
559
  return {
468
560
  type: prismicT.CustomTypeModelFieldType.Select,
469
561
  config: {
470
- label: changeCase.capitalCase(faker.company.bsNoun()),
471
- placeholder: changeCase.sentenceCase(faker.lorem.words(3)),
562
+ label: changeCase.capitalCase(faker.word()),
563
+ placeholder: changeCase.sentenceCase(faker.words(3)),
472
564
  options: config.options || [],
473
565
  default_value: config.defaultValue || void 0
474
566
  }
@@ -477,7 +569,7 @@ const select$1 = (config = {}) => {
477
569
 
478
570
  const sharedSlice$1 = (config = {}) => {
479
571
  const faker = createFaker(config.seed);
480
- let name = config.name || changeCase.capitalCase(faker.company.bsNoun());
572
+ let name = config.name || changeCase.capitalCase(faker.words(faker.range(1, 2)));
481
573
  let id = config.id || changeCase.snakeCase(name);
482
574
  if (config.id && !config.name) {
483
575
  name = changeCase.pascalCase(config.id);
@@ -488,7 +580,7 @@ const sharedSlice$1 = (config = {}) => {
488
580
  type: prismicT.CustomTypeModelSliceType.SharedSlice,
489
581
  id,
490
582
  name,
491
- description: faker.lorem.sentence(),
583
+ description: changeCase.sentenceCase(faker.words(faker.range(5, 10))),
492
584
  variations: config.variations || []
493
585
  };
494
586
  };
@@ -501,7 +593,7 @@ const sharedSliceChoice = () => {
501
593
 
502
594
  const sharedSliceVariation$1 = (config = {}) => {
503
595
  const faker = createFaker(config.seed);
504
- let name = config.name || changeCase.capitalCase(faker.company.bsNoun());
596
+ let name = config.name || changeCase.capitalCase(faker.words(faker.range(1, 2)));
505
597
  let id = config.id || changeCase.snakeCase(name);
506
598
  if (config.id && !config.name) {
507
599
  name = changeCase.pascalCase(config.id);
@@ -511,9 +603,9 @@ const sharedSliceVariation$1 = (config = {}) => {
511
603
  return {
512
604
  id,
513
605
  name,
514
- description: faker.lorem.sentence(),
515
- docURL: faker.internet.url(),
516
- version: faker.git.shortSha(),
606
+ description: changeCase.sentenceCase(faker.words(faker.range(5, 10))),
607
+ docURL: faker.url(),
608
+ version: faker.hash(7),
517
609
  primary: config.primaryFields || {},
518
610
  items: config.itemsFields || {}
519
611
  };
@@ -523,10 +615,10 @@ const slice$1 = (config = {}) => {
523
615
  const faker = createFaker(config.seed);
524
616
  return {
525
617
  type: prismicT.CustomTypeModelSliceType.Slice,
526
- icon: changeCase.snakeCase(faker.company.bsNoun()),
527
- display: faker.datatype.boolean() ? prismicT.CustomTypeModelSliceDisplay.Grid : prismicT.CustomTypeModelSliceDisplay.List,
528
- fieldset: changeCase.capitalCase(faker.lorem.words()),
529
- description: faker.lorem.sentence(),
618
+ icon: changeCase.snakeCase(faker.word()),
619
+ display: faker.boolean() ? prismicT.CustomTypeModelSliceDisplay.Grid : prismicT.CustomTypeModelSliceDisplay.List,
620
+ fieldset: changeCase.capitalCase(faker.words(2)),
621
+ description: changeCase.sentenceCase(faker.words(faker.range(5, 10))),
530
622
  repeat: config.repeatFields || {},
531
623
  "non-repeat": config.nonRepeatFields || {}
532
624
  };
@@ -555,15 +647,15 @@ const timestamp$1 = (config = {}) => {
555
647
  return {
556
648
  type: prismicT.CustomTypeModelFieldType.Timestamp,
557
649
  config: {
558
- label: changeCase.capitalCase(faker.company.bsNoun()),
559
- placeholder: changeCase.sentenceCase(faker.lorem.words(3))
650
+ label: changeCase.capitalCase(faker.word()),
651
+ placeholder: changeCase.sentenceCase(faker.words(3))
560
652
  }
561
653
  };
562
654
  };
563
655
 
564
656
  const title$1 = (config = {}) => {
565
657
  const faker = createFaker(config.seed);
566
- const single = faker.random.arrayElements([
658
+ const single = faker.randomElements([
567
659
  "heading1",
568
660
  "heading2",
569
661
  "heading3",
@@ -574,10 +666,10 @@ const title$1 = (config = {}) => {
574
666
  return {
575
667
  type: prismicT.CustomTypeModelFieldType.StructuredText,
576
668
  config: {
577
- label: changeCase.capitalCase(faker.company.bsNoun()),
578
- placeholder: changeCase.sentenceCase(faker.lorem.words(3)),
669
+ label: changeCase.capitalCase(faker.word()),
670
+ placeholder: changeCase.sentenceCase(faker.words(3)),
579
671
  single,
580
- allowTargetBlank: faker.datatype.boolean() ? true : void 0
672
+ allowTargetBlank: faker.boolean() || void 0
581
673
  }
582
674
  };
583
675
  };
@@ -587,15 +679,15 @@ const uid$1 = (config = {}) => {
587
679
  return {
588
680
  type: prismicT.CustomTypeModelFieldType.UID,
589
681
  config: {
590
- label: changeCase.capitalCase(faker.company.bsNoun()),
591
- placeholder: changeCase.sentenceCase(faker.lorem.words(3))
682
+ label: changeCase.capitalCase(faker.word()),
683
+ placeholder: changeCase.sentenceCase(faker.words(3))
592
684
  }
593
685
  };
594
686
  };
595
687
 
596
688
  const generateFieldId = (config) => {
597
689
  const faker = createFaker(config.seed);
598
- return changeCase.snakeCase(faker.lorem.words(faker.datatype.number({ min: 1, max: 3 })));
690
+ return changeCase.snakeCase(faker.words(faker.range(1, 3)));
599
691
  };
600
692
 
601
693
  const mockModelFns = {
@@ -619,7 +711,7 @@ const mockModelFns = {
619
711
  const buildMockGroupFieldMap = (config = {}) => {
620
712
  const faker = createFaker(config.seed);
621
713
  const fields = {};
622
- const fieldTypes = faker.random.arrayElements(Object.keys(mockModelFns));
714
+ const fieldTypes = faker.randomElements(Object.keys(mockModelFns));
623
715
  for (const fieldType of fieldTypes) {
624
716
  const fieldId = generateFieldId({ seed: config.seed });
625
717
  const mockModelFn = mockModelFns[fieldType];
@@ -659,9 +751,23 @@ var index$2 = /*#__PURE__*/Object.freeze({
659
751
 
660
752
  const timestamp = (config = {}) => {
661
753
  const faker = createFaker(config.seed);
662
- const after = config.after || faker.date.past(20, new Date("2021-03-07")).toISOString().split("T")[0];
663
- const before = config.before || faker.date.future(20, new Date("2021-03-07")).toISOString().split("T")[0];
664
- return config.state === "empty" ? null : faker.date.between(after, before).toISOString();
754
+ if (config.state === "empty") {
755
+ return null;
756
+ } else {
757
+ let date;
758
+ const after = config.after ? new Date(config.after.toISOString().split("T")[0]) : void 0;
759
+ const before = config.before ? new Date(config.before.toISOString().split("T")[0]) : void 0;
760
+ if (after && before) {
761
+ date = faker.dateBetween(after, before);
762
+ } else if (after) {
763
+ date = faker.dateAfter(after);
764
+ } else if (before) {
765
+ date = faker.dateBefore(before);
766
+ } else {
767
+ date = faker.date();
768
+ }
769
+ return date.toISOString();
770
+ }
665
771
  };
666
772
 
667
773
  const buildAlternativeLanguage = (config) => {
@@ -692,11 +798,11 @@ const customType = (config = {}) => {
692
798
  }));
693
799
  return {
694
800
  type: model.id,
695
- id: faker.git.shortSha(),
696
- uid: hasUID ? changeCase.snakeCase(faker.lorem.words(2)) : null,
697
- url: withURL ? faker.internet.url() : null,
698
- href: faker.internet.url(),
699
- lang: faker.lorem.word(),
801
+ id: faker.hash(7),
802
+ uid: hasUID ? changeCase.snakeCase(faker.words(faker.range(1, 3))) : null,
803
+ url: withURL ? faker.url() : null,
804
+ href: faker.url(),
805
+ lang: faker.word(),
700
806
  tags: generateTags({ seed: config.seed }),
701
807
  slugs: [],
702
808
  linked_documents: [],
@@ -713,7 +819,7 @@ const customType = (config = {}) => {
713
819
 
714
820
  const color = (config = {}) => {
715
821
  const faker = createFaker(config.seed);
716
- return config.state === "empty" ? null : faker.internet.color().toUpperCase();
822
+ return config.state === "empty" ? null : faker.hexColor().toUpperCase();
717
823
  };
718
824
 
719
825
  const buildContentRelationshipField = (config) => {
@@ -732,7 +838,7 @@ const buildContentRelationshipField = (config) => {
732
838
 
733
839
  const generateCustomTypeId = (config) => {
734
840
  const faker = createFaker(config.seed);
735
- return changeCase.snakeCase(faker.company.bsNoun());
841
+ return changeCase.snakeCase(faker.words(faker.range(1, 3)));
736
842
  };
737
843
 
738
844
  const contentRelationship = (config = {}) => {
@@ -755,11 +861,11 @@ const contentRelationship = (config = {}) => {
755
861
  }) : [
756
862
  {
757
863
  ...customType({ seed: config.seed }),
758
- type: model.config.customtypes ? faker.random.arrayElement(model.config.customtypes) : generateCustomTypeId({ seed: config.seed }),
759
- tags: model.config.tags ? faker.random.arrayElements(model.config.tags) : generateTags({ seed: config.seed })
864
+ type: model.config.customtypes ? faker.randomElement(model.config.customtypes) : generateCustomTypeId({ seed: config.seed }),
865
+ tags: model.config.tags ? faker.randomElements(model.config.tags) : generateTags({ seed: config.seed })
760
866
  }
761
867
  ];
762
- const document = faker.random.arrayElement(linkableDocuments);
868
+ const document = faker.randomElement(linkableDocuments);
763
869
  if (!document) {
764
870
  throw new Error("A linkable document could not be found.");
765
871
  }
@@ -779,100 +885,115 @@ const date = (config = {}) => {
779
885
  };
780
886
 
781
887
  const buildEmbedField = (config) => {
888
+ var _a;
782
889
  const faker = createFaker(config.seed);
783
890
  return {
784
- type: faker.datatype.boolean() ? prismicT.EmbedType.Link : prismicT.EmbedType.Rich,
785
- url: config.embedData.url,
786
- html: config.embedData.html,
787
- title: changeCase.capitalCase(faker.lorem.words(3)),
788
- version: faker.datatype.number({ min: 1, max: 3, precision: 10 }).toString(),
789
- cache_age: faker.datatype.number(),
790
- embed_url: config.embedData.embed_url,
791
- author_url: faker.internet.url(),
792
- author_name: faker.company.companyName(),
793
- provider_name: faker.company.companyName(),
794
- thumbnail_width: config.embedData.thumbnail_width,
795
- thumbnail_height: config.embedData.thumbnail_height,
796
- thumbnail_url: config.embedData.thumbnail_url,
797
- width: faker.datatype.number({ min: 200, max: 500 }),
798
- height: faker.datatype.number({ min: 200, max: 500 })
891
+ embed_url: (_a = config.url) != null ? _a : faker.url(),
892
+ html: `<div>embed html</div>`,
893
+ ...config.data
799
894
  };
800
895
  };
801
896
 
802
897
  const dataSet$1 = [
803
898
  {
804
- url: "https://www.youtube.com/watch?v=fiOwHYFkUz0",
899
+ version: "1.0",
900
+ type: "video",
805
901
  embed_url: "https://www.youtube.com/embed/fiOwHYFkUz0",
806
902
  thumbnail_url: "https://i.ytimg.com/vi/fiOwHYFkUz0/hqdefault.jpg",
807
903
  thumbnail_height: 360,
808
904
  thumbnail_width: 480,
809
- html: '<iframe width="200" height="113" src="https://www.youtube.com/embed/fiOwHYFkUz0?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'
905
+ html: '<iframe width="200" height="113" src="https://www.youtube.com/embed/fiOwHYFkUz0?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
906
+ width: 200,
907
+ height: 113
810
908
  },
811
909
  {
812
- url: "https://www.youtube.com/watch?v=c-ATzcy6VkI",
910
+ version: "1.0",
911
+ type: "video",
813
912
  embed_url: "https://www.youtube.com/embed/c-ATzcy6VkI",
814
913
  thumbnail_url: "https://i.ytimg.com/vi/c-ATzcy6VkI/hqdefault.jpg",
815
914
  thumbnail_height: 360,
816
915
  thumbnail_width: 480,
817
- html: '<iframe width="200" height="113" src="https://www.youtube.com/embed/c-ATzcy6VkI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'
916
+ html: '<iframe width="200" height="113" src="https://www.youtube.com/embed/c-ATzcy6VkI?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
917
+ width: 200,
918
+ height: 113
818
919
  },
819
920
  {
820
- url: "https://www.youtube.com/watch?v=iewZXv94XGY",
921
+ version: "1.0",
922
+ type: "video",
821
923
  embed_url: "https://www.youtube.com/watch?v=fiOwHYFkUz0",
822
924
  thumbnail_url: "https://i.ytimg.com/vi/iewZXv94XGY/hqdefault.jpg",
823
925
  thumbnail_height: 360,
824
926
  thumbnail_width: 480,
825
- html: '<iframe width="200" height="113" src="https://www.youtube.com/embed/iewZXv94XGY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'
927
+ html: '<iframe width="200" height="113" src="https://www.youtube.com/embed/iewZXv94XGY?feature=oembed" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>',
928
+ width: 200,
929
+ height: 113
826
930
  },
827
931
  {
828
- url: "https://twitter.com/prismicio/status/1356293316158095361",
829
- embed_url: "https://www.youtube.com/watch?v=iewZXv94XGY",
932
+ version: "1.0",
933
+ type: "rich",
934
+ embed_url: "https://twitter.com/prismicio/status/1356293316158095361",
830
935
  thumbnail_url: null,
831
936
  thumbnail_height: null,
832
937
  thumbnail_width: null,
833
- html: '<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Gatsby is a popular choice for Prismic users and we work hard on delivering a CMS that plays to its strengths.<br><br>But, what makes <a href="https://twitter.com/GatsbyJS?ref_src=twsrc%5Etfw">@GatsbyJS</a> so popular?<br><br>Here are some of <a href="https://twitter.com/mxstbr?ref_src=twsrc%5Etfw">@mxstbr</a>&#39;s thoughts on Gatsby&#39;s success and how they&#39;re improving developer experience.<a href="https://t.co/ZjCPvsWWUD">https://t.co/ZjCPvsWWUD</a> <a href="https://t.co/EQqzJpeNKl">pic.twitter.com/EQqzJpeNKl</a></p>&mdash; Prismic (@prismicio) <a href="https://twitter.com/prismicio/status/1356293316158095361?ref_src=twsrc%5Etfw">February 1, 2021</a></blockquote>\n<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>\n'
938
+ html: '<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Gatsby is a popular choice for Prismic users and we work hard on delivering a CMS that plays to its strengths.<br><br>But, what makes <a href="https://twitter.com/GatsbyJS?ref_src=twsrc%5Etfw">@GatsbyJS</a> so popular?<br><br>Here are some of <a href="https://twitter.com/mxstbr?ref_src=twsrc%5Etfw">@mxstbr</a>&#39;s thoughts on Gatsby&#39;s success and how they&#39;re improving developer experience.<a href="https://t.co/ZjCPvsWWUD">https://t.co/ZjCPvsWWUD</a> <a href="https://t.co/EQqzJpeNKl">pic.twitter.com/EQqzJpeNKl</a></p>&mdash; Prismic (@prismicio) <a href="https://twitter.com/prismicio/status/1356293316158095361?ref_src=twsrc%5Etfw">February 1, 2021</a></blockquote>\n<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>\n',
939
+ width: 200,
940
+ height: 113
834
941
  },
835
942
  {
836
- url: "https://twitter.com/timbenniks/status/1304146886832594944",
943
+ type: "rich",
944
+ version: "1.0",
945
+ embed_url: "https://twitter.com/timbenniks/status/1304146886832594944",
837
946
  thumbnail_url: null,
838
947
  thumbnail_width: null,
839
948
  thumbnail_height: null,
840
- embed_url: "https://twitter.com/timbenniks/status/1304146886832594944",
841
- html: '<blockquote class="twitter-tweet"><p lang="en" dir="ltr">I\u2019ve been diving deep on <a href="https://twitter.com/prismicio?ref_src=twsrc%5Etfw">@prismicio</a> <a href="https://twitter.com/hashtag/slicemachine?src=hash&amp;ref_src=twsrc%5Etfw">#slicemachine</a> today. I made all my own components and I used custom slices. It works like a charm with <a href="https://twitter.com/nuxt_js?ref_src=twsrc%5Etfw">@nuxt_js</a>. Also: I\u2019m coding with this view. <a href="https://t.co/F0I8X9gz39">pic.twitter.com/F0I8X9gz39</a></p>&mdash; Tim Benniks (@timbenniks) <a href="https://twitter.com/timbenniks/status/1304146886832594944?ref_src=twsrc%5Etfw">September 10, 2020</a></blockquote>\n<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>\n'
949
+ html: '<blockquote class="twitter-tweet"><p lang="en" dir="ltr">I\u2019ve been diving deep on <a href="https://twitter.com/prismicio?ref_src=twsrc%5Etfw">@prismicio</a> <a href="https://twitter.com/hashtag/slicemachine?src=hash&amp;ref_src=twsrc%5Etfw">#slicemachine</a> today. I made all my own components and I used custom slices. It works like a charm with <a href="https://twitter.com/nuxt_js?ref_src=twsrc%5Etfw">@nuxt_js</a>. Also: I\u2019m coding with this view. <a href="https://t.co/F0I8X9gz39">pic.twitter.com/F0I8X9gz39</a></p>&mdash; Tim Benniks (@timbenniks) <a href="https://twitter.com/timbenniks/status/1304146886832594944?ref_src=twsrc%5Etfw">September 10, 2020</a></blockquote>\n<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>\n',
950
+ width: 200,
951
+ height: 113
842
952
  },
843
953
  {
844
- url: "https://twitter.com/prismicio/status/1354112310252630016",
954
+ version: "1.0",
955
+ type: "rich",
956
+ embed_url: "https://twitter.com/prismicio/status/1354112310252630016",
845
957
  thumbnail_url: null,
846
958
  thumbnail_width: null,
847
959
  thumbnail_height: null,
848
- embed_url: "https://twitter.com/prismicio/status/1354112310252630016",
849
- html: '<blockquote class="twitter-tweet"><p lang="en" dir="ltr">We&#39;re launching a new <a href="https://twitter.com/hashtag/SliceContest?src=hash&amp;ref_src=twsrc%5Etfw">#SliceContest</a> tomorrow along with Slice Machine upgrades.<br><br>Want to know more? Join us at tomorrow&#39;s Product Meet-up\u{1F447}<a href="https://t.co/prYSypiAvB">https://t.co/prYSypiAvB</a><br><br>We can&#39;t tell you any further details for now, but here&#39;s a sneak peek at the prizes\u{1F440} <a href="https://t.co/fV1eoGlEBh">pic.twitter.com/fV1eoGlEBh</a></p>&mdash; Prismic (@prismicio) <a href="https://twitter.com/prismicio/status/1354112310252630016?ref_src=twsrc%5Etfw">January 26, 2021</a></blockquote>\n<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>\n'
960
+ html: '<blockquote class="twitter-tweet"><p lang="en" dir="ltr">We&#39;re launching a new <a href="https://twitter.com/hashtag/SliceContest?src=hash&amp;ref_src=twsrc%5Etfw">#SliceContest</a> tomorrow along with Slice Machine upgrades.<br><br>Want to know more? Join us at tomorrow&#39;s Product Meet-up\u{1F447}<a href="https://t.co/prYSypiAvB">https://t.co/prYSypiAvB</a><br><br>We can&#39;t tell you any further details for now, but here&#39;s a sneak peek at the prizes\u{1F440} <a href="https://t.co/fV1eoGlEBh">pic.twitter.com/fV1eoGlEBh</a></p>&mdash; Prismic (@prismicio) <a href="https://twitter.com/prismicio/status/1354112310252630016?ref_src=twsrc%5Etfw">January 26, 2021</a></blockquote>\n<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>\n',
961
+ width: 200,
962
+ height: 113
850
963
  },
851
964
  {
852
- url: "https://twitter.com/prismicio/status/1354835716430319617",
965
+ version: "1.0",
966
+ type: "rich",
967
+ embed_url: "https://twitter.com/prismicio/status/1354835716430319617",
853
968
  thumbnail_url: null,
854
969
  thumbnail_width: null,
855
970
  thumbnail_height: null,
856
- embed_url: "https://twitter.com/prismicio/status/1354835716430319617",
857
- html: '<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Does anyone want to create a wildly popular website for discussing &#39;Wall Street Bets&#39; using Prismic?<br><br>It may or may not have to look a lot like <a href="https://twitter.com/hashtag/reddit?src=hash&amp;ref_src=twsrc%5Etfw">#reddit</a> and we won&#39;t make it private.<br><br>Just asking for some friends...</p>&mdash; Prismic (@prismicio) <a href="https://twitter.com/prismicio/status/1354835716430319617?ref_src=twsrc%5Etfw">January 28, 2021</a></blockquote>\n<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>\n'
971
+ html: '<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Does anyone want to create a wildly popular website for discussing &#39;Wall Street Bets&#39; using Prismic?<br><br>It may or may not have to look a lot like <a href="https://twitter.com/hashtag/reddit?src=hash&amp;ref_src=twsrc%5Etfw">#reddit</a> and we won&#39;t make it private.<br><br>Just asking for some friends...</p>&mdash; Prismic (@prismicio) <a href="https://twitter.com/prismicio/status/1354835716430319617?ref_src=twsrc%5Etfw">January 28, 2021</a></blockquote>\n<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"><\/script>\n',
972
+ width: 200,
973
+ height: 113
858
974
  }
859
975
  ];
860
976
  const getMockEmbedData = (config) => {
861
977
  const faker = createFaker(config.seed);
862
- return faker.random.arrayElement(dataSet$1);
978
+ return faker.randomElement(dataSet$1);
863
979
  };
864
980
 
865
981
  const embed$1 = (config = {}) => {
866
- const embedData = getMockEmbedData({ seed: config.seed });
867
- return config.state === "empty" ? {} : buildEmbedField({ seed: config.seed, embedData });
982
+ var _a, _b, _c;
983
+ const data = (_a = config.data) != null ? _a : getMockEmbedData({ seed: config.seed });
984
+ return config.state === "empty" ? {} : buildEmbedField({
985
+ seed: config.seed,
986
+ url: (_b = config.url) != null ? _b : "embed_url" in data ? data.embed_url : void 0,
987
+ html: (_c = config.html) != null ? _c : "html" in data ? data.html : void 0,
988
+ data
989
+ });
868
990
  };
869
991
 
870
992
  const geoPoint = (config = {}) => {
871
993
  const faker = createFaker(config.seed);
872
- const coordinates = faker.address.nearbyGPSCoordinate();
873
994
  return config.state === "empty" ? {} : {
874
- longitude: Number.parseFloat(coordinates[0]),
875
- latitude: Number.parseFloat(coordinates[1])
995
+ longitude: faker.rangeFloat(-180, 180),
996
+ latitude: faker.rangeFloat(-90, 90)
876
997
  };
877
998
  };
878
999
 
@@ -883,10 +1004,7 @@ const group = (config = {}) => {
883
1004
  } else {
884
1005
  const faker = createFaker(config.seed);
885
1006
  const model = config.model || group$1({ seed: config.seed });
886
- const itemsCount = (_a = config.itemsCount) != null ? _a : faker.datatype.number({
887
- min: 1,
888
- max: 6
889
- });
1007
+ const itemsCount = (_a = config.itemsCount) != null ? _a : faker.range(1, 6);
890
1008
  return Array(itemsCount).fill(void 0).map(() => {
891
1009
  return valueForModelMap({
892
1010
  seed: config.seed,
@@ -919,8 +1037,8 @@ const buildImageFieldImage = (config) => {
919
1037
  return {
920
1038
  url: url.toString(),
921
1039
  dimensions,
922
- alt: faker.lorem.sentence(),
923
- copyright: faker.lorem.sentence()
1040
+ alt: changeCase.sentenceCase(faker.words(faker.range(5, 15))),
1041
+ copyright: changeCase.sentenceCase(faker.words(faker.range(5, 15)))
924
1042
  };
925
1043
  }
926
1044
  };
@@ -1009,7 +1127,7 @@ const dataSet = [
1009
1127
  ];
1010
1128
  const getMockImageData = (config) => {
1011
1129
  const faker = createFaker(config.seed);
1012
- return faker.random.arrayElement(dataSet);
1130
+ return faker.randomElement(dataSet);
1013
1131
  };
1014
1132
 
1015
1133
  const image$1 = (config = {}) => {
@@ -1039,18 +1157,18 @@ const integrationFields = (config = {}) => {
1039
1157
  const faker = createFaker(config.seed);
1040
1158
  const imageData = getMockImageData({ seed: config.seed });
1041
1159
  return config.state === "empty" ? null : {
1042
- id: faker.git.shortSha(),
1043
- title: changeCase.capitalCase(faker.lorem.words(3)),
1044
- description: faker.lorem.sentence(),
1160
+ id: faker.hash(7),
1161
+ title: changeCase.capitalCase(faker.words(faker.range(1, 3))),
1162
+ description: changeCase.sentenceCase(faker.words(faker.range(5, 10))),
1045
1163
  image_url: imageData.url,
1046
- last_update: faker.date.past(20, new Date("2021-03-07")).getTime(),
1164
+ last_update: faker.date().getTime(),
1047
1165
  blob: config.data
1048
1166
  };
1049
1167
  };
1050
1168
 
1051
1169
  const keyText = (config = {}) => {
1052
1170
  const faker = createFaker(config.seed);
1053
- return config.state === "empty" ? null : changeCase.sentenceCase(faker.lorem.words(3));
1171
+ return config.state === "empty" ? null : changeCase.sentenceCase(faker.words(3));
1054
1172
  };
1055
1173
 
1056
1174
  const linkToMedia = (config = {}) => {
@@ -1062,12 +1180,12 @@ const linkToMedia = (config = {}) => {
1062
1180
  } else {
1063
1181
  return {
1064
1182
  link_type: prismicT.LinkType.Media,
1065
- name: faker.system.commonFileName(),
1066
- kind: faker.system.commonFileType(),
1067
- url: faker.internet.url(),
1068
- size: faker.datatype.number().toString(),
1069
- height: faker.datatype.number().toString(),
1070
- width: faker.datatype.number().toString()
1183
+ name: `${changeCase.snakeCase(faker.words(faker.range(1, 2)))}.example`,
1184
+ kind: changeCase.snakeCase(faker.word()),
1185
+ url: faker.url(),
1186
+ size: faker.range(500, 3e3).toString(),
1187
+ height: faker.range(500, 3e3).toString(),
1188
+ width: faker.range(500, 3e3).toString()
1071
1189
  };
1072
1190
  }
1073
1191
  };
@@ -1075,7 +1193,7 @@ const linkToMedia = (config = {}) => {
1075
1193
  const link = (config = {}) => {
1076
1194
  var _a;
1077
1195
  const faker = createFaker(config.seed);
1078
- const type = config.type || faker.random.arrayElement([
1196
+ const type = config.type || faker.randomElement([
1079
1197
  prismicT.LinkType.Web,
1080
1198
  prismicT.LinkType.Document,
1081
1199
  prismicT.LinkType.Media
@@ -1104,8 +1222,8 @@ const link = (config = {}) => {
1104
1222
  const model = config.model || link$1({ seed: config.seed });
1105
1223
  return {
1106
1224
  link_type: prismicT.LinkType.Web,
1107
- url: faker.internet.url(),
1108
- target: ((_a = config.withTargetBlank) != null ? _a : model.config.allowTargetBlank && faker.datatype.boolean()) ? "_blank" : void 0
1225
+ url: faker.url(),
1226
+ target: ((_a = config.withTargetBlank) != null ? _a : model.config.allowTargetBlank && faker.boolean()) ? "_blank" : void 0
1109
1227
  };
1110
1228
  }
1111
1229
  }
@@ -1114,7 +1232,7 @@ const link = (config = {}) => {
1114
1232
 
1115
1233
  const number = (config = {}) => {
1116
1234
  const faker = createFaker(config.seed);
1117
- return config.state === "empty" ? null : faker.datatype.number();
1235
+ return config.state === "empty" ? null : faker.range(1, 100);
1118
1236
  };
1119
1237
 
1120
1238
  const patterns$5 = {
@@ -1142,16 +1260,13 @@ const heading = (config = {}) => {
1142
1260
  prismicT.RichTextNodeType.heading5,
1143
1261
  prismicT.RichTextNodeType.heading6
1144
1262
  ].includes(type2));
1145
- const type = faker.random.arrayElement(types);
1263
+ const type = faker.randomElement(types);
1146
1264
  if (type) {
1147
- const patternKey = config.pattern || faker.random.arrayElement(Object.keys(patterns$5));
1265
+ const patternKey = config.pattern || faker.randomElement(Object.keys(patterns$5));
1148
1266
  const pattern = patterns$5[patternKey];
1149
1267
  return {
1150
1268
  type,
1151
- text: changeCase.capitalCase(faker.lorem.words(faker.datatype.number({
1152
- min: pattern.minWords,
1153
- max: pattern.maxWords
1154
- }))),
1269
+ text: changeCase.capitalCase(faker.words(faker.range(pattern.minWords, pattern.maxWords))),
1155
1270
  spans: []
1156
1271
  };
1157
1272
  } else {
@@ -1172,11 +1287,12 @@ const patterns$4 = {
1172
1287
  };
1173
1288
  const paragraph = (config = {}) => {
1174
1289
  const faker = createFaker(config.seed);
1175
- const patternKey = config.pattern || faker.random.arrayElement(Object.keys(patterns$4));
1290
+ const patternKey = config.pattern || faker.randomElement(Object.keys(patterns$4));
1176
1291
  const pattern = patterns$4[patternKey];
1292
+ const text = Array.from({ length: pattern.sentenceCount }, () => changeCase.sentenceCase(faker.words(faker.range(5, 15))) + ".").join(" ");
1177
1293
  return {
1178
1294
  type: prismicT.RichTextNodeType.paragraph,
1179
- text: faker.lorem.paragraph(pattern.sentenceCount),
1295
+ text,
1180
1296
  spans: []
1181
1297
  };
1182
1298
  };
@@ -1194,11 +1310,12 @@ const patterns$3 = {
1194
1310
  };
1195
1311
  const preformatted = (config = {}) => {
1196
1312
  const faker = createFaker(config.seed);
1197
- const patternKey = config.pattern || faker.random.arrayElement(Object.keys(patterns$3));
1313
+ const patternKey = config.pattern || faker.randomElement(Object.keys(patterns$3));
1198
1314
  const pattern = patterns$3[patternKey];
1315
+ const text = Array.from({ length: pattern.sentenceCount }, () => changeCase.sentenceCase(faker.words(faker.range(5, 15))) + ".").join(" ");
1199
1316
  return {
1200
1317
  type: prismicT.RichTextNodeType.preformatted,
1201
- text: faker.lorem.paragraph(pattern.sentenceCount),
1318
+ text,
1202
1319
  spans: []
1203
1320
  };
1204
1321
  };
@@ -1219,16 +1336,13 @@ const patterns$2 = {
1219
1336
  };
1220
1337
  const list = (config = {}) => {
1221
1338
  const faker = createFaker(config.seed);
1222
- const patternKey = config.pattern || faker.random.arrayElement(Object.keys(patterns$2));
1339
+ const patternKey = config.pattern || faker.randomElement(Object.keys(patterns$2));
1223
1340
  const pattern = patterns$2[patternKey];
1224
- const itemsCount = faker.datatype.number({
1225
- min: pattern.minItems,
1226
- max: pattern.maxItems
1227
- });
1341
+ const itemsCount = faker.range(pattern.minItems, pattern.maxItems);
1228
1342
  return Array(itemsCount).fill(void 0).map(() => {
1229
1343
  return {
1230
1344
  type: prismicT.RichTextNodeType.listItem,
1231
- text: faker.lorem.sentence(),
1345
+ text: changeCase.sentenceCase(faker.words(faker.range(5, 15))),
1232
1346
  spans: []
1233
1347
  };
1234
1348
  });
@@ -1250,16 +1364,13 @@ const patterns$1 = {
1250
1364
  };
1251
1365
  const oList = (config = {}) => {
1252
1366
  const faker = createFaker(config.seed);
1253
- const patternKey = config.pattern || faker.random.arrayElement(Object.keys(patterns$1));
1367
+ const patternKey = config.pattern || faker.randomElement(Object.keys(patterns$1));
1254
1368
  const pattern = patterns$1[patternKey];
1255
- const itemsCount = faker.datatype.number({
1256
- min: pattern.minItems,
1257
- max: pattern.maxItems
1258
- });
1369
+ const itemsCount = faker.range(pattern.minItems, pattern.maxItems);
1259
1370
  return Array(itemsCount).fill(void 0).map(() => {
1260
1371
  return {
1261
1372
  type: prismicT.RichTextNodeType.oListItem,
1262
- text: faker.lorem.sentence(),
1373
+ text: changeCase.sentenceCase(faker.words(faker.range(5, 15))),
1263
1374
  spans: []
1264
1375
  };
1265
1376
  });
@@ -1270,7 +1381,7 @@ const image = (config = {}) => {
1270
1381
  const imageField = buildImageFieldImage({
1271
1382
  seed: config.seed,
1272
1383
  imageData,
1273
- state: false
1384
+ state: "filled"
1274
1385
  });
1275
1386
  return {
1276
1387
  type: prismicT.RichTextNodeType.image,
@@ -1282,8 +1393,8 @@ const image = (config = {}) => {
1282
1393
  };
1283
1394
 
1284
1395
  const embed = (config = {}) => {
1285
- const embedData = getMockEmbedData({ seed: config.seed });
1286
- const embedField = buildEmbedField({ seed: config.seed, embedData });
1396
+ const data = getMockEmbedData({ seed: config.seed });
1397
+ const embedField = buildEmbedField({ seed: config.seed, data });
1287
1398
  return {
1288
1399
  type: prismicT.RichTextNodeType.embed,
1289
1400
  oembed: embedField
@@ -1327,14 +1438,11 @@ const richText = (config = {}) => {
1327
1438
  const supportsMultipleBlocks = "multi" in model.config;
1328
1439
  const types = ("multi" in model.config ? model.config.multi : model.config.single).split(",").filter((type) => Object.keys(generators).includes(type));
1329
1440
  if (types.length > 0) {
1330
- const patternKey = config.pattern || faker.random.arrayElement(Object.keys(patterns));
1441
+ const patternKey = config.pattern || faker.randomElement(Object.keys(patterns));
1331
1442
  const pattern = patterns[patternKey];
1332
- const blockCount = supportsMultipleBlocks ? faker.datatype.number({
1333
- min: pattern.blockCountMin,
1334
- max: pattern.blockCountMax
1335
- }) : 1;
1443
+ const blockCount = supportsMultipleBlocks ? faker.range(pattern.blockCountMin, pattern.blockCountMax) : 1;
1336
1444
  return Array(blockCount).fill(void 0).map(() => {
1337
- const type = faker.random.arrayElement(types);
1445
+ const type = faker.randomElement(types);
1338
1446
  const generator = generators[type];
1339
1447
  return generator({ seed: config.seed, model });
1340
1448
  }).flat().filter((block) => block !== void 0).slice(0, blockCount);
@@ -1350,7 +1458,7 @@ const select = (config = {}) => {
1350
1458
  if (config.state === "empty") {
1351
1459
  return null;
1352
1460
  } else {
1353
- return typeof defaultValue === "string" && faker.datatype.boolean() ? defaultValue : faker.random.arrayElement(model.config.options);
1461
+ return typeof defaultValue === "string" && faker.boolean() ? defaultValue : faker.randomElement(model.config.options);
1354
1462
  }
1355
1463
  };
1356
1464
 
@@ -1359,11 +1467,8 @@ const slice = (config = {}) => {
1359
1467
  const faker = createFaker(config.seed);
1360
1468
  const model = config.model || slice$1({ seed: config.seed });
1361
1469
  const sliceType = (_a = config.type) != null ? _a : generateFieldId({ seed: config.seed });
1362
- const sliceLabel = config.label !== void 0 ? config.label : changeCase.capitalCase(faker.company.bsNoun());
1363
- const itemsCount = Object.keys(model.repeat).length > 0 ? (_b = config.itemsCount) != null ? _b : faker.datatype.number({
1364
- min: 1,
1365
- max: 6
1366
- }) : 0;
1470
+ const sliceLabel = config.label !== void 0 ? config.label : changeCase.capitalCase(faker.words(faker.range(1, 2)));
1471
+ const itemsCount = Object.keys(model.repeat).length > 0 ? (_b = config.itemsCount) != null ? _b : faker.range(1, 6) : 0;
1367
1472
  return {
1368
1473
  slice_type: sliceType,
1369
1474
  slice_label: sliceLabel,
@@ -1387,15 +1492,12 @@ const sharedSliceVariation = (config = {}) => {
1387
1492
  const faker = createFaker(config.seed);
1388
1493
  const model = config.model || sharedSliceVariation$1({ seed: config.seed });
1389
1494
  const sliceType = (_a = config.type) != null ? _a : generateFieldId({ seed: config.seed });
1390
- const itemsCount = Object.keys(model.items).length > 0 ? (_b = config.itemsCount) != null ? _b : faker.datatype.number({
1391
- min: 1,
1392
- max: 6
1393
- }) : 0;
1495
+ const itemsCount = Object.keys(model.items).length > 0 ? (_b = config.itemsCount) != null ? _b : faker.range(1, 6) : 0;
1394
1496
  return {
1395
1497
  slice_type: sliceType,
1396
1498
  slice_label: null,
1397
1499
  variation: model.id,
1398
- version: faker.git.shortSha(),
1500
+ version: faker.hash(7),
1399
1501
  primary: valueForModelMap({
1400
1502
  seed: config.seed,
1401
1503
  map: model.primary,
@@ -1414,7 +1516,7 @@ const sharedSliceVariation = (config = {}) => {
1414
1516
  const sharedSlice = (config = {}) => {
1415
1517
  const faker = createFaker(config.seed);
1416
1518
  const model = config.model || sharedSlice$1({ seed: config.seed });
1417
- const variationModel = faker.random.arrayElement(model.variations);
1519
+ const variationModel = faker.randomElement(model.variations);
1418
1520
  return sharedSliceVariation({
1419
1521
  seed: config.seed,
1420
1522
  model: variationModel,
@@ -1433,16 +1535,13 @@ const sliceZone = (config = {}) => {
1433
1535
  const faker = createFaker(config.seed);
1434
1536
  const model = config.model || sliceZone$1({ seed: config.seed });
1435
1537
  if (Object.keys(model.config.choices).length > 0) {
1436
- const itemsCount = (_a = config.itemsCount) != null ? _a : faker.datatype.number({
1437
- min: 1,
1438
- max: 6
1439
- });
1538
+ const itemsCount = (_a = config.itemsCount) != null ? _a : faker.range(1, 6);
1440
1539
  return Array(itemsCount).fill(void 0).map(() => {
1441
1540
  var _a2;
1442
1541
  const choices = Object.entries(model.config.choices);
1443
- const [choiceType, choiceModel] = faker.random.arrayElement(choices);
1542
+ const [choiceType, choiceModel] = faker.randomElement(choices);
1444
1543
  const choiceLabels = model.config.labels[choiceType] || [];
1445
- const choiceLabel = faker.random.arrayElement(choiceLabels);
1544
+ const choiceLabel = faker.randomElement(choiceLabels);
1446
1545
  switch (choiceModel.type) {
1447
1546
  case prismicT.CustomTypeModelSliceType.Slice: {
1448
1547
  return slice({
@@ -1489,7 +1588,7 @@ const title = (config = {}) => {
1489
1588
 
1490
1589
  const uid = (config = {}) => {
1491
1590
  const faker = createFaker(config.seed);
1492
- return changeCase.snakeCase(faker.lorem.words(2));
1591
+ return changeCase.snakeCase(faker.words(faker.range(1, 3)));
1493
1592
  };
1494
1593
 
1495
1594
  var index$1 = /*#__PURE__*/Object.freeze({
@@ -1524,10 +1623,10 @@ const ref = (config = {}) => {
1524
1623
  var _a;
1525
1624
  const faker = createFaker(config.seed);
1526
1625
  const value = {
1527
- id: faker.git.shortSha(),
1528
- ref: faker.git.shortSha(),
1626
+ id: faker.hash(16),
1627
+ ref: faker.hash(16),
1529
1628
  isMasterRef: (_a = config.isMasterRef) != null ? _a : false,
1530
- label: config.isMasterRef ? "Master" : changeCase.capitalCase(faker.company.bsNoun())
1629
+ label: config.isMasterRef ? "Master" : changeCase.capitalCase(faker.words(faker.range(1, 3)))
1531
1630
  };
1532
1631
  if (config.isScheduled) {
1533
1632
  value.scheduledAt = timestamp({ seed: config.seed });
@@ -1550,8 +1649,8 @@ const repository = (config = {}) => {
1550
1649
  types,
1551
1650
  languages: [
1552
1651
  {
1553
- id: faker.lorem.word(),
1554
- name: changeCase.capitalCase(faker.lorem.word())
1652
+ id: faker.word(),
1653
+ name: changeCase.capitalCase(faker.word())
1555
1654
  }
1556
1655
  ],
1557
1656
  tags: generateTags({
@@ -1561,11 +1660,11 @@ const repository = (config = {}) => {
1561
1660
  }),
1562
1661
  forms: {},
1563
1662
  license: "All Rights Reserved",
1564
- version: faker.git.shortSha(),
1663
+ version: faker.hash(7),
1565
1664
  bookmarks: {},
1566
1665
  experiments: {},
1567
- oauth_token: faker.internet.url(),
1568
- oauth_initiate: faker.internet.url()
1666
+ oauth_token: faker.url(),
1667
+ oauth_initiate: faker.url()
1569
1668
  };
1570
1669
  };
1571
1670
 
@@ -1579,8 +1678,8 @@ const query = (config = {}) => {
1579
1678
  const results = documents.slice((page - 1) * pageSize, page * pageSize);
1580
1679
  return {
1581
1680
  page,
1582
- next_page: page < totalPages ? faker.internet.url() : null,
1583
- prev_page: page > 1 ? faker.internet.url() : null,
1681
+ next_page: page < totalPages ? faker.url() : null,
1682
+ prev_page: page > 1 ? faker.url() : null,
1584
1683
  total_pages: totalPages,
1585
1684
  results_size: results.length,
1586
1685
  results_per_page: pageSize,