@lgriffin/esi.ts 9.4.0 → 9.7.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/CHANGELOG.md +29 -0
- package/README.md +71 -52
- package/dist/EsiClient.d.ts +4 -0
- package/dist/EsiClient.d.ts.map +1 -1
- package/dist/clients/AllianceClient.d.ts +2 -0
- package/dist/clients/AllianceClient.d.ts.map +1 -1
- package/dist/clients/AssetsClient.d.ts +2 -0
- package/dist/clients/AssetsClient.d.ts.map +1 -1
- package/dist/clients/BaseEsiClient.d.ts +1 -0
- package/dist/clients/BaseEsiClient.d.ts.map +1 -1
- package/dist/clients/CalendarClient.d.ts +2 -0
- package/dist/clients/CalendarClient.d.ts.map +1 -1
- package/dist/clients/CharacterClient.d.ts +8 -0
- package/dist/clients/CharacterClient.d.ts.map +1 -1
- package/dist/clients/ClonesClient.d.ts +1 -0
- package/dist/clients/ClonesClient.d.ts.map +1 -1
- package/dist/clients/ContactsClient.d.ts +6 -0
- package/dist/clients/ContactsClient.d.ts.map +1 -1
- package/dist/clients/ContractsClient.d.ts +3 -0
- package/dist/clients/ContractsClient.d.ts.map +1 -1
- package/dist/clients/CorporationsClient.d.ts +17 -0
- package/dist/clients/CorporationsClient.d.ts.map +1 -1
- package/dist/clients/CosmeticsClient.d.ts +11 -0
- package/dist/clients/CosmeticsClient.d.ts.map +1 -0
- package/dist/clients/FittingsClient.d.ts +1 -0
- package/dist/clients/FittingsClient.d.ts.map +1 -1
- package/dist/clients/FleetClient.d.ts +2 -0
- package/dist/clients/FleetClient.d.ts.map +1 -1
- package/dist/clients/IndustryClient.d.ts +8 -0
- package/dist/clients/IndustryClient.d.ts.map +1 -1
- package/dist/clients/KillmailsClient.d.ts +2 -0
- package/dist/clients/KillmailsClient.d.ts.map +1 -1
- package/dist/clients/LoyaltyClient.d.ts +2 -0
- package/dist/clients/LoyaltyClient.d.ts.map +1 -1
- package/dist/clients/MailClient.d.ts +5 -0
- package/dist/clients/MailClient.d.ts.map +1 -1
- package/dist/clients/MarketClient.d.ts +6 -0
- package/dist/clients/MarketClient.d.ts.map +1 -1
- package/dist/clients/MercenaryClient.d.ts +19 -1
- package/dist/clients/MercenaryClient.d.ts.map +1 -1
- package/dist/clients/ParagonHubClient.d.ts +13 -0
- package/dist/clients/ParagonHubClient.d.ts.map +1 -0
- package/dist/clients/PiClient.d.ts +2 -0
- package/dist/clients/PiClient.d.ts.map +1 -1
- package/dist/clients/SkillsClient.d.ts +1 -0
- package/dist/clients/SkillsClient.d.ts.map +1 -1
- package/dist/clients/SkyhooksClient.d.ts +19 -1
- package/dist/clients/SkyhooksClient.d.ts.map +1 -1
- package/dist/clients/WalletClient.d.ts +4 -0
- package/dist/clients/WalletClient.d.ts.map +1 -1
- package/dist/clients/WarsClient.d.ts +2 -0
- package/dist/clients/WarsClient.d.ts.map +1 -1
- package/dist/core/ApiClient.d.ts +4 -0
- package/dist/core/ApiClient.d.ts.map +1 -1
- package/dist/core/ApiClientBuilder.d.ts +3 -1
- package/dist/core/ApiClientBuilder.d.ts.map +1 -1
- package/dist/core/ApiRequestHandler.d.ts.map +1 -1
- package/dist/core/ClientRegistry.d.ts +5 -3
- package/dist/core/ClientRegistry.d.ts.map +1 -1
- package/dist/core/cache/cacheKey.d.ts +3 -0
- package/dist/core/cache/cacheKey.d.ts.map +1 -0
- package/dist/core/constants.d.ts +2 -2
- package/dist/core/endpoints/EndpointDefinition.d.ts +2 -2
- package/dist/core/endpoints/EndpointDefinition.d.ts.map +1 -1
- package/dist/core/endpoints/cosmeticsEndpoints.d.ts +52 -0
- package/dist/core/endpoints/cosmeticsEndpoints.d.ts.map +1 -0
- package/dist/core/endpoints/createClient.d.ts +2 -2
- package/dist/core/endpoints/createClient.d.ts.map +1 -1
- package/dist/core/endpoints/mercenaryEndpoints.d.ts +45 -0
- package/dist/core/endpoints/mercenaryEndpoints.d.ts.map +1 -1
- package/dist/core/endpoints/paragonHubEndpoints.d.ts +163 -0
- package/dist/core/endpoints/paragonHubEndpoints.d.ts.map +1 -0
- package/dist/core/endpoints/skyhookEndpoints.d.ts +64 -0
- package/dist/core/endpoints/skyhookEndpoints.d.ts.map +1 -1
- package/dist/core/logger/NoopLogger.d.ts +3 -0
- package/dist/core/logger/NoopLogger.d.ts.map +1 -0
- package/dist/core/pagination/AsyncPaginationIterator.d.ts +1 -0
- package/dist/core/pagination/AsyncPaginationIterator.d.ts.map +1 -1
- package/dist/core/rateLimiter/RateLimiter.d.ts +6 -0
- package/dist/core/rateLimiter/RateLimiter.d.ts.map +1 -1
- package/dist/core/requestPipeline/cachePolicy.d.ts +3 -3
- package/dist/core/requestPipeline/cachePolicy.d.ts.map +1 -1
- package/dist/core/requestPipeline/headers.d.ts.map +1 -1
- package/dist/core/requestPipeline/statusHandling.d.ts +2 -2
- package/dist/core/requestPipeline/statusHandling.d.ts.map +1 -1
- package/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1141 -76
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1137 -76
- package/dist/index.mjs.map +1 -1
- package/dist/schemas/common.d.ts +11 -1
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/cosmetics.d.ts +58 -0
- package/dist/schemas/cosmetics.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +2 -0
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +1467 -1192
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/index.mjs +1433 -1192
- package/dist/schemas/index.mjs.map +1 -1
- package/dist/schemas/mercenary.d.ts +54 -0
- package/dist/schemas/mercenary.d.ts.map +1 -1
- package/dist/schemas/paragon-hub.d.ts +96 -0
- package/dist/schemas/paragon-hub.d.ts.map +1 -0
- package/dist/schemas/skyhooks.d.ts +101 -0
- package/dist/schemas/skyhooks.d.ts.map +1 -1
- package/dist/sde/index.js +7 -5100
- package/dist/sde/index.js.map +1 -1
- package/dist/sde/index.mjs +12 -5134
- package/dist/sde/index.mjs.map +1 -1
- package/dist/sde/memory.d.ts +8 -0
- package/dist/sde/memory.d.ts.map +1 -0
- package/dist/sde/memory.js +1100 -0
- package/dist/sde/memory.js.map +1 -0
- package/dist/sde/memory.mjs +1064 -0
- package/dist/sde/memory.mjs.map +1 -0
- package/dist/types/api-responses.d.ts +2 -0
- package/dist/types/api-responses.d.ts.map +1 -1
- package/dist/types/cosmetics.d.ts +8 -0
- package/dist/types/cosmetics.d.ts.map +1 -0
- package/dist/types/generated/esi-spec.generated.d.ts +12 -12
- package/dist/types/generated/esi-spec.generated.d.ts.map +1 -1
- package/dist/types/mercenary.d.ts +3 -1
- package/dist/types/mercenary.d.ts.map +1 -1
- package/dist/types/paragon-hub.d.ts +8 -0
- package/dist/types/paragon-hub.d.ts.map +1 -0
- package/dist/types/skyhooks.d.ts +3 -1
- package/dist/types/skyhooks.d.ts.map +1 -1
- package/package.json +30 -9
|
@@ -0,0 +1,1064 @@
|
|
|
1
|
+
// src/sde/MemorySdeProvider.ts
|
|
2
|
+
var MemorySdeProvider = class {
|
|
3
|
+
data = /* @__PURE__ */ new Map();
|
|
4
|
+
versionInfo;
|
|
5
|
+
constructor(data = {}) {
|
|
6
|
+
const register = (key, items, idFn) => {
|
|
7
|
+
this.data.set(
|
|
8
|
+
key,
|
|
9
|
+
new Map((items ?? []).map((item) => [idFn(item), item]))
|
|
10
|
+
);
|
|
11
|
+
};
|
|
12
|
+
register("eve_types", data.types, (t) => t.typeId);
|
|
13
|
+
register("eve_groups", data.groups, (g) => g.groupId);
|
|
14
|
+
register("eve_categories", data.categories, (c) => c.categoryId);
|
|
15
|
+
register("eve_regions", data.regions, (r) => r.regionId);
|
|
16
|
+
register(
|
|
17
|
+
"eve_constellations",
|
|
18
|
+
data.constellations,
|
|
19
|
+
(c) => c.constellationId
|
|
20
|
+
);
|
|
21
|
+
register("eve_solar_systems", data.solarSystems, (s) => s.systemId);
|
|
22
|
+
register("eve_stargates", data.stargates, (s) => s.stargateId);
|
|
23
|
+
register("eve_stars", data.stars, (s) => s.starId);
|
|
24
|
+
register("eve_planets", data.planets, (p) => p.planetId);
|
|
25
|
+
register("eve_moons", data.moons, (m) => m.moonId);
|
|
26
|
+
register("eve_asteroid_belts", data.asteroidBelts, (a) => a.asteroidBeltId);
|
|
27
|
+
register("eve_factions", data.factions, (f) => f.factionId);
|
|
28
|
+
register("eve_races", data.races, (r) => r.raceId);
|
|
29
|
+
register("eve_bloodlines", data.bloodlines, (b) => b.bloodlineId);
|
|
30
|
+
register("eve_ancestries", data.ancestries, (a) => a.ancestryId);
|
|
31
|
+
register(
|
|
32
|
+
"eve_npc_corporations",
|
|
33
|
+
data.npcCorporations,
|
|
34
|
+
(c) => c.corporationId
|
|
35
|
+
);
|
|
36
|
+
register("eve_npc_stations", data.npcStations, (s) => s.stationId);
|
|
37
|
+
register("eve_market_groups", data.marketGroups, (g) => g.marketGroupId);
|
|
38
|
+
register("eve_meta_groups", data.metaGroups, (g) => g.metaGroupId);
|
|
39
|
+
register("eve_icons", data.icons, (i) => i.iconId);
|
|
40
|
+
register("eve_graphics", data.graphics, (g) => g.graphicId);
|
|
41
|
+
register(
|
|
42
|
+
"eve_dogma_attributes",
|
|
43
|
+
data.dogmaAttributes,
|
|
44
|
+
(a) => a.attributeId
|
|
45
|
+
);
|
|
46
|
+
register("eve_dogma_effects", data.dogmaEffects, (e) => e.effectId);
|
|
47
|
+
register("eve_blueprints", data.blueprints, (b) => b.blueprintTypeId);
|
|
48
|
+
register(
|
|
49
|
+
"eve_planet_schematics",
|
|
50
|
+
data.planetSchematics,
|
|
51
|
+
(s) => s.planetSchematicId
|
|
52
|
+
);
|
|
53
|
+
register("eve_agent_types", data.agentTypes, (a) => a.agentTypeId);
|
|
54
|
+
register("eve_agents_in_space", data.agentsInSpace, (a) => a.characterId);
|
|
55
|
+
register("eve_certificates", data.certificates, (c) => c.certificateId);
|
|
56
|
+
register(
|
|
57
|
+
"eve_character_attributes",
|
|
58
|
+
data.characterAttributes,
|
|
59
|
+
(c) => c.attributeId
|
|
60
|
+
);
|
|
61
|
+
register("eve_clone_grades", data.cloneGrades, (c) => c.cloneGradeId);
|
|
62
|
+
register(
|
|
63
|
+
"eve_corporation_activities",
|
|
64
|
+
data.corporationActivities,
|
|
65
|
+
(c) => c.corporationActivityId
|
|
66
|
+
);
|
|
67
|
+
register(
|
|
68
|
+
"eve_dogma_attribute_categories",
|
|
69
|
+
data.dogmaAttributeCategories,
|
|
70
|
+
(d) => d.attributeCategoryId
|
|
71
|
+
);
|
|
72
|
+
register("eve_dogma_units", data.dogmaUnits, (d) => d.unitId);
|
|
73
|
+
register(
|
|
74
|
+
"eve_industry_activities",
|
|
75
|
+
data.industryActivities,
|
|
76
|
+
(i) => i.industryActivityId
|
|
77
|
+
);
|
|
78
|
+
register("eve_landmarks", data.landmarks, (l) => l.landmarkId);
|
|
79
|
+
register(
|
|
80
|
+
"eve_notification_types",
|
|
81
|
+
data.notificationTypes,
|
|
82
|
+
(n) => n.notificationTypeId
|
|
83
|
+
);
|
|
84
|
+
register("eve_npc_characters", data.npcCharacters, (n) => n.characterId);
|
|
85
|
+
register(
|
|
86
|
+
"eve_npc_corporation_divisions",
|
|
87
|
+
data.npcCorporationDivisions,
|
|
88
|
+
(n) => n.npcCorporationDivisionId
|
|
89
|
+
);
|
|
90
|
+
register("eve_schools", data.schools, (s) => s.schoolId);
|
|
91
|
+
register("eve_secondary_suns", data.secondarySuns, (s) => s.secondarySunId);
|
|
92
|
+
register("eve_skins", data.skins, (s) => s.skinId);
|
|
93
|
+
register("eve_skin_licenses", data.skinLicenses, (s) => s.licenseTypeId);
|
|
94
|
+
register(
|
|
95
|
+
"eve_station_operations",
|
|
96
|
+
data.stationOperations,
|
|
97
|
+
(s) => s.stationOperationId
|
|
98
|
+
);
|
|
99
|
+
register(
|
|
100
|
+
"eve_station_services",
|
|
101
|
+
data.stationServices,
|
|
102
|
+
(s) => s.stationServiceId
|
|
103
|
+
);
|
|
104
|
+
register("eve_type_dogma", data.typeDogma, (t) => t.typeId);
|
|
105
|
+
register("eve_type_materials", data.typeMaterials, (t) => t.typeId);
|
|
106
|
+
register("eve_type_bonuses", data.typeBonuses, (t) => t.typeId);
|
|
107
|
+
register("eve_missions", data.missions, (m) => m.missionId);
|
|
108
|
+
register("eve_dungeons", data.dungeons, (d) => d.dungeonId);
|
|
109
|
+
register("eve_epic_arcs", data.epicArcs, (e) => e.epicArcId);
|
|
110
|
+
this.versionInfo = {
|
|
111
|
+
version: data.version?.version ?? "1.0.0-test",
|
|
112
|
+
buildDate: data.version?.buildDate ?? "2024-01-01T00:00:00Z",
|
|
113
|
+
importedAt: data.version?.importedAt ?? "2024-01-01T00:00:00Z",
|
|
114
|
+
checksum: data.version?.checksum
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
getById(table, id) {
|
|
118
|
+
return this.data.get(table)?.get(id) ?? null;
|
|
119
|
+
}
|
|
120
|
+
getAllFrom(table) {
|
|
121
|
+
const map = this.data.get(table);
|
|
122
|
+
return map ? Array.from(map.values()) : [];
|
|
123
|
+
}
|
|
124
|
+
filterBy(table, field, value) {
|
|
125
|
+
return this.getAllFrom(table).filter(
|
|
126
|
+
(item) => item[field] === value
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
searchBy(table, field, query, limit = 25) {
|
|
130
|
+
const lowerQuery = query.toLowerCase();
|
|
131
|
+
const results = [];
|
|
132
|
+
for (const item of this.getAllFrom(table)) {
|
|
133
|
+
const val = item[field];
|
|
134
|
+
if (typeof val === "string" && val.toLowerCase().includes(lowerQuery)) {
|
|
135
|
+
results.push(item);
|
|
136
|
+
if (results.length >= limit) break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return results;
|
|
140
|
+
}
|
|
141
|
+
// --- Types, Groups, Categories ---
|
|
142
|
+
getType(typeId) {
|
|
143
|
+
return this.getById("eve_types", typeId);
|
|
144
|
+
}
|
|
145
|
+
getTypesByGroup(groupId) {
|
|
146
|
+
return this.filterBy("eve_types", "groupId", groupId);
|
|
147
|
+
}
|
|
148
|
+
getGroup(groupId) {
|
|
149
|
+
return this.getById("eve_groups", groupId);
|
|
150
|
+
}
|
|
151
|
+
getGroupsByCategory(categoryId) {
|
|
152
|
+
return this.filterBy("eve_groups", "categoryId", categoryId);
|
|
153
|
+
}
|
|
154
|
+
getCategory(categoryId) {
|
|
155
|
+
return this.getById("eve_categories", categoryId);
|
|
156
|
+
}
|
|
157
|
+
getAllCategories() {
|
|
158
|
+
return this.getAllFrom("eve_categories");
|
|
159
|
+
}
|
|
160
|
+
// --- Regions, Constellations, Solar Systems, Stargates ---
|
|
161
|
+
getRegion(regionId) {
|
|
162
|
+
return this.getById("eve_regions", regionId);
|
|
163
|
+
}
|
|
164
|
+
getAllRegions() {
|
|
165
|
+
return this.getAllFrom("eve_regions");
|
|
166
|
+
}
|
|
167
|
+
getConstellation(constellationId) {
|
|
168
|
+
return this.getById("eve_constellations", constellationId);
|
|
169
|
+
}
|
|
170
|
+
getConstellationsByRegion(regionId) {
|
|
171
|
+
return this.filterBy("eve_constellations", "regionId", regionId);
|
|
172
|
+
}
|
|
173
|
+
getSolarSystem(systemId) {
|
|
174
|
+
return this.getById("eve_solar_systems", systemId);
|
|
175
|
+
}
|
|
176
|
+
getSolarSystemsByConstellation(constellationId) {
|
|
177
|
+
return this.filterBy(
|
|
178
|
+
"eve_solar_systems",
|
|
179
|
+
"constellationId",
|
|
180
|
+
constellationId
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
getStargate(stargateId) {
|
|
184
|
+
return this.getById("eve_stargates", stargateId);
|
|
185
|
+
}
|
|
186
|
+
getStargatesBySystem(systemId) {
|
|
187
|
+
return this.filterBy("eve_stargates", "solarSystemId", systemId);
|
|
188
|
+
}
|
|
189
|
+
// --- Search ---
|
|
190
|
+
searchTypesByName(query, limit = 25) {
|
|
191
|
+
return this.searchBy("eve_types", "name", query, limit);
|
|
192
|
+
}
|
|
193
|
+
searchSolarSystemsByName(query, limit = 25) {
|
|
194
|
+
return this.searchBy("eve_solar_systems", "name", query, limit);
|
|
195
|
+
}
|
|
196
|
+
// --- Universe ---
|
|
197
|
+
getStar(starId) {
|
|
198
|
+
return this.getById("eve_stars", starId);
|
|
199
|
+
}
|
|
200
|
+
getStarBySystem(systemId) {
|
|
201
|
+
return this.filterBy("eve_stars", "solarSystemId", systemId)[0] ?? null;
|
|
202
|
+
}
|
|
203
|
+
getPlanet(planetId) {
|
|
204
|
+
return this.getById("eve_planets", planetId);
|
|
205
|
+
}
|
|
206
|
+
getPlanetsBySystem(systemId) {
|
|
207
|
+
return this.filterBy("eve_planets", "solarSystemId", systemId);
|
|
208
|
+
}
|
|
209
|
+
getMoon(moonId) {
|
|
210
|
+
return this.getById("eve_moons", moonId);
|
|
211
|
+
}
|
|
212
|
+
getMoonsBySystem(systemId) {
|
|
213
|
+
return this.filterBy("eve_moons", "solarSystemId", systemId);
|
|
214
|
+
}
|
|
215
|
+
getAsteroidBelt(asteroidBeltId) {
|
|
216
|
+
return this.getById("eve_asteroid_belts", asteroidBeltId);
|
|
217
|
+
}
|
|
218
|
+
getAsteroidBeltsBySystem(systemId) {
|
|
219
|
+
return this.filterBy("eve_asteroid_belts", "solarSystemId", systemId);
|
|
220
|
+
}
|
|
221
|
+
// --- Character/Lore ---
|
|
222
|
+
getFaction(factionId) {
|
|
223
|
+
return this.getById("eve_factions", factionId);
|
|
224
|
+
}
|
|
225
|
+
getAllFactions() {
|
|
226
|
+
return this.getAllFrom("eve_factions");
|
|
227
|
+
}
|
|
228
|
+
getRace(raceId) {
|
|
229
|
+
return this.getById("eve_races", raceId);
|
|
230
|
+
}
|
|
231
|
+
getAllRaces() {
|
|
232
|
+
return this.getAllFrom("eve_races");
|
|
233
|
+
}
|
|
234
|
+
getBloodline(bloodlineId) {
|
|
235
|
+
return this.getById("eve_bloodlines", bloodlineId);
|
|
236
|
+
}
|
|
237
|
+
getBloodlinesByRace(raceId) {
|
|
238
|
+
return this.filterBy("eve_bloodlines", "raceId", raceId);
|
|
239
|
+
}
|
|
240
|
+
getAncestry(ancestryId) {
|
|
241
|
+
return this.getById("eve_ancestries", ancestryId);
|
|
242
|
+
}
|
|
243
|
+
getAncestriesByBloodline(bloodlineId) {
|
|
244
|
+
return this.filterBy("eve_ancestries", "bloodlineId", bloodlineId);
|
|
245
|
+
}
|
|
246
|
+
// --- NPC Infrastructure ---
|
|
247
|
+
getNpcCorporation(corporationId) {
|
|
248
|
+
return this.getById("eve_npc_corporations", corporationId);
|
|
249
|
+
}
|
|
250
|
+
getNpcCorporationsByFaction(factionId) {
|
|
251
|
+
return this.filterBy("eve_npc_corporations", "factionId", factionId);
|
|
252
|
+
}
|
|
253
|
+
getNpcStation(stationId) {
|
|
254
|
+
return this.getById("eve_npc_stations", stationId);
|
|
255
|
+
}
|
|
256
|
+
getNpcStationsBySystem(systemId) {
|
|
257
|
+
return this.filterBy("eve_npc_stations", "solarSystemId", systemId);
|
|
258
|
+
}
|
|
259
|
+
getNpcStationsByOwner(ownerId) {
|
|
260
|
+
return this.filterBy("eve_npc_stations", "ownerId", ownerId);
|
|
261
|
+
}
|
|
262
|
+
// --- Market ---
|
|
263
|
+
getMarketGroup(marketGroupId) {
|
|
264
|
+
return this.getById("eve_market_groups", marketGroupId);
|
|
265
|
+
}
|
|
266
|
+
getMarketGroupsByParent(parentGroupId) {
|
|
267
|
+
return this.filterBy("eve_market_groups", "parentGroupId", parentGroupId);
|
|
268
|
+
}
|
|
269
|
+
getRootMarketGroups() {
|
|
270
|
+
return this.getAllFrom("eve_market_groups").filter(
|
|
271
|
+
(g) => g.parentGroupId === null
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
getTypesByMarketGroup(marketGroupId) {
|
|
275
|
+
return this.filterBy("eve_types", "marketGroupId", marketGroupId);
|
|
276
|
+
}
|
|
277
|
+
searchMarketGroupsByName(query, limit = 25) {
|
|
278
|
+
return this.searchBy("eve_market_groups", "name", query, limit);
|
|
279
|
+
}
|
|
280
|
+
// --- Meta/UI ---
|
|
281
|
+
getMetaGroup(metaGroupId) {
|
|
282
|
+
return this.getById("eve_meta_groups", metaGroupId);
|
|
283
|
+
}
|
|
284
|
+
getAllMetaGroups() {
|
|
285
|
+
return this.getAllFrom("eve_meta_groups");
|
|
286
|
+
}
|
|
287
|
+
getIcon(iconId) {
|
|
288
|
+
return this.getById("eve_icons", iconId);
|
|
289
|
+
}
|
|
290
|
+
getGraphic(graphicId) {
|
|
291
|
+
return this.getById("eve_graphics", graphicId);
|
|
292
|
+
}
|
|
293
|
+
// --- Dogma ---
|
|
294
|
+
getDogmaAttribute(attributeId) {
|
|
295
|
+
return this.getById("eve_dogma_attributes", attributeId);
|
|
296
|
+
}
|
|
297
|
+
searchDogmaAttributesByName(query, limit = 25) {
|
|
298
|
+
return this.searchBy("eve_dogma_attributes", "name", query, limit);
|
|
299
|
+
}
|
|
300
|
+
getDogmaEffect(effectId) {
|
|
301
|
+
return this.getById("eve_dogma_effects", effectId);
|
|
302
|
+
}
|
|
303
|
+
searchDogmaEffectsByName(query, limit = 25) {
|
|
304
|
+
return this.searchBy("eve_dogma_effects", "name", query, limit);
|
|
305
|
+
}
|
|
306
|
+
getDogmaAttributeCategory(attributeCategoryId) {
|
|
307
|
+
return this.getById("eve_dogma_attribute_categories", attributeCategoryId);
|
|
308
|
+
}
|
|
309
|
+
getAllDogmaAttributeCategories() {
|
|
310
|
+
return this.getAllFrom("eve_dogma_attribute_categories");
|
|
311
|
+
}
|
|
312
|
+
getDogmaUnit(unitId) {
|
|
313
|
+
return this.getById("eve_dogma_units", unitId);
|
|
314
|
+
}
|
|
315
|
+
getAllDogmaUnits() {
|
|
316
|
+
return this.getAllFrom("eve_dogma_units");
|
|
317
|
+
}
|
|
318
|
+
// --- Industry ---
|
|
319
|
+
getBlueprint(blueprintTypeId) {
|
|
320
|
+
return this.getById("eve_blueprints", blueprintTypeId);
|
|
321
|
+
}
|
|
322
|
+
getPlanetSchematic(planetSchematicId) {
|
|
323
|
+
return this.getById("eve_planet_schematics", planetSchematicId);
|
|
324
|
+
}
|
|
325
|
+
getAllPlanetSchematics() {
|
|
326
|
+
return this.getAllFrom("eve_planet_schematics");
|
|
327
|
+
}
|
|
328
|
+
getIndustryActivity(industryActivityId) {
|
|
329
|
+
return this.getById("eve_industry_activities", industryActivityId);
|
|
330
|
+
}
|
|
331
|
+
getAllIndustryActivities() {
|
|
332
|
+
return this.getAllFrom("eve_industry_activities");
|
|
333
|
+
}
|
|
334
|
+
// --- Agent System ---
|
|
335
|
+
getAgentType(agentTypeId) {
|
|
336
|
+
return this.getById("eve_agent_types", agentTypeId);
|
|
337
|
+
}
|
|
338
|
+
getAllAgentTypes() {
|
|
339
|
+
return this.getAllFrom("eve_agent_types");
|
|
340
|
+
}
|
|
341
|
+
getAgentInSpace(characterId) {
|
|
342
|
+
return this.getById("eve_agents_in_space", characterId);
|
|
343
|
+
}
|
|
344
|
+
getAgentsInSpaceBySystem(systemId) {
|
|
345
|
+
return this.filterBy("eve_agents_in_space", "solarSystemId", systemId);
|
|
346
|
+
}
|
|
347
|
+
// --- Certificates ---
|
|
348
|
+
getCertificate(certificateId) {
|
|
349
|
+
return this.getById("eve_certificates", certificateId);
|
|
350
|
+
}
|
|
351
|
+
getAllCertificates() {
|
|
352
|
+
return this.getAllFrom("eve_certificates");
|
|
353
|
+
}
|
|
354
|
+
// --- Character Attributes ---
|
|
355
|
+
getCharacterAttribute(attributeId) {
|
|
356
|
+
return this.getById("eve_character_attributes", attributeId);
|
|
357
|
+
}
|
|
358
|
+
getAllCharacterAttributes() {
|
|
359
|
+
return this.getAllFrom("eve_character_attributes");
|
|
360
|
+
}
|
|
361
|
+
// --- NPC Characters ---
|
|
362
|
+
getNpcCharacter(characterId) {
|
|
363
|
+
return this.getById("eve_npc_characters", characterId);
|
|
364
|
+
}
|
|
365
|
+
getNpcCharactersByCorporation(corporationId) {
|
|
366
|
+
return this.filterBy("eve_npc_characters", "corporationId", corporationId);
|
|
367
|
+
}
|
|
368
|
+
searchNpcCharactersByName(query, limit = 25) {
|
|
369
|
+
return this.searchBy("eve_npc_characters", "name", query, limit);
|
|
370
|
+
}
|
|
371
|
+
// --- Clone Grades ---
|
|
372
|
+
getCloneGrade(cloneGradeId) {
|
|
373
|
+
return this.getById("eve_clone_grades", cloneGradeId);
|
|
374
|
+
}
|
|
375
|
+
getAllCloneGrades() {
|
|
376
|
+
return this.getAllFrom("eve_clone_grades");
|
|
377
|
+
}
|
|
378
|
+
// --- Corporation Reference ---
|
|
379
|
+
getCorporationActivity(corporationActivityId) {
|
|
380
|
+
return this.getById("eve_corporation_activities", corporationActivityId);
|
|
381
|
+
}
|
|
382
|
+
getAllCorporationActivities() {
|
|
383
|
+
return this.getAllFrom("eve_corporation_activities");
|
|
384
|
+
}
|
|
385
|
+
getNpcCorporationDivision(npcCorporationDivisionId) {
|
|
386
|
+
return this.getById(
|
|
387
|
+
"eve_npc_corporation_divisions",
|
|
388
|
+
npcCorporationDivisionId
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
getAllNpcCorporationDivisions() {
|
|
392
|
+
return this.getAllFrom("eve_npc_corporation_divisions");
|
|
393
|
+
}
|
|
394
|
+
// --- Landmarks ---
|
|
395
|
+
getLandmark(landmarkId) {
|
|
396
|
+
return this.getById("eve_landmarks", landmarkId);
|
|
397
|
+
}
|
|
398
|
+
getAllLandmarks() {
|
|
399
|
+
return this.getAllFrom("eve_landmarks");
|
|
400
|
+
}
|
|
401
|
+
// --- Notifications ---
|
|
402
|
+
getNotificationType(notificationTypeId) {
|
|
403
|
+
return this.getById("eve_notification_types", notificationTypeId);
|
|
404
|
+
}
|
|
405
|
+
// --- Schools ---
|
|
406
|
+
getSchool(schoolId) {
|
|
407
|
+
return this.getById("eve_schools", schoolId);
|
|
408
|
+
}
|
|
409
|
+
getAllSchools() {
|
|
410
|
+
return this.getAllFrom("eve_schools");
|
|
411
|
+
}
|
|
412
|
+
// --- Secondary Suns ---
|
|
413
|
+
getSecondarySun(secondarySunId) {
|
|
414
|
+
return this.getById("eve_secondary_suns", secondarySunId);
|
|
415
|
+
}
|
|
416
|
+
getSecondarySunsBySystem(systemId) {
|
|
417
|
+
return this.filterBy("eve_secondary_suns", "solarSystemId", systemId);
|
|
418
|
+
}
|
|
419
|
+
// --- Skins ---
|
|
420
|
+
getSkin(skinId) {
|
|
421
|
+
return this.getById("eve_skins", skinId);
|
|
422
|
+
}
|
|
423
|
+
getSkinLicense(licenseTypeId) {
|
|
424
|
+
return this.getById("eve_skin_licenses", licenseTypeId);
|
|
425
|
+
}
|
|
426
|
+
getSkinLicensesBySkin(skinId) {
|
|
427
|
+
return this.filterBy("eve_skin_licenses", "skinId", skinId);
|
|
428
|
+
}
|
|
429
|
+
// --- Station Operations & Services ---
|
|
430
|
+
getStationOperation(stationOperationId) {
|
|
431
|
+
return this.getById("eve_station_operations", stationOperationId);
|
|
432
|
+
}
|
|
433
|
+
getAllStationOperations() {
|
|
434
|
+
return this.getAllFrom("eve_station_operations");
|
|
435
|
+
}
|
|
436
|
+
getStationService(stationServiceId) {
|
|
437
|
+
return this.getById("eve_station_services", stationServiceId);
|
|
438
|
+
}
|
|
439
|
+
getAllStationServices() {
|
|
440
|
+
return this.getAllFrom("eve_station_services");
|
|
441
|
+
}
|
|
442
|
+
// --- Type Extensions ---
|
|
443
|
+
getTypeDogma(typeId) {
|
|
444
|
+
return this.getById("eve_type_dogma", typeId);
|
|
445
|
+
}
|
|
446
|
+
getTypeMaterial(typeId) {
|
|
447
|
+
return this.getById("eve_type_materials", typeId);
|
|
448
|
+
}
|
|
449
|
+
getTypeBonus(typeId) {
|
|
450
|
+
return this.getById("eve_type_bonuses", typeId);
|
|
451
|
+
}
|
|
452
|
+
// --- Missions & Content ---
|
|
453
|
+
getMission(missionId) {
|
|
454
|
+
return this.getById("eve_missions", missionId);
|
|
455
|
+
}
|
|
456
|
+
getDungeon(dungeonId) {
|
|
457
|
+
return this.getById("eve_dungeons", dungeonId);
|
|
458
|
+
}
|
|
459
|
+
getEpicArc(epicArcId) {
|
|
460
|
+
return this.getById("eve_epic_arcs", epicArcId);
|
|
461
|
+
}
|
|
462
|
+
getAllEpicArcs() {
|
|
463
|
+
return this.getAllFrom("eve_epic_arcs");
|
|
464
|
+
}
|
|
465
|
+
// --- Generic accessor ---
|
|
466
|
+
getEntity(tableName, id) {
|
|
467
|
+
return this.getById(tableName, id);
|
|
468
|
+
}
|
|
469
|
+
getAllEntities(tableName) {
|
|
470
|
+
return this.getAllFrom(tableName);
|
|
471
|
+
}
|
|
472
|
+
// --- Version & Lifecycle ---
|
|
473
|
+
getVersion() {
|
|
474
|
+
return { ...this.versionInfo };
|
|
475
|
+
}
|
|
476
|
+
close() {
|
|
477
|
+
this.data.clear();
|
|
478
|
+
}
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
// src/sde/errors.ts
|
|
482
|
+
var SdeError = class extends Error {
|
|
483
|
+
constructor(message) {
|
|
484
|
+
super(message);
|
|
485
|
+
this.name = "SdeError";
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
var SdeDatabaseError = class extends SdeError {
|
|
489
|
+
cause;
|
|
490
|
+
constructor(message, cause) {
|
|
491
|
+
super(message);
|
|
492
|
+
this.name = "SdeDatabaseError";
|
|
493
|
+
this.cause = cause;
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
var SdeValidationError = class extends SdeError {
|
|
497
|
+
validationError;
|
|
498
|
+
entityType;
|
|
499
|
+
entityId;
|
|
500
|
+
constructor(entityType, validationError, entityId) {
|
|
501
|
+
const idSuffix = entityId !== void 0 ? ` (id: ${entityId})` : "";
|
|
502
|
+
super(`SDE validation failed for ${entityType}${idSuffix}`);
|
|
503
|
+
this.name = "SdeValidationError";
|
|
504
|
+
this.validationError = validationError;
|
|
505
|
+
this.entityType = entityType;
|
|
506
|
+
this.entityId = entityId;
|
|
507
|
+
}
|
|
508
|
+
};
|
|
509
|
+
var SdeVersionMismatchError = class extends SdeError {
|
|
510
|
+
expected;
|
|
511
|
+
actual;
|
|
512
|
+
constructor(expected, actual) {
|
|
513
|
+
super(`SDE version mismatch: expected ${expected}, got ${actual}`);
|
|
514
|
+
this.name = "SdeVersionMismatchError";
|
|
515
|
+
this.expected = expected;
|
|
516
|
+
this.actual = actual;
|
|
517
|
+
}
|
|
518
|
+
};
|
|
519
|
+
function isSdeError(error) {
|
|
520
|
+
return error instanceof SdeError;
|
|
521
|
+
}
|
|
522
|
+
function isSdeDatabaseError(error) {
|
|
523
|
+
return error instanceof SdeDatabaseError;
|
|
524
|
+
}
|
|
525
|
+
function isSdeValidationError(error) {
|
|
526
|
+
return error instanceof SdeValidationError;
|
|
527
|
+
}
|
|
528
|
+
function isSdeVersionMismatch(error) {
|
|
529
|
+
return error instanceof SdeVersionMismatchError;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
// src/sde/SdeTestDataFactory.ts
|
|
533
|
+
var SdeTestDataFactory = class {
|
|
534
|
+
static createEveType(overrides = {}) {
|
|
535
|
+
return {
|
|
536
|
+
typeId: 34,
|
|
537
|
+
groupId: 18,
|
|
538
|
+
mass: 1,
|
|
539
|
+
name: "Tritanium",
|
|
540
|
+
portionSize: 1,
|
|
541
|
+
published: true,
|
|
542
|
+
packagedVolume: null,
|
|
543
|
+
volume: 0.01,
|
|
544
|
+
radius: null,
|
|
545
|
+
description: "The most common mineral in the known universe.",
|
|
546
|
+
graphicId: 20,
|
|
547
|
+
soundId: null,
|
|
548
|
+
iconId: null,
|
|
549
|
+
raceId: null,
|
|
550
|
+
basePrice: 4,
|
|
551
|
+
marketGroupId: 1857,
|
|
552
|
+
capacity: null,
|
|
553
|
+
isRepackable: null,
|
|
554
|
+
...overrides
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
static createEveGroup(overrides = {}) {
|
|
558
|
+
return {
|
|
559
|
+
groupId: 18,
|
|
560
|
+
anchorable: false,
|
|
561
|
+
anchored: false,
|
|
562
|
+
categoryId: 4,
|
|
563
|
+
fittableNonSingleton: false,
|
|
564
|
+
name: "Mineral",
|
|
565
|
+
published: true,
|
|
566
|
+
useBasePrice: true,
|
|
567
|
+
iconId: null,
|
|
568
|
+
...overrides
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
static createEveCategory(overrides = {}) {
|
|
572
|
+
return {
|
|
573
|
+
categoryId: 4,
|
|
574
|
+
name: "Material",
|
|
575
|
+
published: true,
|
|
576
|
+
iconId: null,
|
|
577
|
+
...overrides
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
static createRegion(overrides = {}) {
|
|
581
|
+
return {
|
|
582
|
+
regionId: 10000002,
|
|
583
|
+
constellationIDs: [20000020],
|
|
584
|
+
description: "The Forge is the industrial heart of the Caldari State.",
|
|
585
|
+
factionId: 500001,
|
|
586
|
+
name: "The Forge",
|
|
587
|
+
nebulaId: 10,
|
|
588
|
+
position: { x: -96e15, y: 6e16, z: -11e16 },
|
|
589
|
+
wormholeClassId: 0,
|
|
590
|
+
...overrides
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
static createConstellation(overrides = {}) {
|
|
594
|
+
return {
|
|
595
|
+
constellationId: 20000020,
|
|
596
|
+
factionId: 500001,
|
|
597
|
+
name: "Kimotoro",
|
|
598
|
+
position: { x: -97e15, y: 61e15, z: -115e15 },
|
|
599
|
+
regionId: 10000002,
|
|
600
|
+
solarSystemIDs: [30000142, 30000144],
|
|
601
|
+
wormholeClassId: 0,
|
|
602
|
+
...overrides
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
static createSolarSystem(overrides = {}) {
|
|
606
|
+
return {
|
|
607
|
+
systemId: 30000142,
|
|
608
|
+
border: false,
|
|
609
|
+
constellationId: 20000020,
|
|
610
|
+
hub: true,
|
|
611
|
+
international: false,
|
|
612
|
+
luminosity: 0.02142,
|
|
613
|
+
name: "Jita",
|
|
614
|
+
planetIDs: [40009077],
|
|
615
|
+
position: { x: -129e15, y: 607e14, z: -112e15 },
|
|
616
|
+
position2D: { x: -129e15, y: -112e15 },
|
|
617
|
+
radius: 467e10,
|
|
618
|
+
regionId: 10000002,
|
|
619
|
+
regional: false,
|
|
620
|
+
securityClass: "B",
|
|
621
|
+
securityStatus: 0.9459991455078125,
|
|
622
|
+
starId: 40009082,
|
|
623
|
+
stargateIDs: [50001248],
|
|
624
|
+
corridor: null,
|
|
625
|
+
fringe: null,
|
|
626
|
+
wormholeClassId: null,
|
|
627
|
+
visualEffect: null,
|
|
628
|
+
...overrides
|
|
629
|
+
};
|
|
630
|
+
}
|
|
631
|
+
static createStargate(overrides = {}) {
|
|
632
|
+
return {
|
|
633
|
+
stargateId: 50001248,
|
|
634
|
+
destination: { solarSystemId: 30000144, stargateId: 50001249 },
|
|
635
|
+
position: { x: 15e11, y: 32e10, z: -87e10 },
|
|
636
|
+
solarSystemId: 30000142,
|
|
637
|
+
typeId: 16,
|
|
638
|
+
...overrides
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
static createStar(overrides = {}) {
|
|
642
|
+
return {
|
|
643
|
+
starId: 40009082,
|
|
644
|
+
radius: 3466e5,
|
|
645
|
+
solarSystemId: 30000142,
|
|
646
|
+
statistics: {
|
|
647
|
+
age: 76e9,
|
|
648
|
+
life: 1e11,
|
|
649
|
+
luminosity: 0.02142,
|
|
650
|
+
locked: false,
|
|
651
|
+
spectralClass: "K7 V",
|
|
652
|
+
temperature: 4e3
|
|
653
|
+
},
|
|
654
|
+
typeId: 3796,
|
|
655
|
+
...overrides
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
static createPlanet(overrides = {}) {
|
|
659
|
+
return {
|
|
660
|
+
planetId: 40009077,
|
|
661
|
+
asteroidBeltIDs: [40009079],
|
|
662
|
+
attributes: {},
|
|
663
|
+
celestialIndex: 1,
|
|
664
|
+
moonIDs: [40009078],
|
|
665
|
+
orbitId: 40009082,
|
|
666
|
+
position: { x: 12e12, y: 1e11, z: -35e11 },
|
|
667
|
+
radius: 233e4,
|
|
668
|
+
solarSystemId: 30000142,
|
|
669
|
+
statistics: {},
|
|
670
|
+
typeId: 2015,
|
|
671
|
+
npcStationIDs: null,
|
|
672
|
+
...overrides
|
|
673
|
+
};
|
|
674
|
+
}
|
|
675
|
+
static createMoon(overrides = {}) {
|
|
676
|
+
return {
|
|
677
|
+
moonId: 40009078,
|
|
678
|
+
attributes: {},
|
|
679
|
+
celestialIndex: 1,
|
|
680
|
+
orbitId: 40009077,
|
|
681
|
+
orbitIndex: 1,
|
|
682
|
+
position: { x: 121e11, y: 101e9, z: -351e10 },
|
|
683
|
+
radius: 24e4,
|
|
684
|
+
solarSystemId: 30000142,
|
|
685
|
+
statistics: {},
|
|
686
|
+
typeId: 14,
|
|
687
|
+
npcStationIDs: null,
|
|
688
|
+
...overrides
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
static createAsteroidBelt(overrides = {}) {
|
|
692
|
+
return {
|
|
693
|
+
asteroidBeltId: 40009079,
|
|
694
|
+
celestialIndex: 1,
|
|
695
|
+
orbitId: 40009077,
|
|
696
|
+
orbitIndex: 1,
|
|
697
|
+
position: { x: 119e11, y: 99e9, z: -349e10 },
|
|
698
|
+
radius: 5e4,
|
|
699
|
+
solarSystemId: 30000142,
|
|
700
|
+
statistics: {},
|
|
701
|
+
typeId: 15,
|
|
702
|
+
...overrides
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
static createFaction(overrides = {}) {
|
|
706
|
+
return {
|
|
707
|
+
factionId: 500001,
|
|
708
|
+
corporationId: 1000035,
|
|
709
|
+
description: "The Caldari State is a corporate dictatorship.",
|
|
710
|
+
flatLogo: "res:/ui/texture/corps/caldari.png",
|
|
711
|
+
flatLogoWithName: "res:/ui/texture/corps/caldari_name.png",
|
|
712
|
+
iconId: 1439,
|
|
713
|
+
memberRaces: [1],
|
|
714
|
+
militiaCorporationId: 1000180,
|
|
715
|
+
name: "Caldari State",
|
|
716
|
+
shortDescription: "Caldari",
|
|
717
|
+
sizeFactor: 5,
|
|
718
|
+
solarSystemId: 30000142,
|
|
719
|
+
uniqueName: true,
|
|
720
|
+
...overrides
|
|
721
|
+
};
|
|
722
|
+
}
|
|
723
|
+
static createRace(overrides = {}) {
|
|
724
|
+
return {
|
|
725
|
+
raceId: 1,
|
|
726
|
+
description: "The Caldari State is a corporate dictatorship.",
|
|
727
|
+
iconId: 1439,
|
|
728
|
+
name: "Caldari",
|
|
729
|
+
shipTypeId: 601,
|
|
730
|
+
skills: {},
|
|
731
|
+
...overrides
|
|
732
|
+
};
|
|
733
|
+
}
|
|
734
|
+
static createBloodline(overrides = {}) {
|
|
735
|
+
return {
|
|
736
|
+
bloodlineId: 1,
|
|
737
|
+
charisma: 3,
|
|
738
|
+
corporationId: 1000006,
|
|
739
|
+
description: "The Deteis are regarded as the face of the Caldari State.",
|
|
740
|
+
iconId: 1383,
|
|
741
|
+
intelligence: 7,
|
|
742
|
+
memory: 7,
|
|
743
|
+
name: "Deteis",
|
|
744
|
+
perception: 5,
|
|
745
|
+
raceId: 1,
|
|
746
|
+
willpower: 5,
|
|
747
|
+
...overrides
|
|
748
|
+
};
|
|
749
|
+
}
|
|
750
|
+
static createAncestry(overrides = {}) {
|
|
751
|
+
return {
|
|
752
|
+
ancestryId: 1,
|
|
753
|
+
bloodlineId: 1,
|
|
754
|
+
charisma: 0,
|
|
755
|
+
description: "Born and raised in a capsule.",
|
|
756
|
+
iconId: 1664,
|
|
757
|
+
intelligence: 0,
|
|
758
|
+
memory: 0,
|
|
759
|
+
name: "Tube Child",
|
|
760
|
+
perception: 0,
|
|
761
|
+
shortDescription: "Raised in a capsule.",
|
|
762
|
+
willpower: 2,
|
|
763
|
+
...overrides
|
|
764
|
+
};
|
|
765
|
+
}
|
|
766
|
+
static createNpcCorporation(overrides = {}) {
|
|
767
|
+
return {
|
|
768
|
+
corporationId: 1000035,
|
|
769
|
+
ceoId: 3004451,
|
|
770
|
+
deleted: false,
|
|
771
|
+
description: "The Caldari Navy is the armed forces of the Caldari State.",
|
|
772
|
+
extent: "G",
|
|
773
|
+
hasPlayerPersonnelManager: false,
|
|
774
|
+
initialPrice: 0,
|
|
775
|
+
memberLimit: 0,
|
|
776
|
+
minSecurity: 0,
|
|
777
|
+
minimumJoinStanding: 0,
|
|
778
|
+
name: "Caldari Navy",
|
|
779
|
+
sendCharTerminationMessage: true,
|
|
780
|
+
shares: 1e5,
|
|
781
|
+
size: "H",
|
|
782
|
+
stationId: 60003760,
|
|
783
|
+
taxRate: 0,
|
|
784
|
+
tickerName: "CN",
|
|
785
|
+
uniqueName: true,
|
|
786
|
+
allowedMemberRaces: null,
|
|
787
|
+
corporationTrades: null,
|
|
788
|
+
divisions: null,
|
|
789
|
+
enemyId: null,
|
|
790
|
+
factionId: 500001,
|
|
791
|
+
friendId: null,
|
|
792
|
+
iconId: 1439,
|
|
793
|
+
investors: null,
|
|
794
|
+
lpOfferTables: null,
|
|
795
|
+
mainActivityId: null,
|
|
796
|
+
raceId: 1,
|
|
797
|
+
sizeFactor: null,
|
|
798
|
+
solarSystemId: 30000142,
|
|
799
|
+
secondaryActivityId: null,
|
|
800
|
+
...overrides
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
static createNpcStation(overrides = {}) {
|
|
804
|
+
return {
|
|
805
|
+
stationId: 60003760,
|
|
806
|
+
celestialIndex: 4,
|
|
807
|
+
operationId: 1,
|
|
808
|
+
orbitId: 40009081,
|
|
809
|
+
orbitIndex: 4,
|
|
810
|
+
ownerId: 1000035,
|
|
811
|
+
position: { x: 158e12, y: 963e10, z: 106e12 },
|
|
812
|
+
reprocessingEfficiency: 0.5,
|
|
813
|
+
reprocessingHangarFlag: 4,
|
|
814
|
+
reprocessingStationsTake: 0.05,
|
|
815
|
+
solarSystemId: 30000142,
|
|
816
|
+
typeId: 1529,
|
|
817
|
+
useOperationName: true,
|
|
818
|
+
...overrides
|
|
819
|
+
};
|
|
820
|
+
}
|
|
821
|
+
static createMarketGroup(overrides = {}) {
|
|
822
|
+
return {
|
|
823
|
+
marketGroupId: 1857,
|
|
824
|
+
description: "Refined minerals used in manufacturing.",
|
|
825
|
+
hasTypes: true,
|
|
826
|
+
iconId: 22,
|
|
827
|
+
name: "Minerals",
|
|
828
|
+
parentGroupId: 1031,
|
|
829
|
+
...overrides
|
|
830
|
+
};
|
|
831
|
+
}
|
|
832
|
+
static createMetaGroup(overrides = {}) {
|
|
833
|
+
return {
|
|
834
|
+
metaGroupId: 1,
|
|
835
|
+
color: { r: 255, g: 255, b: 255, a: 255 },
|
|
836
|
+
name: "Tech I",
|
|
837
|
+
iconId: null,
|
|
838
|
+
iconSuffix: null,
|
|
839
|
+
description: null,
|
|
840
|
+
...overrides
|
|
841
|
+
};
|
|
842
|
+
}
|
|
843
|
+
static createIcon(overrides = {}) {
|
|
844
|
+
return {
|
|
845
|
+
iconId: 22,
|
|
846
|
+
iconFile: "res:/UI/Texture/Icons/22_32_2.png",
|
|
847
|
+
...overrides
|
|
848
|
+
};
|
|
849
|
+
}
|
|
850
|
+
static createGraphic(overrides = {}) {
|
|
851
|
+
return {
|
|
852
|
+
graphicId: 20,
|
|
853
|
+
graphicFile: "res:/dx9/model/worldobject/asteroid/oreveld001.red",
|
|
854
|
+
iconFolder: null,
|
|
855
|
+
sofFactionName: null,
|
|
856
|
+
sofHullName: null,
|
|
857
|
+
sofRaceName: null,
|
|
858
|
+
...overrides
|
|
859
|
+
};
|
|
860
|
+
}
|
|
861
|
+
static createDogmaAttribute(overrides = {}) {
|
|
862
|
+
return {
|
|
863
|
+
attributeId: 9,
|
|
864
|
+
attributeCategoryId: 1,
|
|
865
|
+
dataType: 2,
|
|
866
|
+
defaultValue: 0,
|
|
867
|
+
description: "Hit points for a ship.",
|
|
868
|
+
displayWhenZero: false,
|
|
869
|
+
highIsGood: true,
|
|
870
|
+
name: "hp",
|
|
871
|
+
published: true,
|
|
872
|
+
stackable: false,
|
|
873
|
+
displayName: null,
|
|
874
|
+
iconId: null,
|
|
875
|
+
tooltipDescription: null,
|
|
876
|
+
tooltipTitle: null,
|
|
877
|
+
unitId: 1,
|
|
878
|
+
chargeRechargeTimeId: null,
|
|
879
|
+
maxAttributeId: null,
|
|
880
|
+
minAttributeId: null,
|
|
881
|
+
...overrides
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
static createDogmaEffect(overrides = {}) {
|
|
885
|
+
return {
|
|
886
|
+
effectId: 11,
|
|
887
|
+
disallowAutoRepeat: false,
|
|
888
|
+
dischargeAttributeId: 0,
|
|
889
|
+
durationAttributeId: 0,
|
|
890
|
+
effectCategoryId: 0,
|
|
891
|
+
electronicChance: false,
|
|
892
|
+
guid: "effects.LowSlotModifier",
|
|
893
|
+
isAssistance: false,
|
|
894
|
+
isOffensive: false,
|
|
895
|
+
isWarpSafe: true,
|
|
896
|
+
name: "lowSlotModifier",
|
|
897
|
+
propulsionChance: false,
|
|
898
|
+
published: true,
|
|
899
|
+
rangeChance: false,
|
|
900
|
+
distribution: null,
|
|
901
|
+
falloffAttributeId: null,
|
|
902
|
+
rangeAttributeId: null,
|
|
903
|
+
trackingSpeedAttributeId: null,
|
|
904
|
+
description: null,
|
|
905
|
+
displayName: null,
|
|
906
|
+
iconId: null,
|
|
907
|
+
modifierInfo: null,
|
|
908
|
+
...overrides
|
|
909
|
+
};
|
|
910
|
+
}
|
|
911
|
+
static createBlueprint(overrides = {}) {
|
|
912
|
+
return {
|
|
913
|
+
activities: {
|
|
914
|
+
manufacturing: {
|
|
915
|
+
time: 6e3,
|
|
916
|
+
materials: [
|
|
917
|
+
{ typeId: 34, quantity: 100 },
|
|
918
|
+
{ typeId: 35, quantity: 50 }
|
|
919
|
+
],
|
|
920
|
+
products: [{ typeId: 587, quantity: 1 }]
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
blueprintTypeId: 787,
|
|
924
|
+
maxProductionLimit: 10,
|
|
925
|
+
...overrides
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
static createPlanetSchematic(overrides = {}) {
|
|
929
|
+
return {
|
|
930
|
+
planetSchematicId: 65,
|
|
931
|
+
cycleTime: 1800,
|
|
932
|
+
name: "Bacteria",
|
|
933
|
+
pins: [],
|
|
934
|
+
types: [],
|
|
935
|
+
...overrides
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
static createVersionInfo(overrides = {}) {
|
|
939
|
+
return {
|
|
940
|
+
version: "2024-01-15.1",
|
|
941
|
+
buildDate: "2024-01-15T00:00:00Z",
|
|
942
|
+
importedAt: "2024-01-16T12:00:00Z",
|
|
943
|
+
checksum: "abc123def456",
|
|
944
|
+
...overrides
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
static createHierarchicalTestData() {
|
|
948
|
+
const category = this.createEveCategory();
|
|
949
|
+
const group = this.createEveGroup({ categoryId: category.categoryId });
|
|
950
|
+
const type1 = this.createEveType({
|
|
951
|
+
typeId: 34,
|
|
952
|
+
name: "Tritanium",
|
|
953
|
+
groupId: group.groupId
|
|
954
|
+
});
|
|
955
|
+
const type2 = this.createEveType({
|
|
956
|
+
typeId: 35,
|
|
957
|
+
name: "Pyerite",
|
|
958
|
+
groupId: group.groupId
|
|
959
|
+
});
|
|
960
|
+
const type3 = this.createEveType({
|
|
961
|
+
typeId: 36,
|
|
962
|
+
name: "Mexallon",
|
|
963
|
+
groupId: group.groupId
|
|
964
|
+
});
|
|
965
|
+
const region = this.createRegion();
|
|
966
|
+
const constellation = this.createConstellation({
|
|
967
|
+
regionId: region.regionId
|
|
968
|
+
});
|
|
969
|
+
const system1 = this.createSolarSystem({
|
|
970
|
+
systemId: 30000142,
|
|
971
|
+
name: "Jita",
|
|
972
|
+
constellationId: constellation.constellationId,
|
|
973
|
+
regionId: region.regionId
|
|
974
|
+
});
|
|
975
|
+
const system2 = this.createSolarSystem({
|
|
976
|
+
systemId: 30000144,
|
|
977
|
+
name: "Perimeter",
|
|
978
|
+
constellationId: constellation.constellationId,
|
|
979
|
+
regionId: region.regionId,
|
|
980
|
+
securityStatus: 0.9
|
|
981
|
+
});
|
|
982
|
+
const stargate = this.createStargate({
|
|
983
|
+
solarSystemId: system1.systemId,
|
|
984
|
+
destination: { solarSystemId: system2.systemId, stargateId: 50001249 }
|
|
985
|
+
});
|
|
986
|
+
const star = this.createStar({ solarSystemId: system1.systemId });
|
|
987
|
+
const planet = this.createPlanet({ solarSystemId: system1.systemId });
|
|
988
|
+
const moon = this.createMoon({ solarSystemId: system1.systemId });
|
|
989
|
+
const asteroidBelt = this.createAsteroidBelt({
|
|
990
|
+
solarSystemId: system1.systemId
|
|
991
|
+
});
|
|
992
|
+
const race = this.createRace();
|
|
993
|
+
const faction = this.createFaction({ memberRaces: [race.raceId] });
|
|
994
|
+
const bloodline = this.createBloodline({ raceId: race.raceId });
|
|
995
|
+
const ancestry = this.createAncestry({
|
|
996
|
+
bloodlineId: bloodline.bloodlineId
|
|
997
|
+
});
|
|
998
|
+
const npcCorp = this.createNpcCorporation({
|
|
999
|
+
factionId: faction.factionId,
|
|
1000
|
+
raceId: race.raceId
|
|
1001
|
+
});
|
|
1002
|
+
const npcStation = this.createNpcStation({
|
|
1003
|
+
solarSystemId: system1.systemId,
|
|
1004
|
+
ownerId: npcCorp.corporationId
|
|
1005
|
+
});
|
|
1006
|
+
const rootMarketGroup = this.createMarketGroup({
|
|
1007
|
+
marketGroupId: 1031,
|
|
1008
|
+
name: "Manufacture & Research",
|
|
1009
|
+
parentGroupId: null,
|
|
1010
|
+
hasTypes: false
|
|
1011
|
+
});
|
|
1012
|
+
const marketGroup = this.createMarketGroup({
|
|
1013
|
+
parentGroupId: rootMarketGroup.marketGroupId
|
|
1014
|
+
});
|
|
1015
|
+
const metaGroup = this.createMetaGroup();
|
|
1016
|
+
const icon = this.createIcon();
|
|
1017
|
+
const graphic = this.createGraphic();
|
|
1018
|
+
const dogmaAttribute = this.createDogmaAttribute();
|
|
1019
|
+
const dogmaEffect = this.createDogmaEffect();
|
|
1020
|
+
const blueprint = this.createBlueprint();
|
|
1021
|
+
const planetSchematic = this.createPlanetSchematic();
|
|
1022
|
+
return {
|
|
1023
|
+
categories: [category],
|
|
1024
|
+
groups: [group],
|
|
1025
|
+
types: [type1, type2, type3],
|
|
1026
|
+
regions: [region],
|
|
1027
|
+
constellations: [constellation],
|
|
1028
|
+
solarSystems: [system1, system2],
|
|
1029
|
+
stargates: [stargate],
|
|
1030
|
+
stars: [star],
|
|
1031
|
+
planets: [planet],
|
|
1032
|
+
moons: [moon],
|
|
1033
|
+
asteroidBelts: [asteroidBelt],
|
|
1034
|
+
factions: [faction],
|
|
1035
|
+
races: [race],
|
|
1036
|
+
bloodlines: [bloodline],
|
|
1037
|
+
ancestries: [ancestry],
|
|
1038
|
+
npcCorporations: [npcCorp],
|
|
1039
|
+
npcStations: [npcStation],
|
|
1040
|
+
marketGroups: [rootMarketGroup, marketGroup],
|
|
1041
|
+
metaGroups: [metaGroup],
|
|
1042
|
+
icons: [icon],
|
|
1043
|
+
graphics: [graphic],
|
|
1044
|
+
dogmaAttributes: [dogmaAttribute],
|
|
1045
|
+
dogmaEffects: [dogmaEffect],
|
|
1046
|
+
blueprints: [blueprint],
|
|
1047
|
+
planetSchematics: [planetSchematic],
|
|
1048
|
+
version: this.createVersionInfo()
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
};
|
|
1052
|
+
export {
|
|
1053
|
+
MemorySdeProvider,
|
|
1054
|
+
SdeDatabaseError,
|
|
1055
|
+
SdeError,
|
|
1056
|
+
SdeTestDataFactory,
|
|
1057
|
+
SdeValidationError,
|
|
1058
|
+
SdeVersionMismatchError,
|
|
1059
|
+
isSdeDatabaseError,
|
|
1060
|
+
isSdeError,
|
|
1061
|
+
isSdeValidationError,
|
|
1062
|
+
isSdeVersionMismatch
|
|
1063
|
+
};
|
|
1064
|
+
//# sourceMappingURL=memory.mjs.map
|