schema-seed-generators 0.1.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.
- package/LICENSE +21 -0
- package/README.md +5 -0
- package/dist/generators.cjs +554 -0
- package/dist/generators.cjs.map +1 -0
- package/dist/generators.d.cts +28 -0
- package/dist/generators.d.ts +28 -0
- package/dist/generators.js +527 -0
- package/dist/generators.js.map +1 -0
- package/dist/index.cjs +609 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +19 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.js +574 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 schema-seed contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/generators.ts
|
|
21
|
+
var generators_exports = {};
|
|
22
|
+
__export(generators_exports, {
|
|
23
|
+
generators: () => generators
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(generators_exports);
|
|
26
|
+
|
|
27
|
+
// src/data.ts
|
|
28
|
+
var firstNames = [
|
|
29
|
+
"James",
|
|
30
|
+
"Mary",
|
|
31
|
+
"Robert",
|
|
32
|
+
"Patricia",
|
|
33
|
+
"John",
|
|
34
|
+
"Jennifer",
|
|
35
|
+
"Michael",
|
|
36
|
+
"Linda",
|
|
37
|
+
"David",
|
|
38
|
+
"Elizabeth",
|
|
39
|
+
"William",
|
|
40
|
+
"Barbara",
|
|
41
|
+
"Richard",
|
|
42
|
+
"Susan",
|
|
43
|
+
"Joseph",
|
|
44
|
+
"Jessica",
|
|
45
|
+
"Thomas",
|
|
46
|
+
"Sarah",
|
|
47
|
+
"Christopher",
|
|
48
|
+
"Karen",
|
|
49
|
+
"Charles",
|
|
50
|
+
"Lisa",
|
|
51
|
+
"Daniel",
|
|
52
|
+
"Nancy",
|
|
53
|
+
"Matthew",
|
|
54
|
+
"Betty",
|
|
55
|
+
"Anthony",
|
|
56
|
+
"Sandra",
|
|
57
|
+
"Mark",
|
|
58
|
+
"Margaret",
|
|
59
|
+
"Donald",
|
|
60
|
+
"Ashley",
|
|
61
|
+
"Steven",
|
|
62
|
+
"Kimberly",
|
|
63
|
+
"Andrew",
|
|
64
|
+
"Donna",
|
|
65
|
+
"Paul",
|
|
66
|
+
"Emily",
|
|
67
|
+
"Joshua",
|
|
68
|
+
"Michelle",
|
|
69
|
+
"Kenneth",
|
|
70
|
+
"Carol",
|
|
71
|
+
"Kevin",
|
|
72
|
+
"Amanda",
|
|
73
|
+
"Brian",
|
|
74
|
+
"Dorothy",
|
|
75
|
+
"George",
|
|
76
|
+
"Melissa",
|
|
77
|
+
"Timothy",
|
|
78
|
+
"Deborah",
|
|
79
|
+
"Ronald",
|
|
80
|
+
"Stephanie",
|
|
81
|
+
"Edward",
|
|
82
|
+
"Rebecca",
|
|
83
|
+
"Jason",
|
|
84
|
+
"Sharon",
|
|
85
|
+
"Jeffrey",
|
|
86
|
+
"Laura",
|
|
87
|
+
"Ryan",
|
|
88
|
+
"Cynthia",
|
|
89
|
+
"Jacob",
|
|
90
|
+
"Kathleen",
|
|
91
|
+
"Gary",
|
|
92
|
+
"Amy",
|
|
93
|
+
"Nicholas",
|
|
94
|
+
"Angela",
|
|
95
|
+
"Eric",
|
|
96
|
+
"Shirley",
|
|
97
|
+
"Jonathan",
|
|
98
|
+
"Anna",
|
|
99
|
+
"Stephen",
|
|
100
|
+
"Brenda",
|
|
101
|
+
"Larry",
|
|
102
|
+
"Pamela",
|
|
103
|
+
"Justin",
|
|
104
|
+
"Nicole",
|
|
105
|
+
"Scott",
|
|
106
|
+
"Emma",
|
|
107
|
+
"Brandon",
|
|
108
|
+
"Helen",
|
|
109
|
+
"Benjamin",
|
|
110
|
+
"Debra",
|
|
111
|
+
"Samuel",
|
|
112
|
+
"Rachel",
|
|
113
|
+
"Gregory",
|
|
114
|
+
"Carolyn",
|
|
115
|
+
"Alexander",
|
|
116
|
+
"Janet",
|
|
117
|
+
"Frank",
|
|
118
|
+
"Maria",
|
|
119
|
+
"Patrick",
|
|
120
|
+
"Catherine",
|
|
121
|
+
"Raymond",
|
|
122
|
+
"Heather",
|
|
123
|
+
"Jack",
|
|
124
|
+
"Diane",
|
|
125
|
+
"Dennis",
|
|
126
|
+
"Virginia",
|
|
127
|
+
"Jerry",
|
|
128
|
+
"Julie",
|
|
129
|
+
"Tyler",
|
|
130
|
+
"Joyce",
|
|
131
|
+
"Aaron",
|
|
132
|
+
"Victoria",
|
|
133
|
+
"Jose",
|
|
134
|
+
"Olivia",
|
|
135
|
+
"Adam",
|
|
136
|
+
"Kelly",
|
|
137
|
+
"Nathan",
|
|
138
|
+
"Christina",
|
|
139
|
+
"Henry",
|
|
140
|
+
"Lauren",
|
|
141
|
+
"Douglas",
|
|
142
|
+
"Joan",
|
|
143
|
+
"Zachary",
|
|
144
|
+
"Evelyn",
|
|
145
|
+
"Peter",
|
|
146
|
+
"Judith",
|
|
147
|
+
"Kyle",
|
|
148
|
+
"Megan",
|
|
149
|
+
"Ethan",
|
|
150
|
+
"Cheryl",
|
|
151
|
+
"Walter",
|
|
152
|
+
"Andrea",
|
|
153
|
+
"Harold",
|
|
154
|
+
"Hannah",
|
|
155
|
+
"Jeremy",
|
|
156
|
+
"Martha",
|
|
157
|
+
"Christian",
|
|
158
|
+
"Jacqueline",
|
|
159
|
+
"Keith",
|
|
160
|
+
"Frances",
|
|
161
|
+
"Roger",
|
|
162
|
+
"Gloria",
|
|
163
|
+
"Noah",
|
|
164
|
+
"Ann",
|
|
165
|
+
"Gerald",
|
|
166
|
+
"Teresa",
|
|
167
|
+
"Carl",
|
|
168
|
+
"Kathryn",
|
|
169
|
+
"Terry",
|
|
170
|
+
"Sara",
|
|
171
|
+
"Sean",
|
|
172
|
+
"Janice",
|
|
173
|
+
"Austin",
|
|
174
|
+
"Jean",
|
|
175
|
+
"Arthur",
|
|
176
|
+
"Alice",
|
|
177
|
+
"Lawrence",
|
|
178
|
+
"Madison",
|
|
179
|
+
"Dylan",
|
|
180
|
+
"Doris",
|
|
181
|
+
"Jesse",
|
|
182
|
+
"Abigail",
|
|
183
|
+
"Jordan",
|
|
184
|
+
"Julia",
|
|
185
|
+
"Bryan",
|
|
186
|
+
"Judy",
|
|
187
|
+
"Billy",
|
|
188
|
+
"Grace",
|
|
189
|
+
"Joe",
|
|
190
|
+
"Denise",
|
|
191
|
+
"Bruce",
|
|
192
|
+
"Amber",
|
|
193
|
+
"Gabriel",
|
|
194
|
+
"Marilyn",
|
|
195
|
+
"Logan",
|
|
196
|
+
"Beverly",
|
|
197
|
+
"Albert",
|
|
198
|
+
"Danielle",
|
|
199
|
+
"Willie",
|
|
200
|
+
"Theresa",
|
|
201
|
+
"Alan",
|
|
202
|
+
"Sophia",
|
|
203
|
+
"Juan",
|
|
204
|
+
"Marie",
|
|
205
|
+
"Wayne",
|
|
206
|
+
"Diana",
|
|
207
|
+
"Elijah",
|
|
208
|
+
"Brittany",
|
|
209
|
+
"Randy",
|
|
210
|
+
"Natalie",
|
|
211
|
+
"Roy",
|
|
212
|
+
"Isabella",
|
|
213
|
+
"Vincent",
|
|
214
|
+
"Charlotte",
|
|
215
|
+
"Ralph",
|
|
216
|
+
"Rose",
|
|
217
|
+
"Eugene",
|
|
218
|
+
"Alexis",
|
|
219
|
+
"Russell",
|
|
220
|
+
"Kayla"
|
|
221
|
+
];
|
|
222
|
+
var lastNames = [
|
|
223
|
+
"Smith",
|
|
224
|
+
"Johnson",
|
|
225
|
+
"Williams",
|
|
226
|
+
"Brown",
|
|
227
|
+
"Jones",
|
|
228
|
+
"Garcia",
|
|
229
|
+
"Miller",
|
|
230
|
+
"Davis",
|
|
231
|
+
"Rodriguez",
|
|
232
|
+
"Martinez",
|
|
233
|
+
"Hernandez",
|
|
234
|
+
"Lopez",
|
|
235
|
+
"Gonzalez",
|
|
236
|
+
"Wilson",
|
|
237
|
+
"Anderson",
|
|
238
|
+
"Thomas",
|
|
239
|
+
"Taylor",
|
|
240
|
+
"Moore",
|
|
241
|
+
"Jackson",
|
|
242
|
+
"Martin",
|
|
243
|
+
"Lee",
|
|
244
|
+
"Perez",
|
|
245
|
+
"Thompson",
|
|
246
|
+
"White",
|
|
247
|
+
"Harris",
|
|
248
|
+
"Sanchez",
|
|
249
|
+
"Clark",
|
|
250
|
+
"Ramirez",
|
|
251
|
+
"Lewis",
|
|
252
|
+
"Robinson",
|
|
253
|
+
"Walker",
|
|
254
|
+
"Young",
|
|
255
|
+
"Allen",
|
|
256
|
+
"King",
|
|
257
|
+
"Wright",
|
|
258
|
+
"Scott",
|
|
259
|
+
"Torres",
|
|
260
|
+
"Nguyen",
|
|
261
|
+
"Hill",
|
|
262
|
+
"Flores",
|
|
263
|
+
"Green",
|
|
264
|
+
"Adams",
|
|
265
|
+
"Nelson",
|
|
266
|
+
"Baker",
|
|
267
|
+
"Hall",
|
|
268
|
+
"Rivera",
|
|
269
|
+
"Campbell",
|
|
270
|
+
"Mitchell",
|
|
271
|
+
"Carter",
|
|
272
|
+
"Roberts",
|
|
273
|
+
"Gomez",
|
|
274
|
+
"Phillips",
|
|
275
|
+
"Evans",
|
|
276
|
+
"Turner",
|
|
277
|
+
"Diaz",
|
|
278
|
+
"Parker",
|
|
279
|
+
"Cruz",
|
|
280
|
+
"Edwards",
|
|
281
|
+
"Collins",
|
|
282
|
+
"Reyes",
|
|
283
|
+
"Stewart",
|
|
284
|
+
"Morris",
|
|
285
|
+
"Morales",
|
|
286
|
+
"Murphy",
|
|
287
|
+
"Cook",
|
|
288
|
+
"Rogers",
|
|
289
|
+
"Gutierrez",
|
|
290
|
+
"Ortiz",
|
|
291
|
+
"Morgan",
|
|
292
|
+
"Cooper",
|
|
293
|
+
"Peterson",
|
|
294
|
+
"Bailey",
|
|
295
|
+
"Reed",
|
|
296
|
+
"Kelly",
|
|
297
|
+
"Howard",
|
|
298
|
+
"Ramos",
|
|
299
|
+
"Kim",
|
|
300
|
+
"Cox",
|
|
301
|
+
"Ward",
|
|
302
|
+
"Richardson",
|
|
303
|
+
"Watson",
|
|
304
|
+
"Brooks",
|
|
305
|
+
"Chavez",
|
|
306
|
+
"Wood",
|
|
307
|
+
"James",
|
|
308
|
+
"Bennett",
|
|
309
|
+
"Gray",
|
|
310
|
+
"Mendoza",
|
|
311
|
+
"Ruiz",
|
|
312
|
+
"Hughes",
|
|
313
|
+
"Price",
|
|
314
|
+
"Alvarez",
|
|
315
|
+
"Castillo",
|
|
316
|
+
"Sanders",
|
|
317
|
+
"Patel",
|
|
318
|
+
"Myers",
|
|
319
|
+
"Long",
|
|
320
|
+
"Ross",
|
|
321
|
+
"Foster",
|
|
322
|
+
"Jimenez",
|
|
323
|
+
"Powell",
|
|
324
|
+
"Jenkins",
|
|
325
|
+
"Perry",
|
|
326
|
+
"Russell",
|
|
327
|
+
"Sullivan",
|
|
328
|
+
"Bell",
|
|
329
|
+
"Coleman",
|
|
330
|
+
"Butler",
|
|
331
|
+
"Henderson",
|
|
332
|
+
"Barnes",
|
|
333
|
+
"Gonzales",
|
|
334
|
+
"Fisher",
|
|
335
|
+
"Vasquez",
|
|
336
|
+
"Simmons",
|
|
337
|
+
"Romero",
|
|
338
|
+
"Jordan",
|
|
339
|
+
"Patterson",
|
|
340
|
+
"Alexander",
|
|
341
|
+
"Hamilton",
|
|
342
|
+
"Graham",
|
|
343
|
+
"Reynolds",
|
|
344
|
+
"Griffin",
|
|
345
|
+
"Wallace",
|
|
346
|
+
"Moreno",
|
|
347
|
+
"West",
|
|
348
|
+
"Cole",
|
|
349
|
+
"Hayes",
|
|
350
|
+
"Bryant",
|
|
351
|
+
"Herrera",
|
|
352
|
+
"Gibson",
|
|
353
|
+
"Ellis",
|
|
354
|
+
"Tran",
|
|
355
|
+
"Medina",
|
|
356
|
+
"Aguilar",
|
|
357
|
+
"Stevens",
|
|
358
|
+
"Murray",
|
|
359
|
+
"Ford",
|
|
360
|
+
"Castro",
|
|
361
|
+
"Marshall",
|
|
362
|
+
"Owens",
|
|
363
|
+
"Harrison",
|
|
364
|
+
"Fernandez",
|
|
365
|
+
"McDonald",
|
|
366
|
+
"Woods",
|
|
367
|
+
"Washington",
|
|
368
|
+
"Kennedy",
|
|
369
|
+
"Wells",
|
|
370
|
+
"Vargas",
|
|
371
|
+
"Henry",
|
|
372
|
+
"Chen",
|
|
373
|
+
"Freeman",
|
|
374
|
+
"Webb",
|
|
375
|
+
"Tucker",
|
|
376
|
+
"Guzman",
|
|
377
|
+
"Burns",
|
|
378
|
+
"Novak",
|
|
379
|
+
"Wagner",
|
|
380
|
+
"Estrada",
|
|
381
|
+
"Lin",
|
|
382
|
+
"Weaver"
|
|
383
|
+
];
|
|
384
|
+
var countries = [
|
|
385
|
+
"United States",
|
|
386
|
+
"Canada",
|
|
387
|
+
"United Kingdom",
|
|
388
|
+
"Germany",
|
|
389
|
+
"France",
|
|
390
|
+
"Japan",
|
|
391
|
+
"Australia",
|
|
392
|
+
"Brazil",
|
|
393
|
+
"India",
|
|
394
|
+
"China",
|
|
395
|
+
"Mexico",
|
|
396
|
+
"Italy",
|
|
397
|
+
"Spain",
|
|
398
|
+
"Netherlands",
|
|
399
|
+
"Sweden",
|
|
400
|
+
"Norway",
|
|
401
|
+
"Denmark",
|
|
402
|
+
"Finland",
|
|
403
|
+
"Switzerland",
|
|
404
|
+
"Austria",
|
|
405
|
+
"Belgium",
|
|
406
|
+
"Ireland",
|
|
407
|
+
"New Zealand",
|
|
408
|
+
"Singapore",
|
|
409
|
+
"South Korea",
|
|
410
|
+
"South Africa",
|
|
411
|
+
"Argentina",
|
|
412
|
+
"Chile",
|
|
413
|
+
"Colombia",
|
|
414
|
+
"Peru",
|
|
415
|
+
"Portugal",
|
|
416
|
+
"Greece",
|
|
417
|
+
"Turkey",
|
|
418
|
+
"Israel",
|
|
419
|
+
"Egypt",
|
|
420
|
+
"Thailand"
|
|
421
|
+
];
|
|
422
|
+
var cities = [
|
|
423
|
+
"New York",
|
|
424
|
+
"Los Angeles",
|
|
425
|
+
"Chicago",
|
|
426
|
+
"Houston",
|
|
427
|
+
"Phoenix",
|
|
428
|
+
"Philadelphia",
|
|
429
|
+
"San Antonio",
|
|
430
|
+
"San Diego",
|
|
431
|
+
"Dallas",
|
|
432
|
+
"San Jose",
|
|
433
|
+
"London",
|
|
434
|
+
"Paris",
|
|
435
|
+
"Berlin",
|
|
436
|
+
"Tokyo",
|
|
437
|
+
"Sydney",
|
|
438
|
+
"Toronto",
|
|
439
|
+
"Mumbai",
|
|
440
|
+
"Beijing",
|
|
441
|
+
"Sao Paulo",
|
|
442
|
+
"Mexico City",
|
|
443
|
+
"Madrid",
|
|
444
|
+
"Rome",
|
|
445
|
+
"Amsterdam",
|
|
446
|
+
"Stockholm",
|
|
447
|
+
"Oslo",
|
|
448
|
+
"Copenhagen",
|
|
449
|
+
"Helsinki",
|
|
450
|
+
"Zurich",
|
|
451
|
+
"Vienna",
|
|
452
|
+
"Brussels",
|
|
453
|
+
"Dublin",
|
|
454
|
+
"Auckland",
|
|
455
|
+
"Singapore",
|
|
456
|
+
"Seoul",
|
|
457
|
+
"Cape Town",
|
|
458
|
+
"Buenos Aires"
|
|
459
|
+
];
|
|
460
|
+
var domains = ["example.com", "test.org", "demo.net", "sample.io", "mail.com", "web.dev"];
|
|
461
|
+
var streetNames = [
|
|
462
|
+
"Main St",
|
|
463
|
+
"High St",
|
|
464
|
+
"Broadway",
|
|
465
|
+
"Park Ave",
|
|
466
|
+
"Oak St",
|
|
467
|
+
"Cedar Ln",
|
|
468
|
+
"Maple Ave",
|
|
469
|
+
"Washington St",
|
|
470
|
+
"Lake View Dr",
|
|
471
|
+
"Sunset Blvd",
|
|
472
|
+
"River Rd",
|
|
473
|
+
"Church St",
|
|
474
|
+
"Market St"
|
|
475
|
+
];
|
|
476
|
+
var sentences = [
|
|
477
|
+
"The quick brown fox jumps over the lazy dog.",
|
|
478
|
+
"A journey of a thousand miles begins with a single step.",
|
|
479
|
+
"To be or not to be, that is the question.",
|
|
480
|
+
"All that glitters is not gold.",
|
|
481
|
+
"Fortune favors the bold.",
|
|
482
|
+
"Knowledge is power.",
|
|
483
|
+
"The pen is mightier than the sword.",
|
|
484
|
+
"Actions speak louder than words.",
|
|
485
|
+
"Better late than never.",
|
|
486
|
+
"Where there is a will, there is a way."
|
|
487
|
+
];
|
|
488
|
+
|
|
489
|
+
// src/generators.ts
|
|
490
|
+
var generators = {
|
|
491
|
+
email: (ctx) => {
|
|
492
|
+
const user = generators.username(ctx);
|
|
493
|
+
const domain = ctx.random.pick(domains);
|
|
494
|
+
return `${user}@${domain}`;
|
|
495
|
+
},
|
|
496
|
+
firstName: (ctx) => ctx.random.pick(firstNames),
|
|
497
|
+
lastName: (ctx) => ctx.random.pick(lastNames),
|
|
498
|
+
fullName: (ctx) => `${generators.firstName(ctx)} ${generators.lastName(ctx)}`,
|
|
499
|
+
phone: (ctx) => {
|
|
500
|
+
const part = () => ctx.random.nextInt(100, 999);
|
|
501
|
+
const last = () => ctx.random.nextInt(1e3, 9999);
|
|
502
|
+
return `+1-${part()}-${part()}-${last()}`;
|
|
503
|
+
},
|
|
504
|
+
username: (ctx) => {
|
|
505
|
+
const first = generators.firstName(ctx).toLowerCase();
|
|
506
|
+
const last = generators.lastName(ctx).toLowerCase();
|
|
507
|
+
const suffix = ctx.random.nextInt(10, 99);
|
|
508
|
+
return `${first}.${last}${suffix}`;
|
|
509
|
+
},
|
|
510
|
+
url: (ctx) => {
|
|
511
|
+
const domain = ctx.random.pick(domains);
|
|
512
|
+
const path = generators.firstName(ctx).toLowerCase();
|
|
513
|
+
return `https://${domain}/${path}`;
|
|
514
|
+
},
|
|
515
|
+
country: (ctx) => ctx.random.pick(countries),
|
|
516
|
+
city: (ctx) => ctx.random.pick(cities),
|
|
517
|
+
address: (ctx) => {
|
|
518
|
+
const num = ctx.random.nextInt(1, 9999);
|
|
519
|
+
const street = ctx.random.pick(streetNames);
|
|
520
|
+
return `${num} ${street}`;
|
|
521
|
+
},
|
|
522
|
+
uuid: (ctx) => {
|
|
523
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
|
|
524
|
+
const r = ctx.random.next() * 16 | 0;
|
|
525
|
+
const v = c === "x" ? r : r & 3 | 8;
|
|
526
|
+
return v.toString(16);
|
|
527
|
+
});
|
|
528
|
+
},
|
|
529
|
+
dateRecent: (ctx, days = 30) => {
|
|
530
|
+
const date = /* @__PURE__ */ new Date();
|
|
531
|
+
date.setDate(date.getDate() - ctx.random.nextInt(0, days));
|
|
532
|
+
return date.toISOString();
|
|
533
|
+
},
|
|
534
|
+
datePast: (ctx, years = 10) => {
|
|
535
|
+
const date = /* @__PURE__ */ new Date();
|
|
536
|
+
date.setFullYear(date.getFullYear() - ctx.random.nextInt(1, years));
|
|
537
|
+
return date.toISOString();
|
|
538
|
+
},
|
|
539
|
+
booleanWeighted: (ctx, weight = 0.5) => ctx.random.boolean(weight),
|
|
540
|
+
intRange: (ctx, min = 0, max = 100) => ctx.random.nextInt(min, max),
|
|
541
|
+
decimalRange: (ctx, min = 0, max = 100, precision = 2) => {
|
|
542
|
+
const val = ctx.random.next() * (max - min) + min;
|
|
543
|
+
return parseFloat(val.toFixed(precision));
|
|
544
|
+
},
|
|
545
|
+
textSentence: (ctx) => ctx.random.pick(sentences),
|
|
546
|
+
textParagraph: (ctx, sentences2 = 3) => {
|
|
547
|
+
return Array.from({ length: sentences2 }, () => generators.textSentence(ctx)).join(" ");
|
|
548
|
+
}
|
|
549
|
+
};
|
|
550
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
551
|
+
0 && (module.exports = {
|
|
552
|
+
generators
|
|
553
|
+
});
|
|
554
|
+
//# sourceMappingURL=generators.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/generators.ts","../src/data.ts"],"sourcesContent":["import { Random } from 'schema-seed-core'\nimport * as data from './data.js'\n\nexport interface GeneratorContext {\n random: Random\n}\n\nexport const generators = {\n email: (ctx: GeneratorContext) => {\n const user = generators.username(ctx)\n const domain = ctx.random.pick(data.domains)\n return `${user}@${domain}`\n },\n\n firstName: (ctx: GeneratorContext) => ctx.random.pick(data.firstNames),\n\n lastName: (ctx: GeneratorContext) => ctx.random.pick(data.lastNames),\n\n fullName: (ctx: GeneratorContext) => `${generators.firstName(ctx)} ${generators.lastName(ctx)}`,\n\n phone: (ctx: GeneratorContext) => {\n const part = () => ctx.random.nextInt(100, 999)\n const last = () => ctx.random.nextInt(1000, 9999)\n return `+1-${part()}-${part()}-${last()}`\n },\n\n username: (ctx: GeneratorContext) => {\n const first = generators.firstName(ctx).toLowerCase()\n const last = generators.lastName(ctx).toLowerCase()\n const suffix = ctx.random.nextInt(10, 99)\n return `${first}.${last}${suffix}`\n },\n\n url: (ctx: GeneratorContext) => {\n const domain = ctx.random.pick(data.domains)\n const path = generators.firstName(ctx).toLowerCase()\n return `https://${domain}/${path}`\n },\n\n country: (ctx: GeneratorContext) => ctx.random.pick(data.countries),\n\n city: (ctx: GeneratorContext) => ctx.random.pick(data.cities),\n\n address: (ctx: GeneratorContext) => {\n const num = ctx.random.nextInt(1, 9999)\n const street = ctx.random.pick(data.streetNames)\n return `${num} ${street}`\n },\n\n uuid: (ctx: GeneratorContext) => {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (ctx.random.next() * 16) | 0\n const v = c === 'x' ? r : (r & 0x3) | 0x8\n return v.toString(16)\n })\n },\n\n dateRecent: (ctx: GeneratorContext, days = 30) => {\n const date = new Date()\n date.setDate(date.getDate() - ctx.random.nextInt(0, days))\n return date.toISOString()\n },\n\n datePast: (ctx: GeneratorContext, years = 10) => {\n const date = new Date()\n date.setFullYear(date.getFullYear() - ctx.random.nextInt(1, years))\n return date.toISOString()\n },\n\n booleanWeighted: (ctx: GeneratorContext, weight = 0.5) => ctx.random.boolean(weight),\n\n intRange: (ctx: GeneratorContext, min = 0, max = 100) => ctx.random.nextInt(min, max),\n\n decimalRange: (ctx: GeneratorContext, min = 0, max = 100, precision = 2) => {\n const val = ctx.random.next() * (max - min) + min\n return parseFloat(val.toFixed(precision))\n },\n\n textSentence: (ctx: GeneratorContext) => ctx.random.pick(data.sentences),\n\n textParagraph: (ctx: GeneratorContext, sentences = 3) => {\n return Array.from({ length: sentences }, () => generators.textSentence(ctx)).join(' ')\n }\n}\n\nexport type GeneratorId = keyof typeof generators\n","export const firstNames = [\n 'James', 'Mary', 'Robert', 'Patricia', 'John', 'Jennifer', 'Michael', 'Linda',\n 'David', 'Elizabeth', 'William', 'Barbara', 'Richard', 'Susan', 'Joseph', 'Jessica',\n 'Thomas', 'Sarah', 'Christopher', 'Karen', 'Charles', 'Lisa', 'Daniel', 'Nancy',\n 'Matthew', 'Betty', 'Anthony', 'Sandra', 'Mark', 'Margaret', 'Donald', 'Ashley',\n 'Steven', 'Kimberly', 'Andrew', 'Donna', 'Paul', 'Emily', 'Joshua', 'Michelle',\n 'Kenneth', 'Carol', 'Kevin', 'Amanda', 'Brian', 'Dorothy', 'George', 'Melissa',\n 'Timothy', 'Deborah', 'Ronald', 'Stephanie', 'Edward', 'Rebecca', 'Jason', 'Sharon',\n 'Jeffrey', 'Laura', 'Ryan', 'Cynthia', 'Jacob', 'Kathleen', 'Gary', 'Amy',\n 'Nicholas', 'Angela', 'Eric', 'Shirley', 'Jonathan', 'Anna', 'Stephen', 'Brenda',\n 'Larry', 'Pamela', 'Justin', 'Nicole', 'Scott', 'Emma', 'Brandon', 'Helen',\n 'Benjamin', 'Debra', 'Samuel', 'Rachel', 'Gregory', 'Carolyn', 'Alexander', 'Janet',\n 'Frank', 'Maria', 'Patrick', 'Catherine', 'Raymond', 'Heather', 'Jack', 'Diane',\n 'Dennis', 'Virginia', 'Jerry', 'Julie', 'Tyler', 'Joyce', 'Aaron', 'Victoria',\n 'Jose', 'Olivia', 'Adam', 'Kelly', 'Nathan', 'Christina', 'Henry', 'Lauren',\n 'Douglas', 'Joan', 'Zachary', 'Evelyn', 'Peter', 'Judith', 'Kyle', 'Megan',\n 'Ethan', 'Cheryl', 'Walter', 'Andrea', 'Harold', 'Hannah', 'Jeremy', 'Martha',\n 'Christian', 'Jacqueline', 'Keith', 'Frances', 'Roger', 'Gloria', 'Noah', 'Ann',\n 'Gerald', 'Teresa', 'Carl', 'Kathryn', 'Terry', 'Sara', 'Sean', 'Janice',\n 'Austin', 'Jean', 'Arthur', 'Alice', 'Lawrence', 'Madison', 'Dylan', 'Doris',\n 'Jesse', 'Abigail', 'Jordan', 'Julia', 'Bryan', 'Judy', 'Billy', 'Grace',\n 'Joe', 'Denise', 'Bruce', 'Amber', 'Gabriel', 'Marilyn', 'Logan', 'Beverly',\n 'Albert', 'Danielle', 'Willie', 'Theresa', 'Alan', 'Sophia', 'Juan', 'Marie',\n 'Wayne', 'Diana', 'Elijah', 'Brittany', 'Randy', 'Natalie', 'Roy', 'Isabella',\n 'Vincent', 'Charlotte', 'Ralph', 'Rose', 'Eugene', 'Alexis', 'Russell', 'Kayla'\n]\n\nexport const lastNames = [\n 'Smith', 'Johnson', 'Williams', 'Brown', 'Jones', 'Garcia', 'Miller', 'Davis',\n 'Rodriguez', 'Martinez', 'Hernandez', 'Lopez', 'Gonzalez', 'Wilson', 'Anderson', 'Thomas',\n 'Taylor', 'Moore', 'Jackson', 'Martin', 'Lee', 'Perez', 'Thompson', 'White',\n 'Harris', 'Sanchez', 'Clark', 'Ramirez', 'Lewis', 'Robinson', 'Walker', 'Young',\n 'Allen', 'King', 'Wright', 'Scott', 'Torres', 'Nguyen', 'Hill', 'Flores',\n 'Green', 'Adams', 'Nelson', 'Baker', 'Hall', 'Rivera', 'Campbell', 'Mitchell',\n 'Carter', 'Roberts', 'Gomez', 'Phillips', 'Evans', 'Turner', 'Diaz', 'Parker',\n 'Cruz', 'Edwards', 'Collins', 'Reyes', 'Stewart', 'Morris', 'Morales', 'Murphy',\n 'Cook', 'Rogers', 'Gutierrez', 'Ortiz', 'Morgan', 'Cooper', 'Peterson', 'Bailey',\n 'Reed', 'Kelly', 'Howard', 'Ramos', 'Kim', 'Cox', 'Ward', 'Richardson',\n 'Watson', 'Brooks', 'Chavez', 'Wood', 'James', 'Bennett', 'Gray', 'Mendoza',\n 'Ruiz', 'Hughes', 'Price', 'Alvarez', 'Castillo', 'Sanders', 'Patel', 'Myers',\n 'Long', 'Ross', 'Foster', 'Jimenez', 'Powell', 'Jenkins', 'Perry', 'Russell',\n 'Sullivan', 'Bell', 'Coleman', 'Butler', 'Henderson', 'Barnes', 'Gonzales', 'Fisher',\n 'Vasquez', 'Simmons', 'Romero', 'Jordan', 'Patterson', 'Alexander', 'Hamilton', 'Graham',\n 'Reynolds', 'Griffin', 'Wallace', 'Moreno', 'West', 'Cole', 'Hayes', 'Bryant',\n 'Herrera', 'Gibson', 'Ellis', 'Tran', 'Medina', 'Aguilar', 'Stevens', 'Murray',\n 'Ford', 'Castro', 'Marshall', 'Owens', 'Harrison', 'Fernandez', 'McDonald', 'Woods',\n 'Washington', 'Kennedy', 'Wells', 'Vargas', 'Henry', 'Chen', 'Freeman', 'Webb',\n 'Tucker', 'Guzman', 'Burns', 'Novak', 'Wagner', 'Estrada', 'Lin', 'Weaver'\n]\n\nexport const countries = [\n 'United States', 'Canada', 'United Kingdom', 'Germany', 'France', 'Japan', 'Australia',\n 'Brazil', 'India', 'China', 'Mexico', 'Italy', 'Spain', 'Netherlands', 'Sweden',\n 'Norway', 'Denmark', 'Finland', 'Switzerland', 'Austria', 'Belgium', 'Ireland',\n 'New Zealand', 'Singapore', 'South Korea', 'South Africa', 'Argentina', 'Chile',\n 'Colombia', 'Peru', 'Portugal', 'Greece', 'Turkey', 'Israel', 'Egypt', 'Thailand'\n]\n\nexport const cities = [\n 'New York', 'Los Angeles', 'Chicago', 'Houston', 'Phoenix', 'Philadelphia', 'San Antonio',\n 'San Diego', 'Dallas', 'San Jose', 'London', 'Paris', 'Berlin', 'Tokyo', 'Sydney',\n 'Toronto', 'Mumbai', 'Beijing', 'Sao Paulo', 'Mexico City', 'Madrid', 'Rome',\n 'Amsterdam', 'Stockholm', 'Oslo', 'Copenhagen', 'Helsinki', 'Zurich', 'Vienna',\n 'Brussels', 'Dublin', 'Auckland', 'Singapore', 'Seoul', 'Cape Town', 'Buenos Aires'\n]\n\nexport const domains = ['example.com', 'test.org', 'demo.net', 'sample.io', 'mail.com', 'web.dev']\n\nexport const streetNames = [\n 'Main St', 'High St', 'Broadway', 'Park Ave', 'Oak St', 'Cedar Ln', 'Maple Ave',\n 'Washington St', 'Lake View Dr', 'Sunset Blvd', 'River Rd', 'Church St', 'Market St'\n]\n\nexport const sentences = [\n 'The quick brown fox jumps over the lazy dog.',\n 'A journey of a thousand miles begins with a single step.',\n 'To be or not to be, that is the question.',\n 'All that glitters is not gold.',\n 'Fortune favors the bold.',\n 'Knowledge is power.',\n 'The pen is mightier than the sword.',\n 'Actions speak louder than words.',\n 'Better late than never.',\n 'Where there is a will, there is a way.'\n]\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAO,IAAM,aAAa;AAAA,EACtB;AAAA,EAAS;AAAA,EAAQ;AAAA,EAAU;AAAA,EAAY;AAAA,EAAQ;AAAA,EAAY;AAAA,EAAW;AAAA,EACtE;AAAA,EAAS;AAAA,EAAa;AAAA,EAAW;AAAA,EAAW;AAAA,EAAW;AAAA,EAAS;AAAA,EAAU;AAAA,EAC1E;AAAA,EAAU;AAAA,EAAS;AAAA,EAAe;AAAA,EAAS;AAAA,EAAW;AAAA,EAAQ;AAAA,EAAU;AAAA,EACxE;AAA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,GAAG;AAAA,EAEpF,cAAc,CAAC,KAAuB,MAAM,GAAG,MAAM,KAAK,YAAY,MAAM;AACxE,UAAM,MAAM,IAAI,OAAO,KAAK,KAAK,MAAM,OAAO;AAC9C,WAAO,WAAW,IAAI,QAAQ,SAAS,CAAC;AAAA,EAC5C;AAAA,EAEA,cAAc,CAAC,QAA0B,IAAI,OAAO,KAAU,SAAS;AAAA,EAEvE,eAAe,CAAC,KAAuBA,aAAY,MAAM;AACrD,WAAO,MAAM,KAAK,EAAE,QAAQA,WAAU,GAAG,MAAM,WAAW,aAAa,GAAG,CAAC,EAAE,KAAK,GAAG;AAAA,EACzF;AACJ;","names":["sentences"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Random } from 'schema-seed-core';
|
|
2
|
+
|
|
3
|
+
interface GeneratorContext {
|
|
4
|
+
random: Random;
|
|
5
|
+
}
|
|
6
|
+
declare const generators: {
|
|
7
|
+
email: (ctx: GeneratorContext) => string;
|
|
8
|
+
firstName: (ctx: GeneratorContext) => string;
|
|
9
|
+
lastName: (ctx: GeneratorContext) => string;
|
|
10
|
+
fullName: (ctx: GeneratorContext) => string;
|
|
11
|
+
phone: (ctx: GeneratorContext) => string;
|
|
12
|
+
username: (ctx: GeneratorContext) => string;
|
|
13
|
+
url: (ctx: GeneratorContext) => string;
|
|
14
|
+
country: (ctx: GeneratorContext) => string;
|
|
15
|
+
city: (ctx: GeneratorContext) => string;
|
|
16
|
+
address: (ctx: GeneratorContext) => string;
|
|
17
|
+
uuid: (ctx: GeneratorContext) => string;
|
|
18
|
+
dateRecent: (ctx: GeneratorContext, days?: number) => string;
|
|
19
|
+
datePast: (ctx: GeneratorContext, years?: number) => string;
|
|
20
|
+
booleanWeighted: (ctx: GeneratorContext, weight?: number) => boolean;
|
|
21
|
+
intRange: (ctx: GeneratorContext, min?: number, max?: number) => number;
|
|
22
|
+
decimalRange: (ctx: GeneratorContext, min?: number, max?: number, precision?: number) => number;
|
|
23
|
+
textSentence: (ctx: GeneratorContext) => string;
|
|
24
|
+
textParagraph: (ctx: GeneratorContext, sentences?: number) => string;
|
|
25
|
+
};
|
|
26
|
+
type GeneratorId = keyof typeof generators;
|
|
27
|
+
|
|
28
|
+
export { type GeneratorContext, type GeneratorId, generators };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Random } from 'schema-seed-core';
|
|
2
|
+
|
|
3
|
+
interface GeneratorContext {
|
|
4
|
+
random: Random;
|
|
5
|
+
}
|
|
6
|
+
declare const generators: {
|
|
7
|
+
email: (ctx: GeneratorContext) => string;
|
|
8
|
+
firstName: (ctx: GeneratorContext) => string;
|
|
9
|
+
lastName: (ctx: GeneratorContext) => string;
|
|
10
|
+
fullName: (ctx: GeneratorContext) => string;
|
|
11
|
+
phone: (ctx: GeneratorContext) => string;
|
|
12
|
+
username: (ctx: GeneratorContext) => string;
|
|
13
|
+
url: (ctx: GeneratorContext) => string;
|
|
14
|
+
country: (ctx: GeneratorContext) => string;
|
|
15
|
+
city: (ctx: GeneratorContext) => string;
|
|
16
|
+
address: (ctx: GeneratorContext) => string;
|
|
17
|
+
uuid: (ctx: GeneratorContext) => string;
|
|
18
|
+
dateRecent: (ctx: GeneratorContext, days?: number) => string;
|
|
19
|
+
datePast: (ctx: GeneratorContext, years?: number) => string;
|
|
20
|
+
booleanWeighted: (ctx: GeneratorContext, weight?: number) => boolean;
|
|
21
|
+
intRange: (ctx: GeneratorContext, min?: number, max?: number) => number;
|
|
22
|
+
decimalRange: (ctx: GeneratorContext, min?: number, max?: number, precision?: number) => number;
|
|
23
|
+
textSentence: (ctx: GeneratorContext) => string;
|
|
24
|
+
textParagraph: (ctx: GeneratorContext, sentences?: number) => string;
|
|
25
|
+
};
|
|
26
|
+
type GeneratorId = keyof typeof generators;
|
|
27
|
+
|
|
28
|
+
export { type GeneratorContext, type GeneratorId, generators };
|