@schmock/faker 2.3.0 → 2.4.0

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 (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -0
  3. package/dist/constants.d.ts +82 -1
  4. package/dist/constants.d.ts.map +1 -1
  5. package/dist/field-name-matcher.d.ts +19 -0
  6. package/dist/field-name-matcher.d.ts.map +1 -1
  7. package/dist/index.d.ts +3 -0
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +4 -1
  10. package/dist/jsf-config.d.ts +19 -4
  11. package/dist/jsf-config.d.ts.map +1 -1
  12. package/dist/output-limits.d.ts +3 -0
  13. package/dist/output-limits.d.ts.map +1 -0
  14. package/dist/overrides.d.ts +2 -1
  15. package/dist/overrides.d.ts.map +1 -1
  16. package/dist/schema-children.d.ts +14 -0
  17. package/dist/schema-children.d.ts.map +1 -0
  18. package/dist/schema-enhancement.d.ts +1 -0
  19. package/dist/schema-enhancement.d.ts.map +1 -1
  20. package/dist/validation.d.ts +24 -5
  21. package/dist/validation.d.ts.map +1 -1
  22. package/package.json +21 -7
  23. package/dist/constants.js +0 -8
  24. package/dist/field-mappings.js +0 -1114
  25. package/dist/field-name-matcher.js +0 -148
  26. package/dist/jsf-config.js +0 -117
  27. package/dist/overrides.js +0 -137
  28. package/dist/schema-enhancement.js +0 -104
  29. package/dist/test-utils.d.ts +0 -57
  30. package/dist/test-utils.d.ts.map +0 -1
  31. package/dist/test-utils.js +0 -284
  32. package/dist/validation.js +0 -300
  33. package/src/advanced-features.test.ts +0 -912
  34. package/src/audit-faker-args.test.ts +0 -97
  35. package/src/constants.d.ts.map +0 -1
  36. package/src/constants.ts +0 -9
  37. package/src/data-quality.test.ts +0 -415
  38. package/src/error-handling.test.ts +0 -504
  39. package/src/field-mappings.test.ts +0 -351
  40. package/src/field-mappings.ts +0 -1148
  41. package/src/field-name-matcher.test.ts +0 -292
  42. package/src/field-name-matcher.ts +0 -187
  43. package/src/index.d.ts.map +0 -1
  44. package/src/index.test.ts +0 -1320
  45. package/src/index.ts +0 -185
  46. package/src/integration.test.ts +0 -634
  47. package/src/jsf-config.d.ts.map +0 -1
  48. package/src/jsf-config.test.ts +0 -65
  49. package/src/jsf-config.ts +0 -156
  50. package/src/overrides.d.ts.map +0 -1
  51. package/src/overrides.property.test.ts +0 -172
  52. package/src/overrides.test.ts +0 -38
  53. package/src/overrides.ts +0 -179
  54. package/src/performance.test.ts +0 -441
  55. package/src/plugin-integration.test.ts +0 -575
  56. package/src/post-process.test.ts +0 -177
  57. package/src/real-world.test.ts +0 -636
  58. package/src/schema-enhancement.d.ts.map +0 -1
  59. package/src/schema-enhancement.test.ts +0 -222
  60. package/src/schema-enhancement.ts +0 -144
  61. package/src/steps/deterministic-seeds.steps.ts +0 -112
  62. package/src/steps/faker-plugin.steps.ts +0 -301
  63. package/src/test-utils.ts +0 -385
  64. package/src/validation.d.ts.map +0 -1
  65. package/src/validation.ts +0 -417
@@ -1,1114 +0,0 @@
1
- // ── Identity & Auth ─────────────────────────────────────────────────
2
- const identity = [
3
- {
4
- keywords: ["email"],
5
- fakerMethod: "internet.email",
6
- schemaType: "string",
7
- minScore: 0.6,
8
- format: "email",
9
- },
10
- {
11
- keywords: ["username", "user_name", "login", "handle"],
12
- fakerMethod: "internet.username",
13
- schemaType: "string",
14
- minScore: 0.6,
15
- },
16
- {
17
- keywords: ["password", "passwd", "secret"],
18
- fakerMethod: "internet.password",
19
- schemaType: "string",
20
- minScore: 0.6,
21
- },
22
- {
23
- keywords: ["token", "api_key", "apikey", "access_token", "refresh_token"],
24
- fakerMethod: "string.alphanumeric",
25
- schemaType: "string",
26
- minScore: 0.8,
27
- },
28
- ];
29
- // ── Person ──────────────────────────────────────────────────────────
30
- const person = [
31
- {
32
- keywords: ["first_name", "firstname", "given_name", "forename"],
33
- fakerMethod: "person.firstName",
34
- schemaType: "string",
35
- minScore: 0.6,
36
- },
37
- {
38
- keywords: ["last_name", "lastname", "surname", "family_name"],
39
- fakerMethod: "person.lastName",
40
- schemaType: "string",
41
- minScore: 0.6,
42
- },
43
- {
44
- keywords: [
45
- "full_name",
46
- "fullname",
47
- "display_name",
48
- "displayname",
49
- "full_name",
50
- ],
51
- fakerMethod: "person.fullName",
52
- schemaType: "string",
53
- minScore: 0.6,
54
- },
55
- {
56
- keywords: ["name"],
57
- fakerMethod: "person.fullName",
58
- schemaType: "string",
59
- minScore: 0.6,
60
- },
61
- {
62
- keywords: ["middle_name", "middlename"],
63
- fakerMethod: "person.middleName",
64
- schemaType: "string",
65
- minScore: 0.8,
66
- },
67
- {
68
- keywords: ["prefix", "honorific", "salutation"],
69
- fakerMethod: "person.prefix",
70
- schemaType: "string",
71
- minScore: 0.8,
72
- },
73
- {
74
- keywords: ["suffix"],
75
- fakerMethod: "person.suffix",
76
- schemaType: "string",
77
- minScore: 0.9,
78
- },
79
- {
80
- keywords: ["gender", "sex"],
81
- fakerMethod: "person.sex",
82
- schemaType: "string",
83
- minScore: 0.8,
84
- },
85
- {
86
- keywords: ["bio", "biography"],
87
- fakerMethod: "lorem.paragraph",
88
- schemaType: "string",
89
- minScore: 0.8,
90
- },
91
- {
92
- keywords: [
93
- "job_title",
94
- "jobtitle",
95
- "position",
96
- "occupation",
97
- "job",
98
- "role",
99
- ],
100
- fakerMethod: "person.jobTitle",
101
- schemaType: "string",
102
- minScore: 0.6,
103
- },
104
- {
105
- keywords: ["job_area", "department", "division", "team"],
106
- fakerMethod: "person.jobArea",
107
- schemaType: "string",
108
- minScore: 0.8,
109
- },
110
- {
111
- keywords: ["zodiac", "zodiac_sign"],
112
- fakerMethod: "person.zodiacSign",
113
- schemaType: "string",
114
- minScore: 0.9,
115
- },
116
- ];
117
- // ── Contact ─────────────────────────────────────────────────────────
118
- const contact = [
119
- {
120
- keywords: [
121
- "phone",
122
- "mobile",
123
- "cell",
124
- "tel",
125
- "telephone",
126
- "cellphone",
127
- "fax",
128
- ],
129
- fakerMethod: "phone.number",
130
- schemaType: "string",
131
- minScore: 0.6,
132
- },
133
- {
134
- keywords: ["imei"],
135
- fakerMethod: "phone.imei",
136
- schemaType: "string",
137
- minScore: 0.9,
138
- },
139
- ];
140
- // ── Address/Location ────────────────────────────────────────────────
141
- const address = [
142
- {
143
- keywords: ["street", "street_address"],
144
- fakerMethod: "location.streetAddress",
145
- schemaType: "string",
146
- minScore: 0.6,
147
- },
148
- {
149
- keywords: ["address", "mailing_address", "postal_address"],
150
- fakerMethod: "location.streetAddress",
151
- schemaType: "string",
152
- minScore: 0.6,
153
- },
154
- {
155
- keywords: ["city", "town"],
156
- fakerMethod: "location.city",
157
- schemaType: "string",
158
- minScore: 0.6,
159
- },
160
- {
161
- keywords: ["state", "province", "region"],
162
- fakerMethod: "location.state",
163
- schemaType: "string",
164
- minScore: 0.8,
165
- },
166
- {
167
- keywords: ["country"],
168
- fakerMethod: "location.country",
169
- schemaType: "string",
170
- minScore: 0.8,
171
- },
172
- {
173
- keywords: ["country_code", "countrycode"],
174
- fakerMethod: "location.countryCode",
175
- schemaType: "string",
176
- minScore: 0.8,
177
- },
178
- {
179
- keywords: ["county"],
180
- fakerMethod: "location.county",
181
- schemaType: "string",
182
- minScore: 0.9,
183
- },
184
- {
185
- keywords: ["continent"],
186
- fakerMethod: "location.continent",
187
- schemaType: "string",
188
- minScore: 0.9,
189
- },
190
- {
191
- keywords: ["zip", "zipcode", "zip_code", "postal", "postal_code"],
192
- fakerMethod: "location.zipCode",
193
- schemaType: "string",
194
- minScore: 0.6,
195
- },
196
- {
197
- keywords: ["latitude", "lat"],
198
- fakerMethod: "location.latitude",
199
- schemaType: "number",
200
- minScore: 0.6,
201
- },
202
- {
203
- keywords: ["longitude", "lng", "lon", "long"],
204
- fakerMethod: "location.longitude",
205
- schemaType: "number",
206
- minScore: 0.6,
207
- },
208
- {
209
- keywords: ["timezone", "time_zone", "tz"],
210
- fakerMethod: "location.timeZone",
211
- schemaType: "string",
212
- minScore: 0.8,
213
- },
214
- {
215
- keywords: ["building_number"],
216
- fakerMethod: "location.buildingNumber",
217
- schemaType: "string",
218
- minScore: 0.9,
219
- },
220
- ];
221
- // ── Internet/Network ────────────────────────────────────────────────
222
- const internet = [
223
- {
224
- keywords: ["url", "website", "link", "href", "homepage", "webpage"],
225
- fakerMethod: "internet.url",
226
- schemaType: "string",
227
- minScore: 0.6,
228
- },
229
- {
230
- keywords: [
231
- "avatar",
232
- "photo_url",
233
- "profile_image",
234
- "image_url",
235
- "picture",
236
- "thumbnail",
237
- "icon",
238
- ],
239
- fakerMethod: "image.avatar",
240
- schemaType: "string",
241
- minScore: 0.6,
242
- },
243
- {
244
- keywords: ["domain", "hostname", "domain_name"],
245
- fakerMethod: "internet.domainName",
246
- schemaType: "string",
247
- minScore: 0.8,
248
- },
249
- {
250
- keywords: ["ip", "ip_address", "ipaddress", "ipv4"],
251
- fakerMethod: "internet.ipv4",
252
- schemaType: "string",
253
- minScore: 0.8,
254
- },
255
- {
256
- keywords: ["ipv6"],
257
- fakerMethod: "internet.ipv6",
258
- schemaType: "string",
259
- minScore: 0.9,
260
- },
261
- {
262
- keywords: ["mac", "mac_address"],
263
- fakerMethod: "internet.mac",
264
- schemaType: "string",
265
- minScore: 0.9,
266
- },
267
- {
268
- keywords: ["user_agent", "useragent"],
269
- fakerMethod: "internet.userAgent",
270
- schemaType: "string",
271
- minScore: 0.9,
272
- },
273
- {
274
- keywords: ["port"],
275
- fakerMethod: "internet.port",
276
- schemaType: "number",
277
- minScore: 0.9,
278
- },
279
- {
280
- keywords: ["protocol"],
281
- fakerMethod: "internet.protocol",
282
- schemaType: "string",
283
- minScore: 0.9,
284
- },
285
- ];
286
- // ── IDs & Identifiers ──────────────────────────────────────────────
287
- const ids = [
288
- {
289
- keywords: ["uuid", "guid"],
290
- fakerMethod: "string.uuid",
291
- schemaType: "string",
292
- minScore: 0.6,
293
- },
294
- {
295
- keywords: ["sku"],
296
- fakerMethod: "string.alphanumeric",
297
- schemaType: "string",
298
- minScore: 0.9,
299
- },
300
- {
301
- keywords: ["slug"],
302
- fakerMethod: "lorem.slug",
303
- schemaType: "string",
304
- minScore: 0.8,
305
- },
306
- {
307
- keywords: ["isbn"],
308
- fakerMethod: "commerce.isbn",
309
- schemaType: "string",
310
- minScore: 0.9,
311
- },
312
- {
313
- keywords: ["vin"],
314
- fakerMethod: "vehicle.vin",
315
- schemaType: "string",
316
- minScore: 0.9,
317
- },
318
- {
319
- keywords: ["iban"],
320
- fakerMethod: "finance.iban",
321
- schemaType: "string",
322
- minScore: 0.9,
323
- },
324
- {
325
- keywords: ["bic", "swift"],
326
- fakerMethod: "finance.bic",
327
- schemaType: "string",
328
- minScore: 0.9,
329
- },
330
- {
331
- keywords: ["ssn", "social_security"],
332
- fakerMethod: "string.numeric",
333
- schemaType: "string",
334
- minScore: 0.9,
335
- },
336
- ];
337
- // ── Text/Content ────────────────────────────────────────────────────
338
- const text = [
339
- {
340
- keywords: [
341
- "description",
342
- "desc",
343
- "summary",
344
- "overview",
345
- "about",
346
- "excerpt",
347
- ],
348
- fakerMethod: "lorem.paragraph",
349
- schemaType: "string",
350
- minScore: 0.6,
351
- },
352
- {
353
- keywords: ["content", "body", "text", "message"],
354
- fakerMethod: "lorem.paragraphs",
355
- schemaType: "string",
356
- minScore: 0.6,
357
- },
358
- {
359
- keywords: ["title", "heading", "subject", "headline"],
360
- fakerMethod: "lorem.sentence",
361
- schemaType: "string",
362
- minScore: 0.6,
363
- },
364
- {
365
- keywords: ["tag", "label", "category", "keyword"],
366
- fakerMethod: "lorem.word",
367
- schemaType: "string",
368
- minScore: 0.8,
369
- },
370
- {
371
- keywords: ["comment", "note", "remark", "feedback", "review"],
372
- fakerMethod: "lorem.sentence",
373
- schemaType: "string",
374
- minScore: 0.8,
375
- },
376
- {
377
- keywords: ["sentence"],
378
- fakerMethod: "lorem.sentence",
379
- schemaType: "string",
380
- minScore: 0.9,
381
- },
382
- {
383
- keywords: ["paragraph"],
384
- fakerMethod: "lorem.paragraph",
385
- schemaType: "string",
386
- minScore: 0.9,
387
- },
388
- {
389
- keywords: ["word"],
390
- fakerMethod: "lorem.word",
391
- schemaType: "string",
392
- minScore: 0.9,
393
- },
394
- ];
395
- // ── Business/Commerce ───────────────────────────────────────────────
396
- const business = [
397
- {
398
- keywords: [
399
- "company",
400
- "organization",
401
- "org",
402
- "employer",
403
- "brand",
404
- "operator",
405
- ],
406
- fakerMethod: "company.name",
407
- schemaType: "string",
408
- minScore: 0.6,
409
- },
410
- {
411
- keywords: ["product", "product_name", "item_name"],
412
- fakerMethod: "commerce.productName",
413
- schemaType: "string",
414
- minScore: 0.8,
415
- },
416
- {
417
- keywords: [
418
- "price",
419
- "amount",
420
- "cost",
421
- "fee",
422
- "salary",
423
- "wage",
424
- "total",
425
- "subtotal",
426
- "balance",
427
- "revenue",
428
- "income",
429
- ],
430
- fakerMethod: "commerce.price",
431
- minScore: 0.6,
432
- },
433
- {
434
- keywords: ["currency", "currency_code"],
435
- fakerMethod: "finance.currencyCode",
436
- schemaType: "string",
437
- minScore: 0.8,
438
- },
439
- {
440
- keywords: ["currency_name"],
441
- fakerMethod: "finance.currencyName",
442
- schemaType: "string",
443
- minScore: 0.8,
444
- },
445
- {
446
- keywords: ["currency_symbol"],
447
- fakerMethod: "finance.currencySymbol",
448
- schemaType: "string",
449
- minScore: 0.8,
450
- },
451
- {
452
- keywords: ["account_number", "account_no"],
453
- fakerMethod: "finance.accountNumber",
454
- schemaType: "string",
455
- minScore: 0.8,
456
- },
457
- {
458
- keywords: ["credit_card", "card_number"],
459
- fakerMethod: "finance.creditCardNumber",
460
- schemaType: "string",
461
- minScore: 0.8,
462
- },
463
- {
464
- keywords: ["cvv"],
465
- fakerMethod: "finance.creditCardCVV",
466
- schemaType: "string",
467
- minScore: 0.9,
468
- },
469
- {
470
- keywords: ["transaction_type"],
471
- fakerMethod: "finance.transactionType",
472
- schemaType: "string",
473
- minScore: 0.9,
474
- },
475
- ];
476
- // ── Date/Time ───────────────────────────────────────────────────────
477
- const dateTime = [
478
- {
479
- keywords: [
480
- "created_at",
481
- "createdat",
482
- "creation_date",
483
- "date_created",
484
- "createddate",
485
- ],
486
- fakerMethod: "date.recent",
487
- schemaType: "string",
488
- minScore: 0.6,
489
- format: "date-time",
490
- },
491
- {
492
- keywords: [
493
- "updated_at",
494
- "updatedat",
495
- "modified_at",
496
- "modifiedat",
497
- "date_updated",
498
- "last_modified",
499
- "date_modified",
500
- ],
501
- fakerMethod: "date.recent",
502
- schemaType: "string",
503
- minScore: 0.6,
504
- format: "date-time",
505
- },
506
- {
507
- keywords: ["deleted_at", "deletedat"],
508
- fakerMethod: "date.recent",
509
- schemaType: "string",
510
- minScore: 0.6,
511
- format: "date-time",
512
- },
513
- {
514
- keywords: ["published_at", "publishedat", "publish_date"],
515
- fakerMethod: "date.recent",
516
- schemaType: "string",
517
- minScore: 0.6,
518
- format: "date-time",
519
- },
520
- {
521
- keywords: ["expires_at", "expiresat", "expiration", "expiry"],
522
- fakerMethod: "date.future",
523
- schemaType: "string",
524
- minScore: 0.6,
525
- format: "date-time",
526
- },
527
- {
528
- keywords: ["birthday", "date_of_birth", "dob", "birthdate", "born"],
529
- fakerMethod: "date.birthdate",
530
- schemaType: "string",
531
- minScore: 0.8,
532
- },
533
- {
534
- keywords: ["start_date", "begin_date"],
535
- fakerMethod: "date.past",
536
- schemaType: "string",
537
- minScore: 0.8,
538
- },
539
- {
540
- keywords: ["end_date", "due_date", "deadline"],
541
- fakerMethod: "date.future",
542
- schemaType: "string",
543
- minScore: 0.8,
544
- },
545
- {
546
- keywords: ["timestamp", "ts"],
547
- fakerMethod: "date.recent",
548
- schemaType: "string",
549
- minScore: 0.8,
550
- },
551
- ];
552
- // ── Color ───────────────────────────────────────────────────────────
553
- const color = [
554
- {
555
- keywords: ["color", "colour"],
556
- fakerMethod: "color.human",
557
- schemaType: "string",
558
- minScore: 0.8,
559
- },
560
- {
561
- keywords: ["hex_color", "hexcolor"],
562
- fakerMethod: "color.rgb",
563
- schemaType: "string",
564
- minScore: 0.9,
565
- },
566
- ];
567
- // ── Numeric Semantics ───────────────────────────────────────────────
568
- const numeric = [
569
- {
570
- keywords: ["age"],
571
- fakerMethod: "number.int",
572
- schemaType: "number",
573
- minScore: 0.8,
574
- fakerArgs: { min: 18, max: 80 },
575
- },
576
- {
577
- keywords: ["rating", "score", "stars"],
578
- fakerMethod: "number.int",
579
- schemaType: "number",
580
- minScore: 0.8,
581
- fakerArgs: { min: 1, max: 5 },
582
- },
583
- {
584
- keywords: ["count", "quantity", "qty"],
585
- fakerMethod: "number.int",
586
- schemaType: "number",
587
- minScore: 0.8,
588
- fakerArgs: { min: 1, max: 100 },
589
- },
590
- {
591
- keywords: ["percentage", "percent"],
592
- fakerMethod: "number.int",
593
- schemaType: "number",
594
- minScore: 0.8,
595
- fakerArgs: { min: 0, max: 100 },
596
- },
597
- {
598
- keywords: ["weight"],
599
- fakerMethod: "number.float",
600
- schemaType: "number",
601
- minScore: 0.8,
602
- fakerArgs: { min: 0.1, max: 200 },
603
- },
604
- {
605
- keywords: ["height"],
606
- fakerMethod: "number.int",
607
- schemaType: "number",
608
- minScore: 0.8,
609
- fakerArgs: { min: 100, max: 220 },
610
- },
611
- {
612
- keywords: ["width", "length", "depth"],
613
- fakerMethod: "number.int",
614
- schemaType: "number",
615
- minScore: 0.8,
616
- fakerArgs: { min: 1, max: 1000 },
617
- },
618
- {
619
- keywords: ["priority", "order", "rank", "level"],
620
- fakerMethod: "number.int",
621
- schemaType: "number",
622
- minScore: 0.8,
623
- fakerArgs: { min: 1, max: 10 },
624
- },
625
- {
626
- keywords: ["version"],
627
- fakerMethod: "system.semver",
628
- schemaType: "string",
629
- minScore: 0.8,
630
- },
631
- ];
632
- // ── Boolean Semantics (weighted) ────────────────────────────────────
633
- const booleans = [
634
- {
635
- keywords: ["is_active", "isactive", "active", "enabled", "is_enabled"],
636
- fakerMethod: "datatype.boolean",
637
- schemaType: "boolean",
638
- minScore: 0.6,
639
- trueProbability: 0.9,
640
- },
641
- {
642
- keywords: ["is_deleted", "isdeleted", "deleted"],
643
- fakerMethod: "datatype.boolean",
644
- schemaType: "boolean",
645
- minScore: 0.6,
646
- trueProbability: 0.05,
647
- },
648
- {
649
- keywords: ["is_archived", "isarchived", "archived"],
650
- fakerMethod: "datatype.boolean",
651
- schemaType: "boolean",
652
- minScore: 0.6,
653
- trueProbability: 0.1,
654
- },
655
- {
656
- keywords: [
657
- "is_verified",
658
- "isverified",
659
- "verified",
660
- "confirmed",
661
- "is_confirmed",
662
- ],
663
- fakerMethod: "datatype.boolean",
664
- schemaType: "boolean",
665
- minScore: 0.6,
666
- trueProbability: 0.8,
667
- },
668
- {
669
- keywords: ["is_admin", "isadmin", "admin"],
670
- fakerMethod: "datatype.boolean",
671
- schemaType: "boolean",
672
- minScore: 0.6,
673
- trueProbability: 0.1,
674
- },
675
- {
676
- keywords: ["is_public", "ispublic", "public", "visible", "is_visible"],
677
- fakerMethod: "datatype.boolean",
678
- schemaType: "boolean",
679
- minScore: 0.6,
680
- trueProbability: 0.7,
681
- },
682
- {
683
- keywords: ["is_read", "isread", "read", "seen", "is_seen"],
684
- fakerMethod: "datatype.boolean",
685
- schemaType: "boolean",
686
- minScore: 0.6,
687
- trueProbability: 0.6,
688
- },
689
- {
690
- keywords: ["is_default", "isdefault"],
691
- fakerMethod: "datatype.boolean",
692
- schemaType: "boolean",
693
- minScore: 0.8,
694
- trueProbability: 0.1,
695
- },
696
- {
697
- keywords: ["is_required", "isrequired", "required", "mandatory"],
698
- fakerMethod: "datatype.boolean",
699
- schemaType: "boolean",
700
- minScore: 0.6,
701
- trueProbability: 0.5,
702
- },
703
- {
704
- keywords: ["is_featured", "isfeatured", "featured", "promoted"],
705
- fakerMethod: "datatype.boolean",
706
- schemaType: "boolean",
707
- minScore: 0.8,
708
- trueProbability: 0.15,
709
- },
710
- {
711
- keywords: ["available", "in_stock"],
712
- fakerMethod: "datatype.boolean",
713
- schemaType: "boolean",
714
- minScore: 0.8,
715
- trueProbability: 0.85,
716
- },
717
- ];
718
- // ── File/System ─────────────────────────────────────────────────────
719
- const fileSystem = [
720
- {
721
- keywords: ["filename", "file_name"],
722
- fakerMethod: "system.fileName",
723
- schemaType: "string",
724
- minScore: 0.8,
725
- },
726
- {
727
- keywords: [
728
- "file_type",
729
- "filetype",
730
- "mime_type",
731
- "mimetype",
732
- "content_type",
733
- ],
734
- fakerMethod: "system.mimeType",
735
- schemaType: "string",
736
- minScore: 0.8,
737
- },
738
- {
739
- keywords: ["file_ext", "extension"],
740
- fakerMethod: "system.fileExt",
741
- schemaType: "string",
742
- minScore: 0.9,
743
- },
744
- {
745
- keywords: ["file_path", "filepath", "path"],
746
- fakerMethod: "system.filePath",
747
- schemaType: "string",
748
- minScore: 0.9,
749
- },
750
- {
751
- keywords: ["cron", "cron_expression"],
752
- fakerMethod: "system.cron",
753
- schemaType: "string",
754
- minScore: 0.9,
755
- },
756
- {
757
- keywords: ["semver"],
758
- fakerMethod: "system.semver",
759
- schemaType: "string",
760
- minScore: 0.9,
761
- },
762
- ];
763
- // ── Airline (niche) ─────────────────────────────────────────────────
764
- const airline = [
765
- {
766
- keywords: ["aircraft_type", "airplane", "aircraft"],
767
- fakerMethod: "airline.aircraftType",
768
- schemaType: "string",
769
- minScore: 0.9,
770
- },
771
- {
772
- keywords: ["flight_number", "flight"],
773
- fakerMethod: "airline.flightNumber",
774
- schemaType: "string",
775
- minScore: 0.9,
776
- },
777
- {
778
- keywords: ["record_locator", "booking_ref", "pnr"],
779
- fakerMethod: "airline.recordLocator",
780
- schemaType: "string",
781
- minScore: 0.9,
782
- },
783
- {
784
- keywords: ["seat", "seat_number"],
785
- fakerMethod: "airline.seat",
786
- schemaType: "string",
787
- minScore: 0.9,
788
- },
789
- ];
790
- // ── Animal (niche) ──────────────────────────────────────────────────
791
- const animal = [
792
- {
793
- keywords: ["animal", "animal_type", "species"],
794
- fakerMethod: "animal.type",
795
- schemaType: "string",
796
- minScore: 0.9,
797
- },
798
- {
799
- keywords: ["pet_name"],
800
- fakerMethod: "animal.petName",
801
- schemaType: "string",
802
- minScore: 0.9,
803
- },
804
- {
805
- keywords: ["breed"],
806
- fakerMethod: "animal.dog",
807
- schemaType: "string",
808
- minScore: 0.9,
809
- },
810
- {
811
- keywords: ["bird"],
812
- fakerMethod: "animal.bird",
813
- schemaType: "string",
814
- minScore: 0.9,
815
- },
816
- {
817
- keywords: ["fish"],
818
- fakerMethod: "animal.fish",
819
- schemaType: "string",
820
- minScore: 0.9,
821
- },
822
- {
823
- keywords: ["horse"],
824
- fakerMethod: "animal.horse",
825
- schemaType: "string",
826
- minScore: 0.9,
827
- },
828
- {
829
- keywords: ["insect"],
830
- fakerMethod: "animal.insect",
831
- schemaType: "string",
832
- minScore: 0.9,
833
- },
834
- ];
835
- // ── Book (niche) ────────────────────────────────────────────────────
836
- const book = [
837
- {
838
- keywords: ["book_title"],
839
- fakerMethod: "book.title",
840
- schemaType: "string",
841
- minScore: 0.9,
842
- },
843
- {
844
- keywords: ["author", "book_author", "writer"],
845
- fakerMethod: "book.author",
846
- schemaType: "string",
847
- minScore: 0.9,
848
- },
849
- {
850
- keywords: ["genre", "book_genre"],
851
- fakerMethod: "book.genre",
852
- schemaType: "string",
853
- minScore: 0.9,
854
- },
855
- {
856
- keywords: ["publisher", "publishing_house"],
857
- fakerMethod: "book.publisher",
858
- schemaType: "string",
859
- minScore: 0.9,
860
- },
861
- {
862
- keywords: ["book_series", "series_name"],
863
- fakerMethod: "book.series",
864
- schemaType: "string",
865
- minScore: 0.9,
866
- },
867
- ];
868
- // ── Food (niche) ────────────────────────────────────────────────────
869
- const food = [
870
- {
871
- keywords: ["dish", "meal", "recipe_name"],
872
- fakerMethod: "food.dish",
873
- schemaType: "string",
874
- minScore: 0.9,
875
- },
876
- {
877
- keywords: ["ingredient"],
878
- fakerMethod: "food.ingredient",
879
- schemaType: "string",
880
- minScore: 0.9,
881
- },
882
- {
883
- keywords: ["spice"],
884
- fakerMethod: "food.spice",
885
- schemaType: "string",
886
- minScore: 0.9,
887
- },
888
- {
889
- keywords: ["fruit"],
890
- fakerMethod: "food.fruit",
891
- schemaType: "string",
892
- minScore: 0.9,
893
- },
894
- {
895
- keywords: ["vegetable"],
896
- fakerMethod: "food.vegetable",
897
- schemaType: "string",
898
- minScore: 0.9,
899
- },
900
- {
901
- keywords: ["meat"],
902
- fakerMethod: "food.meat",
903
- schemaType: "string",
904
- minScore: 0.9,
905
- },
906
- {
907
- keywords: ["food_description"],
908
- fakerMethod: "food.description",
909
- schemaType: "string",
910
- minScore: 0.9,
911
- },
912
- {
913
- keywords: ["ethnic_category", "cuisine"],
914
- fakerMethod: "food.ethnicCategory",
915
- schemaType: "string",
916
- minScore: 0.9,
917
- },
918
- ];
919
- // ── Music (niche) ───────────────────────────────────────────────────
920
- const music = [
921
- {
922
- keywords: ["song", "song_name", "track", "track_name"],
923
- fakerMethod: "music.songName",
924
- schemaType: "string",
925
- minScore: 0.9,
926
- },
927
- {
928
- keywords: ["album", "album_name"],
929
- fakerMethod: "music.album",
930
- schemaType: "string",
931
- minScore: 0.9,
932
- },
933
- {
934
- keywords: ["artist", "musician", "band"],
935
- fakerMethod: "music.artist",
936
- schemaType: "string",
937
- minScore: 0.9,
938
- },
939
- {
940
- keywords: ["music_genre"],
941
- fakerMethod: "music.genre",
942
- schemaType: "string",
943
- minScore: 0.9,
944
- },
945
- ];
946
- // ── Science (niche) ─────────────────────────────────────────────────
947
- const science = [];
948
- // ── Vehicle (niche) ─────────────────────────────────────────────────
949
- const vehicle = [
950
- {
951
- keywords: ["vehicle", "vehicle_name"],
952
- fakerMethod: "vehicle.vehicle",
953
- schemaType: "string",
954
- minScore: 0.9,
955
- },
956
- {
957
- keywords: ["vehicle_type"],
958
- fakerMethod: "vehicle.type",
959
- schemaType: "string",
960
- minScore: 0.9,
961
- },
962
- {
963
- keywords: ["vehicle_manufacturer", "car_make"],
964
- fakerMethod: "vehicle.manufacturer",
965
- schemaType: "string",
966
- minScore: 0.9,
967
- },
968
- {
969
- keywords: ["vehicle_model", "car_model"],
970
- fakerMethod: "vehicle.model",
971
- schemaType: "string",
972
- minScore: 0.9,
973
- },
974
- {
975
- keywords: ["fuel", "fuel_type"],
976
- fakerMethod: "vehicle.fuel",
977
- schemaType: "string",
978
- minScore: 0.9,
979
- },
980
- {
981
- keywords: ["bicycle"],
982
- fakerMethod: "vehicle.bicycle",
983
- schemaType: "string",
984
- minScore: 0.9,
985
- },
986
- {
987
- keywords: ["vehicle_color", "car_color"],
988
- fakerMethod: "vehicle.color",
989
- schemaType: "string",
990
- minScore: 0.9,
991
- },
992
- ];
993
- // ── Git/Dev (niche) ─────────────────────────────────────────────────
994
- const git = [
995
- {
996
- keywords: ["branch", "branch_name", "git_branch"],
997
- fakerMethod: "git.branch",
998
- schemaType: "string",
999
- minScore: 0.9,
1000
- },
1001
- {
1002
- keywords: ["commit_sha", "commit_hash", "sha"],
1003
- fakerMethod: "git.commitSha",
1004
- schemaType: "string",
1005
- minScore: 0.9,
1006
- },
1007
- {
1008
- keywords: ["commit_message"],
1009
- fakerMethod: "git.commitMessage",
1010
- schemaType: "string",
1011
- minScore: 0.9,
1012
- },
1013
- ];
1014
- // ── Database (niche) ────────────────────────────────────────────────
1015
- const database = [
1016
- {
1017
- keywords: ["db_column", "column_name"],
1018
- fakerMethod: "database.column",
1019
- schemaType: "string",
1020
- minScore: 0.9,
1021
- },
1022
- {
1023
- keywords: ["db_type", "column_type"],
1024
- fakerMethod: "database.type",
1025
- schemaType: "string",
1026
- minScore: 0.9,
1027
- },
1028
- {
1029
- keywords: ["db_engine", "database_engine"],
1030
- fakerMethod: "database.engine",
1031
- schemaType: "string",
1032
- minScore: 0.9,
1033
- },
1034
- {
1035
- keywords: ["collation"],
1036
- fakerMethod: "database.collation",
1037
- schemaType: "string",
1038
- minScore: 0.9,
1039
- },
1040
- {
1041
- keywords: ["mongodb_id", "object_id"],
1042
- fakerMethod: "database.mongodbObjectId",
1043
- schemaType: "string",
1044
- minScore: 0.9,
1045
- },
1046
- ];
1047
- // ── Hacker/Tech (niche) ────────────────────────────────────────────
1048
- const hacker = [
1049
- {
1050
- keywords: ["abbreviation", "tech_abbreviation"],
1051
- fakerMethod: "hacker.abbreviation",
1052
- schemaType: "string",
1053
- minScore: 0.9,
1054
- },
1055
- {
1056
- keywords: ["hacker_phrase", "tech_phrase"],
1057
- fakerMethod: "hacker.phrase",
1058
- schemaType: "string",
1059
- minScore: 0.9,
1060
- },
1061
- ];
1062
- // ── Word/Lorem (domain) ────────────────────────────────────────────
1063
- const word = [
1064
- {
1065
- keywords: ["adjective"],
1066
- fakerMethod: "word.adjective",
1067
- schemaType: "string",
1068
- minScore: 0.8,
1069
- },
1070
- {
1071
- keywords: ["adverb"],
1072
- fakerMethod: "word.adverb",
1073
- schemaType: "string",
1074
- minScore: 0.8,
1075
- },
1076
- {
1077
- keywords: ["noun"],
1078
- fakerMethod: "word.noun",
1079
- schemaType: "string",
1080
- minScore: 0.8,
1081
- },
1082
- {
1083
- keywords: ["verb"],
1084
- fakerMethod: "word.verb",
1085
- schemaType: "string",
1086
- minScore: 0.8,
1087
- },
1088
- ];
1089
- export const ALL_FIELD_MAPPINGS = [
1090
- ...identity,
1091
- ...person,
1092
- ...contact,
1093
- ...address,
1094
- ...internet,
1095
- ...ids,
1096
- ...text,
1097
- ...business,
1098
- ...dateTime,
1099
- ...color,
1100
- ...numeric,
1101
- ...booleans,
1102
- ...fileSystem,
1103
- ...airline,
1104
- ...animal,
1105
- ...book,
1106
- ...food,
1107
- ...music,
1108
- ...science,
1109
- ...vehicle,
1110
- ...git,
1111
- ...database,
1112
- ...hacker,
1113
- ...word,
1114
- ];