@schmock/faker 2.2.3 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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-mappings.d.ts.map +1 -1
  6. package/dist/field-name-matcher.d.ts +19 -0
  7. package/dist/field-name-matcher.d.ts.map +1 -1
  8. package/dist/index.d.ts +3 -0
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +4 -1
  11. package/dist/jsf-config.d.ts +27 -2
  12. package/dist/jsf-config.d.ts.map +1 -1
  13. package/dist/output-limits.d.ts +3 -0
  14. package/dist/output-limits.d.ts.map +1 -0
  15. package/dist/overrides.d.ts +2 -1
  16. package/dist/overrides.d.ts.map +1 -1
  17. package/dist/schema-children.d.ts +14 -0
  18. package/dist/schema-children.d.ts.map +1 -0
  19. package/dist/schema-enhancement.d.ts +1 -0
  20. package/dist/schema-enhancement.d.ts.map +1 -1
  21. package/dist/validation.d.ts +24 -5
  22. package/dist/validation.d.ts.map +1 -1
  23. package/package.json +19 -9
  24. package/dist/constants.js +0 -8
  25. package/dist/field-mappings.js +0 -1107
  26. package/dist/field-name-matcher.js +0 -149
  27. package/dist/jsf-config.js +0 -35
  28. package/dist/overrides.js +0 -131
  29. package/dist/schema-enhancement.js +0 -89
  30. package/dist/test-utils.d.ts +0 -57
  31. package/dist/test-utils.d.ts.map +0 -1
  32. package/dist/test-utils.js +0 -271
  33. package/dist/validation.js +0 -300
  34. package/src/advanced-features.test.ts +0 -912
  35. package/src/audit-faker-args.test.ts +0 -97
  36. package/src/constants.d.ts.map +0 -1
  37. package/src/constants.ts +0 -9
  38. package/src/data-quality.test.ts +0 -415
  39. package/src/error-handling.test.ts +0 -504
  40. package/src/field-mappings.test.ts +0 -351
  41. package/src/field-mappings.ts +0 -1141
  42. package/src/field-name-matcher.test.ts +0 -292
  43. package/src/field-name-matcher.ts +0 -188
  44. package/src/index.d.ts.map +0 -1
  45. package/src/index.test.ts +0 -1218
  46. package/src/index.ts +0 -168
  47. package/src/integration.test.ts +0 -634
  48. package/src/jsf-config.d.ts.map +0 -1
  49. package/src/jsf-config.ts +0 -48
  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 -176
  54. package/src/performance.test.ts +0 -494
  55. package/src/plugin-integration.test.ts +0 -575
  56. package/src/post-process.test.ts +0 -151
  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 -216
  60. package/src/schema-enhancement.ts +0 -128
  61. package/src/steps/deterministic-seeds.steps.ts +0 -35
  62. package/src/steps/faker-plugin.steps.ts +0 -109
  63. package/src/test-utils.ts +0 -365
  64. package/src/validation.d.ts.map +0 -1
  65. package/src/validation.ts +0 -417
@@ -1,1107 +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: ["company", "organization", "org", "employer", "brand"],
399
- fakerMethod: "company.name",
400
- schemaType: "string",
401
- minScore: 0.6,
402
- },
403
- {
404
- keywords: ["product", "product_name", "item_name"],
405
- fakerMethod: "commerce.productName",
406
- schemaType: "string",
407
- minScore: 0.8,
408
- },
409
- {
410
- keywords: [
411
- "price",
412
- "amount",
413
- "cost",
414
- "fee",
415
- "salary",
416
- "wage",
417
- "total",
418
- "subtotal",
419
- "balance",
420
- "revenue",
421
- "income",
422
- ],
423
- fakerMethod: "commerce.price",
424
- minScore: 0.6,
425
- },
426
- {
427
- keywords: ["currency", "currency_code"],
428
- fakerMethod: "finance.currencyCode",
429
- schemaType: "string",
430
- minScore: 0.8,
431
- },
432
- {
433
- keywords: ["currency_name"],
434
- fakerMethod: "finance.currencyName",
435
- schemaType: "string",
436
- minScore: 0.8,
437
- },
438
- {
439
- keywords: ["currency_symbol"],
440
- fakerMethod: "finance.currencySymbol",
441
- schemaType: "string",
442
- minScore: 0.8,
443
- },
444
- {
445
- keywords: ["account_number", "account_no"],
446
- fakerMethod: "finance.accountNumber",
447
- schemaType: "string",
448
- minScore: 0.8,
449
- },
450
- {
451
- keywords: ["credit_card", "card_number"],
452
- fakerMethod: "finance.creditCardNumber",
453
- schemaType: "string",
454
- minScore: 0.8,
455
- },
456
- {
457
- keywords: ["cvv"],
458
- fakerMethod: "finance.creditCardCVV",
459
- schemaType: "string",
460
- minScore: 0.9,
461
- },
462
- {
463
- keywords: ["transaction_type"],
464
- fakerMethod: "finance.transactionType",
465
- schemaType: "string",
466
- minScore: 0.9,
467
- },
468
- ];
469
- // ── Date/Time ───────────────────────────────────────────────────────
470
- const dateTime = [
471
- {
472
- keywords: [
473
- "created_at",
474
- "createdat",
475
- "creation_date",
476
- "date_created",
477
- "createddate",
478
- ],
479
- fakerMethod: "date.recent",
480
- schemaType: "string",
481
- minScore: 0.6,
482
- format: "date-time",
483
- },
484
- {
485
- keywords: [
486
- "updated_at",
487
- "updatedat",
488
- "modified_at",
489
- "modifiedat",
490
- "date_updated",
491
- "last_modified",
492
- "date_modified",
493
- ],
494
- fakerMethod: "date.recent",
495
- schemaType: "string",
496
- minScore: 0.6,
497
- format: "date-time",
498
- },
499
- {
500
- keywords: ["deleted_at", "deletedat"],
501
- fakerMethod: "date.recent",
502
- schemaType: "string",
503
- minScore: 0.6,
504
- format: "date-time",
505
- },
506
- {
507
- keywords: ["published_at", "publishedat", "publish_date"],
508
- fakerMethod: "date.recent",
509
- schemaType: "string",
510
- minScore: 0.6,
511
- format: "date-time",
512
- },
513
- {
514
- keywords: ["expires_at", "expiresat", "expiration", "expiry"],
515
- fakerMethod: "date.future",
516
- schemaType: "string",
517
- minScore: 0.6,
518
- format: "date-time",
519
- },
520
- {
521
- keywords: ["birthday", "date_of_birth", "dob", "birthdate", "born"],
522
- fakerMethod: "date.birthdate",
523
- schemaType: "string",
524
- minScore: 0.8,
525
- },
526
- {
527
- keywords: ["start_date", "begin_date"],
528
- fakerMethod: "date.past",
529
- schemaType: "string",
530
- minScore: 0.8,
531
- },
532
- {
533
- keywords: ["end_date", "due_date", "deadline"],
534
- fakerMethod: "date.future",
535
- schemaType: "string",
536
- minScore: 0.8,
537
- },
538
- {
539
- keywords: ["timestamp", "ts"],
540
- fakerMethod: "date.recent",
541
- schemaType: "string",
542
- minScore: 0.8,
543
- },
544
- ];
545
- // ── Color ───────────────────────────────────────────────────────────
546
- const color = [
547
- {
548
- keywords: ["color", "colour"],
549
- fakerMethod: "color.human",
550
- schemaType: "string",
551
- minScore: 0.8,
552
- },
553
- {
554
- keywords: ["hex_color", "hexcolor"],
555
- fakerMethod: "color.rgb",
556
- schemaType: "string",
557
- minScore: 0.9,
558
- },
559
- ];
560
- // ── Numeric Semantics ───────────────────────────────────────────────
561
- const numeric = [
562
- {
563
- keywords: ["age"],
564
- fakerMethod: "number.int",
565
- schemaType: "number",
566
- minScore: 0.8,
567
- fakerArgs: { min: 18, max: 80 },
568
- },
569
- {
570
- keywords: ["rating", "score", "stars"],
571
- fakerMethod: "number.int",
572
- schemaType: "number",
573
- minScore: 0.8,
574
- fakerArgs: { min: 1, max: 5 },
575
- },
576
- {
577
- keywords: ["count", "quantity", "qty"],
578
- fakerMethod: "number.int",
579
- schemaType: "number",
580
- minScore: 0.8,
581
- fakerArgs: { min: 1, max: 100 },
582
- },
583
- {
584
- keywords: ["percentage", "percent"],
585
- fakerMethod: "number.int",
586
- schemaType: "number",
587
- minScore: 0.8,
588
- fakerArgs: { min: 0, max: 100 },
589
- },
590
- {
591
- keywords: ["weight"],
592
- fakerMethod: "number.float",
593
- schemaType: "number",
594
- minScore: 0.8,
595
- fakerArgs: { min: 0.1, max: 200 },
596
- },
597
- {
598
- keywords: ["height"],
599
- fakerMethod: "number.int",
600
- schemaType: "number",
601
- minScore: 0.8,
602
- fakerArgs: { min: 100, max: 220 },
603
- },
604
- {
605
- keywords: ["width", "length", "depth"],
606
- fakerMethod: "number.int",
607
- schemaType: "number",
608
- minScore: 0.8,
609
- fakerArgs: { min: 1, max: 1000 },
610
- },
611
- {
612
- keywords: ["priority", "order", "rank", "level"],
613
- fakerMethod: "number.int",
614
- schemaType: "number",
615
- minScore: 0.8,
616
- fakerArgs: { min: 1, max: 10 },
617
- },
618
- {
619
- keywords: ["version"],
620
- fakerMethod: "system.semver",
621
- schemaType: "string",
622
- minScore: 0.8,
623
- },
624
- ];
625
- // ── Boolean Semantics (weighted) ────────────────────────────────────
626
- const booleans = [
627
- {
628
- keywords: ["is_active", "isactive", "active", "enabled", "is_enabled"],
629
- fakerMethod: "datatype.boolean",
630
- schemaType: "boolean",
631
- minScore: 0.6,
632
- trueProbability: 0.9,
633
- },
634
- {
635
- keywords: ["is_deleted", "isdeleted", "deleted"],
636
- fakerMethod: "datatype.boolean",
637
- schemaType: "boolean",
638
- minScore: 0.6,
639
- trueProbability: 0.05,
640
- },
641
- {
642
- keywords: ["is_archived", "isarchived", "archived"],
643
- fakerMethod: "datatype.boolean",
644
- schemaType: "boolean",
645
- minScore: 0.6,
646
- trueProbability: 0.1,
647
- },
648
- {
649
- keywords: [
650
- "is_verified",
651
- "isverified",
652
- "verified",
653
- "confirmed",
654
- "is_confirmed",
655
- ],
656
- fakerMethod: "datatype.boolean",
657
- schemaType: "boolean",
658
- minScore: 0.6,
659
- trueProbability: 0.8,
660
- },
661
- {
662
- keywords: ["is_admin", "isadmin", "admin"],
663
- fakerMethod: "datatype.boolean",
664
- schemaType: "boolean",
665
- minScore: 0.6,
666
- trueProbability: 0.1,
667
- },
668
- {
669
- keywords: ["is_public", "ispublic", "public", "visible", "is_visible"],
670
- fakerMethod: "datatype.boolean",
671
- schemaType: "boolean",
672
- minScore: 0.6,
673
- trueProbability: 0.7,
674
- },
675
- {
676
- keywords: ["is_read", "isread", "read", "seen", "is_seen"],
677
- fakerMethod: "datatype.boolean",
678
- schemaType: "boolean",
679
- minScore: 0.6,
680
- trueProbability: 0.6,
681
- },
682
- {
683
- keywords: ["is_default", "isdefault"],
684
- fakerMethod: "datatype.boolean",
685
- schemaType: "boolean",
686
- minScore: 0.8,
687
- trueProbability: 0.1,
688
- },
689
- {
690
- keywords: ["is_required", "isrequired", "required", "mandatory"],
691
- fakerMethod: "datatype.boolean",
692
- schemaType: "boolean",
693
- minScore: 0.6,
694
- trueProbability: 0.5,
695
- },
696
- {
697
- keywords: ["is_featured", "isfeatured", "featured", "promoted"],
698
- fakerMethod: "datatype.boolean",
699
- schemaType: "boolean",
700
- minScore: 0.8,
701
- trueProbability: 0.15,
702
- },
703
- {
704
- keywords: ["available", "in_stock"],
705
- fakerMethod: "datatype.boolean",
706
- schemaType: "boolean",
707
- minScore: 0.8,
708
- trueProbability: 0.85,
709
- },
710
- ];
711
- // ── File/System ─────────────────────────────────────────────────────
712
- const fileSystem = [
713
- {
714
- keywords: ["filename", "file_name"],
715
- fakerMethod: "system.fileName",
716
- schemaType: "string",
717
- minScore: 0.8,
718
- },
719
- {
720
- keywords: [
721
- "file_type",
722
- "filetype",
723
- "mime_type",
724
- "mimetype",
725
- "content_type",
726
- ],
727
- fakerMethod: "system.mimeType",
728
- schemaType: "string",
729
- minScore: 0.8,
730
- },
731
- {
732
- keywords: ["file_ext", "extension"],
733
- fakerMethod: "system.fileExt",
734
- schemaType: "string",
735
- minScore: 0.9,
736
- },
737
- {
738
- keywords: ["file_path", "filepath", "path"],
739
- fakerMethod: "system.filePath",
740
- schemaType: "string",
741
- minScore: 0.9,
742
- },
743
- {
744
- keywords: ["cron", "cron_expression"],
745
- fakerMethod: "system.cron",
746
- schemaType: "string",
747
- minScore: 0.9,
748
- },
749
- {
750
- keywords: ["semver"],
751
- fakerMethod: "system.semver",
752
- schemaType: "string",
753
- minScore: 0.9,
754
- },
755
- ];
756
- // ── Airline (niche) ─────────────────────────────────────────────────
757
- const airline = [
758
- {
759
- keywords: ["aircraft_type", "airplane", "aircraft"],
760
- fakerMethod: "airline.aircraftType",
761
- schemaType: "string",
762
- minScore: 0.9,
763
- },
764
- {
765
- keywords: ["flight_number", "flight"],
766
- fakerMethod: "airline.flightNumber",
767
- schemaType: "string",
768
- minScore: 0.9,
769
- },
770
- {
771
- keywords: ["record_locator", "booking_ref", "pnr"],
772
- fakerMethod: "airline.recordLocator",
773
- schemaType: "string",
774
- minScore: 0.9,
775
- },
776
- {
777
- keywords: ["seat", "seat_number"],
778
- fakerMethod: "airline.seat",
779
- schemaType: "string",
780
- minScore: 0.9,
781
- },
782
- ];
783
- // ── Animal (niche) ──────────────────────────────────────────────────
784
- const animal = [
785
- {
786
- keywords: ["animal", "animal_type", "species"],
787
- fakerMethod: "animal.type",
788
- schemaType: "string",
789
- minScore: 0.9,
790
- },
791
- {
792
- keywords: ["pet_name"],
793
- fakerMethod: "animal.petName",
794
- schemaType: "string",
795
- minScore: 0.9,
796
- },
797
- {
798
- keywords: ["breed"],
799
- fakerMethod: "animal.dog",
800
- schemaType: "string",
801
- minScore: 0.9,
802
- },
803
- {
804
- keywords: ["bird"],
805
- fakerMethod: "animal.bird",
806
- schemaType: "string",
807
- minScore: 0.9,
808
- },
809
- {
810
- keywords: ["fish"],
811
- fakerMethod: "animal.fish",
812
- schemaType: "string",
813
- minScore: 0.9,
814
- },
815
- {
816
- keywords: ["horse"],
817
- fakerMethod: "animal.horse",
818
- schemaType: "string",
819
- minScore: 0.9,
820
- },
821
- {
822
- keywords: ["insect"],
823
- fakerMethod: "animal.insect",
824
- schemaType: "string",
825
- minScore: 0.9,
826
- },
827
- ];
828
- // ── Book (niche) ────────────────────────────────────────────────────
829
- const book = [
830
- {
831
- keywords: ["book_title"],
832
- fakerMethod: "book.title",
833
- schemaType: "string",
834
- minScore: 0.9,
835
- },
836
- {
837
- keywords: ["author", "book_author", "writer"],
838
- fakerMethod: "book.author",
839
- schemaType: "string",
840
- minScore: 0.9,
841
- },
842
- {
843
- keywords: ["genre", "book_genre"],
844
- fakerMethod: "book.genre",
845
- schemaType: "string",
846
- minScore: 0.9,
847
- },
848
- {
849
- keywords: ["publisher", "publishing_house"],
850
- fakerMethod: "book.publisher",
851
- schemaType: "string",
852
- minScore: 0.9,
853
- },
854
- {
855
- keywords: ["book_series", "series_name"],
856
- fakerMethod: "book.series",
857
- schemaType: "string",
858
- minScore: 0.9,
859
- },
860
- ];
861
- // ── Food (niche) ────────────────────────────────────────────────────
862
- const food = [
863
- {
864
- keywords: ["dish", "meal", "recipe_name"],
865
- fakerMethod: "food.dish",
866
- schemaType: "string",
867
- minScore: 0.9,
868
- },
869
- {
870
- keywords: ["ingredient"],
871
- fakerMethod: "food.ingredient",
872
- schemaType: "string",
873
- minScore: 0.9,
874
- },
875
- {
876
- keywords: ["spice"],
877
- fakerMethod: "food.spice",
878
- schemaType: "string",
879
- minScore: 0.9,
880
- },
881
- {
882
- keywords: ["fruit"],
883
- fakerMethod: "food.fruit",
884
- schemaType: "string",
885
- minScore: 0.9,
886
- },
887
- {
888
- keywords: ["vegetable"],
889
- fakerMethod: "food.vegetable",
890
- schemaType: "string",
891
- minScore: 0.9,
892
- },
893
- {
894
- keywords: ["meat"],
895
- fakerMethod: "food.meat",
896
- schemaType: "string",
897
- minScore: 0.9,
898
- },
899
- {
900
- keywords: ["food_description"],
901
- fakerMethod: "food.description",
902
- schemaType: "string",
903
- minScore: 0.9,
904
- },
905
- {
906
- keywords: ["ethnic_category", "cuisine"],
907
- fakerMethod: "food.ethnicCategory",
908
- schemaType: "string",
909
- minScore: 0.9,
910
- },
911
- ];
912
- // ── Music (niche) ───────────────────────────────────────────────────
913
- const music = [
914
- {
915
- keywords: ["song", "song_name", "track", "track_name"],
916
- fakerMethod: "music.songName",
917
- schemaType: "string",
918
- minScore: 0.9,
919
- },
920
- {
921
- keywords: ["album", "album_name"],
922
- fakerMethod: "music.album",
923
- schemaType: "string",
924
- minScore: 0.9,
925
- },
926
- {
927
- keywords: ["artist", "musician", "band"],
928
- fakerMethod: "music.artist",
929
- schemaType: "string",
930
- minScore: 0.9,
931
- },
932
- {
933
- keywords: ["music_genre"],
934
- fakerMethod: "music.genre",
935
- schemaType: "string",
936
- minScore: 0.9,
937
- },
938
- ];
939
- // ── Science (niche) ─────────────────────────────────────────────────
940
- const science = [];
941
- // ── Vehicle (niche) ─────────────────────────────────────────────────
942
- const vehicle = [
943
- {
944
- keywords: ["vehicle", "vehicle_name"],
945
- fakerMethod: "vehicle.vehicle",
946
- schemaType: "string",
947
- minScore: 0.9,
948
- },
949
- {
950
- keywords: ["vehicle_type"],
951
- fakerMethod: "vehicle.type",
952
- schemaType: "string",
953
- minScore: 0.9,
954
- },
955
- {
956
- keywords: ["vehicle_manufacturer", "car_make"],
957
- fakerMethod: "vehicle.manufacturer",
958
- schemaType: "string",
959
- minScore: 0.9,
960
- },
961
- {
962
- keywords: ["vehicle_model", "car_model"],
963
- fakerMethod: "vehicle.model",
964
- schemaType: "string",
965
- minScore: 0.9,
966
- },
967
- {
968
- keywords: ["fuel", "fuel_type"],
969
- fakerMethod: "vehicle.fuel",
970
- schemaType: "string",
971
- minScore: 0.9,
972
- },
973
- {
974
- keywords: ["bicycle"],
975
- fakerMethod: "vehicle.bicycle",
976
- schemaType: "string",
977
- minScore: 0.9,
978
- },
979
- {
980
- keywords: ["vehicle_color", "car_color"],
981
- fakerMethod: "vehicle.color",
982
- schemaType: "string",
983
- minScore: 0.9,
984
- },
985
- ];
986
- // ── Git/Dev (niche) ─────────────────────────────────────────────────
987
- const git = [
988
- {
989
- keywords: ["branch", "branch_name", "git_branch"],
990
- fakerMethod: "git.branch",
991
- schemaType: "string",
992
- minScore: 0.9,
993
- },
994
- {
995
- keywords: ["commit_sha", "commit_hash", "sha"],
996
- fakerMethod: "git.commitSha",
997
- schemaType: "string",
998
- minScore: 0.9,
999
- },
1000
- {
1001
- keywords: ["commit_message"],
1002
- fakerMethod: "git.commitMessage",
1003
- schemaType: "string",
1004
- minScore: 0.9,
1005
- },
1006
- ];
1007
- // ── Database (niche) ────────────────────────────────────────────────
1008
- const database = [
1009
- {
1010
- keywords: ["db_column", "column_name"],
1011
- fakerMethod: "database.column",
1012
- schemaType: "string",
1013
- minScore: 0.9,
1014
- },
1015
- {
1016
- keywords: ["db_type", "column_type"],
1017
- fakerMethod: "database.type",
1018
- schemaType: "string",
1019
- minScore: 0.9,
1020
- },
1021
- {
1022
- keywords: ["db_engine", "database_engine"],
1023
- fakerMethod: "database.engine",
1024
- schemaType: "string",
1025
- minScore: 0.9,
1026
- },
1027
- {
1028
- keywords: ["collation"],
1029
- fakerMethod: "database.collation",
1030
- schemaType: "string",
1031
- minScore: 0.9,
1032
- },
1033
- {
1034
- keywords: ["mongodb_id", "object_id"],
1035
- fakerMethod: "database.mongodbObjectId",
1036
- schemaType: "string",
1037
- minScore: 0.9,
1038
- },
1039
- ];
1040
- // ── Hacker/Tech (niche) ────────────────────────────────────────────
1041
- const hacker = [
1042
- {
1043
- keywords: ["abbreviation", "tech_abbreviation"],
1044
- fakerMethod: "hacker.abbreviation",
1045
- schemaType: "string",
1046
- minScore: 0.9,
1047
- },
1048
- {
1049
- keywords: ["hacker_phrase", "tech_phrase"],
1050
- fakerMethod: "hacker.phrase",
1051
- schemaType: "string",
1052
- minScore: 0.9,
1053
- },
1054
- ];
1055
- // ── Word/Lorem (domain) ────────────────────────────────────────────
1056
- const word = [
1057
- {
1058
- keywords: ["adjective"],
1059
- fakerMethod: "word.adjective",
1060
- schemaType: "string",
1061
- minScore: 0.8,
1062
- },
1063
- {
1064
- keywords: ["adverb"],
1065
- fakerMethod: "word.adverb",
1066
- schemaType: "string",
1067
- minScore: 0.8,
1068
- },
1069
- {
1070
- keywords: ["noun"],
1071
- fakerMethod: "word.noun",
1072
- schemaType: "string",
1073
- minScore: 0.8,
1074
- },
1075
- {
1076
- keywords: ["verb"],
1077
- fakerMethod: "word.verb",
1078
- schemaType: "string",
1079
- minScore: 0.8,
1080
- },
1081
- ];
1082
- export const ALL_FIELD_MAPPINGS = [
1083
- ...identity,
1084
- ...person,
1085
- ...contact,
1086
- ...address,
1087
- ...internet,
1088
- ...ids,
1089
- ...text,
1090
- ...business,
1091
- ...dateTime,
1092
- ...color,
1093
- ...numeric,
1094
- ...booleans,
1095
- ...fileSystem,
1096
- ...airline,
1097
- ...animal,
1098
- ...book,
1099
- ...food,
1100
- ...music,
1101
- ...science,
1102
- ...vehicle,
1103
- ...git,
1104
- ...database,
1105
- ...hacker,
1106
- ...word,
1107
- ];