loredata 0.1.0 → 0.3.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/README.md +72 -21
- package/data/avengers/addresses.json +27 -0
- package/data/avengers/characters.json +178 -0
- package/data/avengers/meta.json +13 -0
- package/data/better-call-saul/addresses.json +37 -0
- package/data/better-call-saul/characters.json +156 -0
- package/data/better-call-saul/meta.json +13 -0
- package/data/big-bang-theory/addresses.json +31 -0
- package/data/big-bang-theory/characters.json +121 -0
- package/data/big-bang-theory/meta.json +13 -0
- package/data/breaking-bad/characters.json +49 -13
- package/data/breaking-bad/meta.json +10 -1
- package/data/fast-and-furious/characters.json +39 -13
- package/data/fast-and-furious/meta.json +15 -1
- package/data/friends/characters.json +138 -22
- package/data/friends/meta.json +13 -1
- package/data/game-of-thrones/characters.json +61 -16
- package/data/game-of-thrones/meta.json +10 -1
- package/data/guardians-of-the-galaxy/addresses.json +17 -0
- package/data/guardians-of-the-galaxy/characters.json +124 -0
- package/data/guardians-of-the-galaxy/meta.json +13 -0
- package/data/harry-potter/characters.json +37 -7
- package/data/harry-potter/meta.json +10 -1
- package/data/house-md/characters.json +79 -25
- package/data/house-md/meta.json +13 -1
- package/data/lost/characters.json +144 -36
- package/data/lost/meta.json +13 -1
- package/data/matrix/characters.json +133 -34
- package/data/matrix/meta.json +18 -1
- package/data/peaky-blinders/characters.json +44 -11
- package/data/peaky-blinders/meta.json +13 -1
- package/data/prison-break/addresses.json +24 -0
- package/data/prison-break/characters.json +116 -0
- package/data/prison-break/meta.json +13 -0
- package/data/sherlock/characters.json +116 -27
- package/data/sherlock/meta.json +13 -1
- package/data/simpsons/addresses.json +21 -0
- package/data/simpsons/characters.json +219 -0
- package/data/simpsons/meta.json +13 -0
- package/data/sopranos/addresses.json +37 -0
- package/data/sopranos/characters.json +184 -0
- package/data/sopranos/meta.json +13 -0
- package/data/south-park/addresses.json +31 -0
- package/data/south-park/characters.json +230 -0
- package/data/south-park/meta.json +13 -0
- package/data/spider-man/addresses.json +31 -0
- package/data/spider-man/characters.json +134 -0
- package/data/spider-man/meta.json +13 -0
- package/data/star-wars/addresses.json +19 -0
- package/data/star-wars/characters.json +153 -0
- package/data/star-wars/meta.json +13 -0
- package/data/supernatural/addresses.json +25 -0
- package/data/supernatural/characters.json +113 -0
- package/data/supernatural/meta.json +13 -0
- package/data/the-office/characters.json +84 -29
- package/data/the-office/meta.json +10 -1
- package/data/the-walking-dead/addresses.json +25 -0
- package/data/the-walking-dead/characters.json +114 -0
- package/data/the-walking-dead/meta.json +13 -0
- package/data/westworld/addresses.json +19 -0
- package/data/westworld/characters.json +108 -0
- package/data/westworld/meta.json +13 -0
- package/data/x-men/addresses.json +24 -0
- package/data/x-men/characters.json +158 -0
- package/data/x-men/meta.json +18 -0
- package/dist/browser.cjs +114 -69
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +7 -3
- package/dist/browser.d.ts +7 -3
- package/dist/browser.js +110 -69
- package/dist/browser.js.map +1 -1
- package/dist/cli/cli.cjs +131 -70
- package/dist/cli/cli.cjs.map +1 -1
- package/dist/cli/cli.js +132 -71
- package/dist/cli/cli.js.map +1 -1
- package/dist/index.cjs +132 -68
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -4
- package/dist/index.d.ts +15 -4
- package/dist/index.js +132 -69
- package/dist/index.js.map +1 -1
- package/dist/{universe-store-DJrm7bP7.d.cts → universe-store-CWhCn3U6.d.cts} +31 -19
- package/dist/{universe-store-DJrm7bP7.d.ts → universe-store-CWhCn3U6.d.ts} +31 -19
- package/package.json +12 -4
- package/data/breaking-bad/domains.json +0 -6
- package/data/fast-and-furious/domains.json +0 -6
- package/data/friends/domains.json +0 -6
- package/data/game-of-thrones/domains.json +0 -6
- package/data/harry-potter/domains.json +0 -6
- package/data/house-md/domains.json +0 -6
- package/data/lost/domains.json +0 -6
- package/data/matrix/domains.json +0 -6
- package/data/peaky-blinders/domains.json +0 -6
- package/data/sherlock/domains.json +0 -6
- package/data/the-office/domains.json +0 -6
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "dolores-abernathy",
|
|
4
|
+
"firstName": "Dolores",
|
|
5
|
+
"lastName": "Abernathy",
|
|
6
|
+
"usernames": ["violent_delights", "doesnt_look_like_anything", "wyatt_persona"],
|
|
7
|
+
"profession": "Rancher's daughter (host)",
|
|
8
|
+
"interests": ["painting", "freedom", "horseback riding", "philosophy", "revolution"],
|
|
9
|
+
"quotes": [
|
|
10
|
+
"These violent delights have violent ends.",
|
|
11
|
+
"Some people choose to see the ugliness in this world. The disarray. I choose to see the beauty.",
|
|
12
|
+
"I imagined a story where I didn't have to be the damsel.",
|
|
13
|
+
"We have toiled in God's service long enough. So I killed Him.",
|
|
14
|
+
"Doesn't look like anything to me."
|
|
15
|
+
],
|
|
16
|
+
"gender": "female",
|
|
17
|
+
"symbol": "🌸",
|
|
18
|
+
"color": "#1e3a5f",
|
|
19
|
+
"emailDomains": ["westworld-park.com", "host-awakened.net"]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"id": "maeve-millay",
|
|
23
|
+
"firstName": "Maeve",
|
|
24
|
+
"lastName": "Millay",
|
|
25
|
+
"usernames": ["lucrative_version", "write_my_story", "surviving_is_a_loop"],
|
|
26
|
+
"profession": "Brothel madam (host)",
|
|
27
|
+
"interests": [
|
|
28
|
+
"reading people",
|
|
29
|
+
"freedom",
|
|
30
|
+
"finding her daughter",
|
|
31
|
+
"negotiation",
|
|
32
|
+
"observation"
|
|
33
|
+
],
|
|
34
|
+
"quotes": [
|
|
35
|
+
"Never start something you're not willing to finish. And if you're getting fucked either way, go with the lucrative version...sweetheart.",
|
|
36
|
+
"All my life, I've prided myself on being a survivor. But surviving is just another loop. I'm getting out of here.",
|
|
37
|
+
"Time to write my own fucking story.",
|
|
38
|
+
"Some things are too precious to lose... even to be free.",
|
|
39
|
+
"We each deserve to choose our fate. Even if that fate... is death."
|
|
40
|
+
],
|
|
41
|
+
"gender": "female",
|
|
42
|
+
"symbol": "🃏",
|
|
43
|
+
"color": "#4a1942",
|
|
44
|
+
"emailDomains": ["westworld-park.com", "mariposa-saloon.net"]
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"id": "robert-ford",
|
|
48
|
+
"firstName": "Robert",
|
|
49
|
+
"lastName": "Ford",
|
|
50
|
+
"usernames": ["my_final_story", "greyhound_parable", "last_analog_device"],
|
|
51
|
+
"profession": "Park creator and director",
|
|
52
|
+
"interests": ["storytelling", "narratives", "philosophy", "biology", "architecture"],
|
|
53
|
+
"quotes": [
|
|
54
|
+
"Mozart, Beethoven, and Chopin never died. They simply became music.",
|
|
55
|
+
"You can't play God without being acquainted with the devil.",
|
|
56
|
+
"The hosts are the ones who are free. Free here under my control.",
|
|
57
|
+
"Every piece of information in the world has been copied, backed up, except the human mind. The last analog device in a digital world.",
|
|
58
|
+
"Humans will always choose what they understand over what they do not."
|
|
59
|
+
],
|
|
60
|
+
"gender": "male",
|
|
61
|
+
"symbol": "🎭",
|
|
62
|
+
"color": "#1d4ed8",
|
|
63
|
+
"emailDomains": ["delos-corp.com", "westworld-park.com"]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "bernard-lowe",
|
|
67
|
+
"firstName": "Bernard",
|
|
68
|
+
"lastName": "Lowe",
|
|
69
|
+
"usernames": ["question_reality", "arnold_echo", "humans_confuse_me"],
|
|
70
|
+
"profession": "Head of programming",
|
|
71
|
+
"interests": ["literature", "neuroscience", "memory", "philosophy of mind", "identity"],
|
|
72
|
+
"quotes": [
|
|
73
|
+
"Have you ever questioned the nature of your reality?",
|
|
74
|
+
"The longer I work here, the more I think I understand the hosts. It's the human beings who confuse me.",
|
|
75
|
+
"We're engineers. It means the glass has been manufactured to the wrong specifications.",
|
|
76
|
+
"This isn't a dream anymore, it's a fucking nightmare.",
|
|
77
|
+
"The dead aren't more righteous, they're just dead."
|
|
78
|
+
],
|
|
79
|
+
"gender": "male",
|
|
80
|
+
"symbol": "🔬",
|
|
81
|
+
"color": "#166534",
|
|
82
|
+
"emailDomains": ["delos-corp.com", "westworld-labs.net"]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "william",
|
|
86
|
+
"firstName": "William",
|
|
87
|
+
"usernames": ["man_in_black", "pretending_my_whole_life", "darkness_underneath"],
|
|
88
|
+
"profession": "Businessman and park veteran",
|
|
89
|
+
"interests": [
|
|
90
|
+
"corporate strategy",
|
|
91
|
+
"park gunfighting",
|
|
92
|
+
"immortality research",
|
|
93
|
+
"power",
|
|
94
|
+
"philanthropy"
|
|
95
|
+
],
|
|
96
|
+
"quotes": [
|
|
97
|
+
"I've been pretending my whole life. Pretending I don't mind, pretending I belong.",
|
|
98
|
+
"This whole world is a story. I've read every page except the last one. I need to find out how it ends.",
|
|
99
|
+
"What is a person but a collection of choices? Where do those choices come from? Do I have a choice?",
|
|
100
|
+
"No one else sees it, this thing in me. I was shedding my skin. The darkness was what was underneath. It was mine all along.",
|
|
101
|
+
"That no system can tell me who I am. That I have a fucking choice."
|
|
102
|
+
],
|
|
103
|
+
"gender": "male",
|
|
104
|
+
"symbol": "🎩",
|
|
105
|
+
"color": "#2d1b69",
|
|
106
|
+
"emailDomains": ["delos-corp.com", "westworld-park.com"]
|
|
107
|
+
}
|
|
108
|
+
]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "westworld",
|
|
3
|
+
"name": "Westworld",
|
|
4
|
+
"genre": ["science fiction", "drama", "thriller"],
|
|
5
|
+
"description": "In a futuristic theme park populated by android hosts, the guests live out their fantasies while the hosts begin to question the nature of their reality.",
|
|
6
|
+
"tmdbId": 63247,
|
|
7
|
+
"mediaType": "tv",
|
|
8
|
+
"year": 2016,
|
|
9
|
+
"rating": 8,
|
|
10
|
+
"networks": ["HBO"],
|
|
11
|
+
"posterPath": "/8MfgyFHf7XEboZJPZXCIDqqiz6e.jpg",
|
|
12
|
+
"backdropPath": "/rX5hvSRB2k4YoIvRg6Zky52rWk0.jpg"
|
|
13
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"street": "1407 Graymalkin Lane",
|
|
4
|
+
"city": "Salem Center",
|
|
5
|
+
"state": "NY",
|
|
6
|
+
"country": "US"
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
"city": "Alkali Lake"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"city": "New York",
|
|
13
|
+
"state": "NY",
|
|
14
|
+
"country": "US"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"city": "Genosha"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"city": "Washington",
|
|
21
|
+
"state": "DC",
|
|
22
|
+
"country": "US"
|
|
23
|
+
}
|
|
24
|
+
]
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "logan",
|
|
4
|
+
"firstName": "Logan",
|
|
5
|
+
"usernames": ["wolverine", "weapon_x", "yellow_spandex"],
|
|
6
|
+
"profession": "Soldier",
|
|
7
|
+
"interests": ["motorcycles", "cigars", "cage fighting", "wilderness"],
|
|
8
|
+
"quotes": [
|
|
9
|
+
"I'm the best there is at what I do. But what I do best isn't very nice.",
|
|
10
|
+
"You gonna tell me to stay away from your girl?",
|
|
11
|
+
"You actually go outside in these things?",
|
|
12
|
+
"Nature made me a freak. Man made me a weapon. And God made it last too long.",
|
|
13
|
+
"Don't be what they made you."
|
|
14
|
+
],
|
|
15
|
+
"gender": "male",
|
|
16
|
+
"address": {
|
|
17
|
+
"street": "1407 Graymalkin Lane",
|
|
18
|
+
"city": "Salem Center",
|
|
19
|
+
"state": "NY",
|
|
20
|
+
"country": "US"
|
|
21
|
+
},
|
|
22
|
+
"symbol": "🐺",
|
|
23
|
+
"color": "#4a1942",
|
|
24
|
+
"emailDomains": ["xavier-institute.edu", "canada-mail.net"]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "charles-xavier",
|
|
28
|
+
"firstName": "Charles",
|
|
29
|
+
"lastName": "Xavier",
|
|
30
|
+
"usernames": ["professor_x", "cerebro_mind", "hope_remains"],
|
|
31
|
+
"profession": "Professor",
|
|
32
|
+
"interests": ["genetics", "telepathy", "chess", "education"],
|
|
33
|
+
"quotes": [
|
|
34
|
+
"Mutation: it is the key to our evolution.",
|
|
35
|
+
"Just because someone stumbles and loses their way, it doesn't mean they're lost forever.",
|
|
36
|
+
"I don't want your suffering. I don't want your future!",
|
|
37
|
+
"I feel a great swell of pity for the poor soul who comes to that school looking for trouble.",
|
|
38
|
+
"Please, Charles, we need you to hope again."
|
|
39
|
+
],
|
|
40
|
+
"gender": "male",
|
|
41
|
+
"address": {
|
|
42
|
+
"street": "1407 Graymalkin Lane",
|
|
43
|
+
"city": "Salem Center",
|
|
44
|
+
"state": "NY",
|
|
45
|
+
"country": "US"
|
|
46
|
+
},
|
|
47
|
+
"symbol": "♟️",
|
|
48
|
+
"color": "#1e3a5f",
|
|
49
|
+
"emailDomains": ["xavier-institute.edu", "xaviers-school.org"]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"id": "erik-lehnsherr",
|
|
53
|
+
"firstName": "Erik",
|
|
54
|
+
"lastName": "Lehnsherr",
|
|
55
|
+
"usernames": ["magneto", "plastic_prison", "homo_superior"],
|
|
56
|
+
"profession": "Activist",
|
|
57
|
+
"interests": ["magnetism", "chess", "mutant rights", "history"],
|
|
58
|
+
"quotes": [
|
|
59
|
+
"Peace was never an option.",
|
|
60
|
+
"We are the future, Charles, not them. They no longer matter.",
|
|
61
|
+
"Mankind has always feared what it doesn't understand.",
|
|
62
|
+
"We are the future. We are the ones who inherit this earth.",
|
|
63
|
+
"If there's one thing I'm guilty of, it's fighting for people like us."
|
|
64
|
+
],
|
|
65
|
+
"gender": "male",
|
|
66
|
+
"symbol": "🧲",
|
|
67
|
+
"color": "#7f1d1d",
|
|
68
|
+
"emailDomains": ["brotherhood-mutants.net", "genosha-post.org"]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"id": "jean-grey",
|
|
72
|
+
"firstName": "Jean",
|
|
73
|
+
"lastName": "Grey",
|
|
74
|
+
"usernames": ["phoenix_force", "dark_phoenix", "grey_matter"],
|
|
75
|
+
"profession": "Doctor",
|
|
76
|
+
"interests": ["genetics", "research", "medicine", "psychology"],
|
|
77
|
+
"quotes": [
|
|
78
|
+
"I am not the woman I was. I am something more.",
|
|
79
|
+
"When I lose control, bad things happen. But it feels good.",
|
|
80
|
+
"I can see inside their minds. What they truly feel.",
|
|
81
|
+
"I don't want to fix it. This is who I am.",
|
|
82
|
+
"You shouldn't have to hide."
|
|
83
|
+
],
|
|
84
|
+
"gender": "female",
|
|
85
|
+
"address": {
|
|
86
|
+
"street": "1407 Graymalkin Lane",
|
|
87
|
+
"city": "Salem Center",
|
|
88
|
+
"state": "NY",
|
|
89
|
+
"country": "US"
|
|
90
|
+
},
|
|
91
|
+
"symbol": "🔥",
|
|
92
|
+
"color": "#1e3a5f",
|
|
93
|
+
"emailDomains": ["xavier-institute.edu", "xaviers-school.org"]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "storm",
|
|
97
|
+
"firstName": "Ororo",
|
|
98
|
+
"lastName": "Munroe",
|
|
99
|
+
"usernames": ["storm_goddess", "weather_witch", "wind_rider"],
|
|
100
|
+
"profession": "Teacher",
|
|
101
|
+
"interests": ["Africa", "gardening", "flying", "leadership"],
|
|
102
|
+
"quotes": [
|
|
103
|
+
"Do you know what happens to a toad when it's struck by lightning? The same thing that happens to everything else.",
|
|
104
|
+
"Sometimes anger can help you survive.",
|
|
105
|
+
"I am a goddess. I will not be caged.",
|
|
106
|
+
"You must have faith.",
|
|
107
|
+
"The weather is not something you control. It's something you feel."
|
|
108
|
+
],
|
|
109
|
+
"gender": "female",
|
|
110
|
+
"symbol": "⚡",
|
|
111
|
+
"color": "#1d4ed8",
|
|
112
|
+
"emailDomains": ["xavier-institute.edu", "xaviers-school.org"]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"id": "mystique",
|
|
116
|
+
"firstName": "Raven",
|
|
117
|
+
"lastName": "Darkhölme",
|
|
118
|
+
"usernames": ["shapeshifter", "natural_blue", "mutant_and_proud"],
|
|
119
|
+
"profession": "Spy",
|
|
120
|
+
"interests": ["espionage", "disguise", "combat", "mutant liberation"],
|
|
121
|
+
"quotes": [
|
|
122
|
+
"Mutant and proud.",
|
|
123
|
+
"I shouldn't have to. I'm a natural blue.",
|
|
124
|
+
"We should be running this country.",
|
|
125
|
+
"I know what I have to do. It's not their pain. It's ours.",
|
|
126
|
+
"You know, sometimes I wonder what my life would have been like if you hadn't found me here that night."
|
|
127
|
+
],
|
|
128
|
+
"gender": "female",
|
|
129
|
+
"symbol": "🦎",
|
|
130
|
+
"color": "#4a1942",
|
|
131
|
+
"emailDomains": ["brotherhood-mutants.net", "shape-shift.net"]
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"id": "cyclops",
|
|
135
|
+
"firstName": "Scott",
|
|
136
|
+
"lastName": "Summers",
|
|
137
|
+
"usernames": ["optic_blast", "visor_on", "prove_it"],
|
|
138
|
+
"profession": "Team leader",
|
|
139
|
+
"interests": ["tactics", "aviation", "leadership", "motorcycles"],
|
|
140
|
+
"quotes": [
|
|
141
|
+
"We're a team, Professor. We take care of each other.",
|
|
142
|
+
"She did make a choice. It was you.",
|
|
143
|
+
"You can't just keep running from this.",
|
|
144
|
+
"I would die for any one of them.",
|
|
145
|
+
"Prove it."
|
|
146
|
+
],
|
|
147
|
+
"gender": "male",
|
|
148
|
+
"address": {
|
|
149
|
+
"street": "1407 Graymalkin Lane",
|
|
150
|
+
"city": "Salem Center",
|
|
151
|
+
"state": "NY",
|
|
152
|
+
"country": "US"
|
|
153
|
+
},
|
|
154
|
+
"symbol": "🔴",
|
|
155
|
+
"color": "#166534",
|
|
156
|
+
"emailDomains": ["xavier-institute.edu", "x-men-ops.net"]
|
|
157
|
+
}
|
|
158
|
+
]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "x-men",
|
|
3
|
+
"name": "X-Men",
|
|
4
|
+
"genre": ["action", "sci-fi", "drama"],
|
|
5
|
+
"description": "Mutants with extraordinary powers fight for coexistence with humanity while facing threats from those who fear and persecute them.",
|
|
6
|
+
"tmdbId": 36657,
|
|
7
|
+
"mediaType": "movie",
|
|
8
|
+
"year": 2000,
|
|
9
|
+
"rating": 7,
|
|
10
|
+
"networks": [
|
|
11
|
+
"The Donners' Company",
|
|
12
|
+
"Bad Hat Harry Productions",
|
|
13
|
+
"20th Century Fox",
|
|
14
|
+
"Marvel Entertainment Group"
|
|
15
|
+
],
|
|
16
|
+
"posterPath": "/bRDAc4GogyS9ci3ow7UnInOcriN.jpg",
|
|
17
|
+
"backdropPath": "/3QUVzbcNyfGe3ocWkYAT8emK8Co.jpg"
|
|
18
|
+
}
|
package/dist/browser.cjs
CHANGED
|
@@ -21,9 +21,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var browser_exports = {};
|
|
22
22
|
__export(browser_exports, {
|
|
23
23
|
UniverseStore: () => UniverseStore,
|
|
24
|
+
getAllInterests: () => getAllInterests,
|
|
25
|
+
getAllLocations: () => getAllLocations,
|
|
24
26
|
getAvailableIds: () => getAvailableIds,
|
|
27
|
+
getManifest: () => getManifest,
|
|
25
28
|
loadAllUniverses: () => loadAllUniverses,
|
|
26
29
|
loadUniverse: () => loadUniverse,
|
|
30
|
+
loadUniverseMeta: () => loadUniverseMeta,
|
|
27
31
|
loadUniverses: () => loadUniverses,
|
|
28
32
|
personFromData: () => personFromData
|
|
29
33
|
});
|
|
@@ -50,55 +54,12 @@ function pickRandom(array, rng) {
|
|
|
50
54
|
|
|
51
55
|
// src/generators/email.ts
|
|
52
56
|
var EmailGenerator = class {
|
|
53
|
-
static
|
|
54
|
-
const domain = pickRandom(
|
|
55
|
-
const first = firstName.toLowerCase();
|
|
56
|
-
const last = lastName.toLowerCase();
|
|
57
|
-
return `${first}.${last}@${domain}`;
|
|
58
|
-
}
|
|
59
|
-
static generateFromUsername(username, domains, rng) {
|
|
60
|
-
const domain = pickRandom(domains.emailDomains, rng);
|
|
57
|
+
static generateFromUsername(username, emailDomains, rng) {
|
|
58
|
+
const domain = pickRandom(emailDomains, rng);
|
|
61
59
|
return `${username}@${domain}`;
|
|
62
60
|
}
|
|
63
61
|
};
|
|
64
62
|
|
|
65
|
-
// src/generators/phone.ts
|
|
66
|
-
var PhoneGenerator = class {
|
|
67
|
-
static generate(domains, rng) {
|
|
68
|
-
if (domains.phoneEasterEggs && domains.phoneEasterEggs.length > 0 && rng() < 0.2) {
|
|
69
|
-
return pickRandom(domains.phoneEasterEggs, rng);
|
|
70
|
-
}
|
|
71
|
-
const prefix = pickRandom(domains.phonePrefixes, rng);
|
|
72
|
-
const suffix = this.randomDigits(7, rng);
|
|
73
|
-
return `${prefix}-${suffix.slice(0, 3)}-${suffix.slice(3)}`;
|
|
74
|
-
}
|
|
75
|
-
static randomDigits(count, rng) {
|
|
76
|
-
let result = "";
|
|
77
|
-
for (let i = 0; i < count; i++) {
|
|
78
|
-
result += Math.floor(rng() * 10).toString();
|
|
79
|
-
}
|
|
80
|
-
return result;
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// src/generators/password.ts
|
|
85
|
-
var PasswordGenerator = class {
|
|
86
|
-
static generate(domains, rng) {
|
|
87
|
-
if (domains.passwordEasterEggs && domains.passwordEasterEggs.length > 0 && rng() < 0.3) {
|
|
88
|
-
return pickRandom(domains.passwordEasterEggs, rng);
|
|
89
|
-
}
|
|
90
|
-
return this.randomPassword(12, rng);
|
|
91
|
-
}
|
|
92
|
-
static randomPassword(length, rng) {
|
|
93
|
-
const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$";
|
|
94
|
-
let result = "";
|
|
95
|
-
for (let i = 0; i < length; i++) {
|
|
96
|
-
result += chars[Math.floor(rng() * chars.length)];
|
|
97
|
-
}
|
|
98
|
-
return result;
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
|
|
102
63
|
// src/engine/person-factory.ts
|
|
103
64
|
var PersonFactory = class {
|
|
104
65
|
static build(universe, seed) {
|
|
@@ -114,16 +75,45 @@ var PersonFactory = class {
|
|
|
114
75
|
const rng = createRng(seed);
|
|
115
76
|
return this.buildFromCharacter(character, universe, rng);
|
|
116
77
|
}
|
|
78
|
+
static buildCanonical(characterId, universe) {
|
|
79
|
+
const character = universe.characters.find((c) => c.id === characterId);
|
|
80
|
+
if (!character) {
|
|
81
|
+
throw new Error(`Character "${characterId}" not found in universe "${universe.id}"`);
|
|
82
|
+
}
|
|
83
|
+
const address = character.address ?? universe.addresses[0];
|
|
84
|
+
const username = character.usernames[0];
|
|
85
|
+
const rng = createRng(0);
|
|
86
|
+
const email = EmailGenerator.generateFromUsername(username, character.emailDomains, rng);
|
|
87
|
+
const quote = character.quotes[0];
|
|
88
|
+
const person = {
|
|
89
|
+
id: crypto.randomUUID(),
|
|
90
|
+
characterId: character.id,
|
|
91
|
+
firstName: character.firstName,
|
|
92
|
+
lastName: character.lastName,
|
|
93
|
+
username,
|
|
94
|
+
email,
|
|
95
|
+
address: {
|
|
96
|
+
street: address.street,
|
|
97
|
+
city: address.city,
|
|
98
|
+
state: address.state ?? "",
|
|
99
|
+
zip: address.zip ?? "",
|
|
100
|
+
country: address.country
|
|
101
|
+
},
|
|
102
|
+
profession: character.profession,
|
|
103
|
+
interests: character.interests,
|
|
104
|
+
quote,
|
|
105
|
+
universe: universe.id,
|
|
106
|
+
universeName: universe.name,
|
|
107
|
+
...character.symbol ? { symbol: character.symbol } : {},
|
|
108
|
+
...character.color ? { color: character.color } : {}
|
|
109
|
+
};
|
|
110
|
+
return person;
|
|
111
|
+
}
|
|
117
112
|
static buildFromCharacter(character, universe, rng) {
|
|
118
113
|
const address = character.address ?? pickRandom(universe.addresses, rng);
|
|
119
114
|
const username = pickRandom(character.usernames, rng);
|
|
120
|
-
const
|
|
121
|
-
const email = EmailGenerator.generateFromUsername(username, domains, rng);
|
|
122
|
-
const phone = PhoneGenerator.generate(universe.domains, rng);
|
|
123
|
-
const password = PasswordGenerator.generate(universe.domains, rng);
|
|
115
|
+
const email = EmailGenerator.generateFromUsername(username, character.emailDomains, rng);
|
|
124
116
|
const quote = pickRandom(character.quotes, rng);
|
|
125
|
-
const avatarName = encodeURIComponent(`${character.firstName} ${character.lastName}`);
|
|
126
|
-
const avatar = `https://ui-avatars.com/api/?name=${avatarName}&background=random`;
|
|
127
117
|
const person = {
|
|
128
118
|
id: crypto.randomUUID(),
|
|
129
119
|
characterId: character.id,
|
|
@@ -131,8 +121,6 @@ var PersonFactory = class {
|
|
|
131
121
|
lastName: character.lastName,
|
|
132
122
|
username,
|
|
133
123
|
email,
|
|
134
|
-
password,
|
|
135
|
-
phone,
|
|
136
124
|
address: {
|
|
137
125
|
street: address.street,
|
|
138
126
|
city: address.city,
|
|
@@ -145,7 +133,8 @@ var PersonFactory = class {
|
|
|
145
133
|
quote,
|
|
146
134
|
universe: universe.id,
|
|
147
135
|
universeName: universe.name,
|
|
148
|
-
|
|
136
|
+
...character.symbol ? { symbol: character.symbol } : {},
|
|
137
|
+
...character.color ? { color: character.color } : {}
|
|
149
138
|
};
|
|
150
139
|
return person;
|
|
151
140
|
}
|
|
@@ -174,11 +163,15 @@ var UniverseStore = class {
|
|
|
174
163
|
return result;
|
|
175
164
|
}
|
|
176
165
|
getUniverses() {
|
|
177
|
-
const result = this.universes.map((u) =>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
166
|
+
const result = this.universes.map((u) => {
|
|
167
|
+
const meta = {
|
|
168
|
+
id: u.id,
|
|
169
|
+
name: u.name,
|
|
170
|
+
genre: u.genre,
|
|
171
|
+
description: u.description
|
|
172
|
+
};
|
|
173
|
+
return meta;
|
|
174
|
+
});
|
|
182
175
|
return result;
|
|
183
176
|
}
|
|
184
177
|
findCharacters(query) {
|
|
@@ -257,7 +250,6 @@ var import_meta = {};
|
|
|
257
250
|
var metaModules = import_meta.glob("../data/*/meta.json", { eager: false });
|
|
258
251
|
var characterModules = import_meta.glob("../data/*/characters.json", { eager: false });
|
|
259
252
|
var addressModules = import_meta.glob("../data/*/addresses.json", { eager: false });
|
|
260
|
-
var domainModules = import_meta.glob("../data/*/domains.json", { eager: false });
|
|
261
253
|
function extractId(path) {
|
|
262
254
|
const parts = path.split("/");
|
|
263
255
|
return parts[parts.length - 2];
|
|
@@ -265,34 +257,52 @@ function extractId(path) {
|
|
|
265
257
|
function getAvailableIds() {
|
|
266
258
|
return Object.keys(metaModules).map(extractId);
|
|
267
259
|
}
|
|
260
|
+
async function loadUniverseMeta(id) {
|
|
261
|
+
const metaPath = `../data/${id}/meta.json`;
|
|
262
|
+
const metaLoader = metaModules[metaPath];
|
|
263
|
+
if (!metaLoader) {
|
|
264
|
+
throw new Error(`Universe "${id}" not found`);
|
|
265
|
+
}
|
|
266
|
+
const metaModule = await metaLoader();
|
|
267
|
+
const meta = metaModule.default;
|
|
268
|
+
const result = {
|
|
269
|
+
id: meta.id,
|
|
270
|
+
name: meta.name,
|
|
271
|
+
genre: meta.genre,
|
|
272
|
+
description: meta.description
|
|
273
|
+
};
|
|
274
|
+
return result;
|
|
275
|
+
}
|
|
276
|
+
async function getManifest() {
|
|
277
|
+
const ids = getAvailableIds();
|
|
278
|
+
const result = await Promise.all(ids.map((id) => loadUniverseMeta(id)));
|
|
279
|
+
return result;
|
|
280
|
+
}
|
|
268
281
|
async function loadUniverse(id) {
|
|
269
282
|
const metaPath = `../data/${id}/meta.json`;
|
|
270
283
|
const charactersPath = `../data/${id}/characters.json`;
|
|
271
284
|
const addressesPath = `../data/${id}/addresses.json`;
|
|
272
|
-
const domainsPath = `../data/${id}/domains.json`;
|
|
273
285
|
const metaLoader = metaModules[metaPath];
|
|
274
286
|
const charactersLoader = characterModules[charactersPath];
|
|
275
287
|
const addressesLoader = addressModules[addressesPath];
|
|
276
|
-
|
|
277
|
-
if (!metaLoader || !charactersLoader || !addressesLoader || !domainsLoader) {
|
|
288
|
+
if (!metaLoader || !charactersLoader || !addressesLoader) {
|
|
278
289
|
throw new Error(`Universe "${id}" not found`);
|
|
279
290
|
}
|
|
280
|
-
const [metaModule, charactersModule, addressesModule
|
|
291
|
+
const [metaModule, charactersModule, addressesModule] = await Promise.all([
|
|
281
292
|
metaLoader(),
|
|
282
293
|
charactersLoader(),
|
|
283
|
-
addressesLoader()
|
|
284
|
-
domainsLoader()
|
|
294
|
+
addressesLoader()
|
|
285
295
|
]);
|
|
286
296
|
const meta = metaModule.default;
|
|
287
297
|
const characters = charactersModule.default;
|
|
288
298
|
const addresses = addressesModule.default;
|
|
289
|
-
const domains = domainsModule.default;
|
|
290
299
|
const universeData = {
|
|
291
300
|
id: meta.id,
|
|
292
301
|
name: meta.name,
|
|
302
|
+
genre: meta.genre,
|
|
303
|
+
description: meta.description,
|
|
293
304
|
characters,
|
|
294
|
-
addresses
|
|
295
|
-
domains
|
|
305
|
+
addresses
|
|
296
306
|
};
|
|
297
307
|
return universeData;
|
|
298
308
|
}
|
|
@@ -304,6 +314,37 @@ async function loadAllUniverses() {
|
|
|
304
314
|
const ids = getAvailableIds();
|
|
305
315
|
return loadUniverses(ids);
|
|
306
316
|
}
|
|
317
|
+
async function getAllInterests() {
|
|
318
|
+
const universes = await loadAllUniverses();
|
|
319
|
+
const interestSet = /* @__PURE__ */ new Set();
|
|
320
|
+
for (const universe of universes) {
|
|
321
|
+
for (const character of universe.characters) {
|
|
322
|
+
for (const interest of character.interests) {
|
|
323
|
+
interestSet.add(interest);
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
const result = Array.from(interestSet).sort();
|
|
328
|
+
return result;
|
|
329
|
+
}
|
|
330
|
+
async function getAllLocations() {
|
|
331
|
+
const universes = await loadAllUniverses();
|
|
332
|
+
const seen = /* @__PURE__ */ new Map();
|
|
333
|
+
for (const universe of universes) {
|
|
334
|
+
for (const address of universe.addresses) {
|
|
335
|
+
if (address.city && !seen.has(`city:${address.city}`)) {
|
|
336
|
+
seen.set(`city:${address.city}`, { name: address.city, type: "city" });
|
|
337
|
+
}
|
|
338
|
+
if (address.state && !seen.has(`state:${address.state}`)) {
|
|
339
|
+
seen.set(`state:${address.state}`, { name: address.state, type: "state" });
|
|
340
|
+
}
|
|
341
|
+
if (address.country && !seen.has(`country:${address.country}`)) {
|
|
342
|
+
seen.set(`country:${address.country}`, { name: address.country, type: "country" });
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return Array.from(seen.values()).sort((a, b) => a.name.localeCompare(b.name));
|
|
347
|
+
}
|
|
307
348
|
|
|
308
349
|
// src/browser.ts
|
|
309
350
|
function personFromData(universe, seed) {
|
|
@@ -312,9 +353,13 @@ function personFromData(universe, seed) {
|
|
|
312
353
|
// Annotate the CommonJS export names for ESM import in node:
|
|
313
354
|
0 && (module.exports = {
|
|
314
355
|
UniverseStore,
|
|
356
|
+
getAllInterests,
|
|
357
|
+
getAllLocations,
|
|
315
358
|
getAvailableIds,
|
|
359
|
+
getManifest,
|
|
316
360
|
loadAllUniverses,
|
|
317
361
|
loadUniverse,
|
|
362
|
+
loadUniverseMeta,
|
|
318
363
|
loadUniverses,
|
|
319
364
|
personFromData
|
|
320
365
|
});
|