@wfcd/relics 2.0.30 → 2.0.31
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 +7 -0
- package/dist/Build.cjs +1 -1
- package/dist/Build.d.cts +1 -1
- package/dist/Build.d.mts +1 -1
- package/dist/Build.mjs +1 -1
- package/dist/{VersionManager-W7wuuPML.mjs → VersionManager-BckuXhbh.mjs} +180 -52
- package/dist/{VersionManager-ZP_iui8x.cjs → VersionManager-CDrWT0KK.cjs} +182 -54
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +146 -114
- package/dist/index.d.mts +146 -115
- package/dist/index.mjs +1 -1
- package/package.json +16 -13
package/dist/index.d.cts
CHANGED
|
@@ -1,17 +1,90 @@
|
|
|
1
1
|
//#endregion
|
|
2
2
|
//#region src/Types.d.ts
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type Rarity = 'Common' | 'Legendary' | 'Rare' | 'Uncommon';
|
|
4
|
+
interface TitaniaRelic {
|
|
5
|
+
/**
|
|
6
|
+
* Drop Locations for the relics
|
|
7
|
+
*/
|
|
8
|
+
locations: TitaniaRelicLocation[];
|
|
9
|
+
/**
|
|
10
|
+
* Relic Combined Name (Ex: Axi A1)
|
|
11
|
+
*/
|
|
12
|
+
name: string;
|
|
13
|
+
/**
|
|
14
|
+
* Relic Rewards when opened
|
|
15
|
+
*/
|
|
16
|
+
rewards: TitaniaRelicReward[];
|
|
17
|
+
/** unique name for corresponding warframe-items Item */
|
|
18
|
+
uniqueName: string;
|
|
19
|
+
/**
|
|
20
|
+
* Relic Vault Information
|
|
21
|
+
*/
|
|
22
|
+
vaultInfo: TitaniaRelicVaultedInfo;
|
|
23
|
+
/**
|
|
24
|
+
* Warframe Market Information
|
|
25
|
+
* undefined for untradable
|
|
26
|
+
*/
|
|
27
|
+
warframeMarket?: TitaniaWFMInfo;
|
|
5
28
|
}
|
|
6
|
-
interface
|
|
29
|
+
interface TitaniaRelicLocation {
|
|
7
30
|
/**
|
|
8
|
-
*
|
|
31
|
+
* Dropchance in %
|
|
32
|
+
*/
|
|
33
|
+
chance: number;
|
|
34
|
+
/** Location Info $planet-$node (Ex: Eris - Phalan) */
|
|
35
|
+
location: string;
|
|
36
|
+
/**
|
|
37
|
+
* Rarity (Uncommon, Rare ?)
|
|
38
|
+
*/
|
|
39
|
+
rarity: Rarity;
|
|
40
|
+
}
|
|
41
|
+
interface TitaniaRelicReward {
|
|
42
|
+
/**
|
|
43
|
+
* Reward Drop Chance in %
|
|
44
|
+
*/
|
|
45
|
+
chance: number;
|
|
46
|
+
/**
|
|
47
|
+
* Item Information
|
|
48
|
+
*/
|
|
49
|
+
item: TitaniaRelicRewardItem;
|
|
50
|
+
/**
|
|
51
|
+
* Relic Rarity (Uncommon,Rare ?)
|
|
52
|
+
*/
|
|
53
|
+
rarity: 'Rare' | 'Uncommon';
|
|
54
|
+
}
|
|
55
|
+
interface TitaniaRelicRewardItem {
|
|
56
|
+
/**
|
|
57
|
+
* Item Name
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
/** unique name for corresponding warframe-items Item */
|
|
61
|
+
uniqueName: string;
|
|
62
|
+
/**
|
|
63
|
+
* WarframeMarket Info
|
|
64
|
+
*/
|
|
65
|
+
warframeMarket?: TitaniaWFMInfo;
|
|
66
|
+
}
|
|
67
|
+
interface TitaniaRelicVaultedInfo {
|
|
68
|
+
/**
|
|
69
|
+
* If the relic is vaulted
|
|
70
|
+
*/
|
|
71
|
+
vaulted: boolean;
|
|
72
|
+
}
|
|
73
|
+
interface TitaniaWFMInfo {
|
|
74
|
+
/**
|
|
75
|
+
* Warframe Market ID
|
|
9
76
|
*/
|
|
10
77
|
id: string;
|
|
11
78
|
/**
|
|
12
|
-
*
|
|
79
|
+
* Warframe market URL parameter
|
|
13
80
|
*/
|
|
14
|
-
|
|
81
|
+
urlName: string;
|
|
82
|
+
}
|
|
83
|
+
interface WarframeMarketItem {
|
|
84
|
+
/**
|
|
85
|
+
* Unique reference name (Lotus path)
|
|
86
|
+
*/
|
|
87
|
+
gameRef: string;
|
|
15
88
|
/**
|
|
16
89
|
* WFM language object
|
|
17
90
|
*/
|
|
@@ -30,58 +103,29 @@ interface WarframeMarketItem {
|
|
|
30
103
|
thumb: string;
|
|
31
104
|
};
|
|
32
105
|
};
|
|
33
|
-
}
|
|
34
|
-
interface WFCDRelic {
|
|
35
106
|
/**
|
|
36
|
-
*
|
|
37
|
-
*/
|
|
38
|
-
tier: string;
|
|
39
|
-
/**
|
|
40
|
-
* Relic Name (A1, A10, etc.)
|
|
41
|
-
*/
|
|
42
|
-
relicName: string;
|
|
43
|
-
/**
|
|
44
|
-
* Relic Refinement state
|
|
45
|
-
*/
|
|
46
|
-
state: 'Intact' | 'Exceptional' | 'Flawless' | 'Radiant';
|
|
47
|
-
/**
|
|
48
|
-
* Relic Rewards
|
|
107
|
+
* WFM Item ID
|
|
49
108
|
*/
|
|
50
|
-
|
|
109
|
+
id: string;
|
|
51
110
|
/**
|
|
52
|
-
*
|
|
111
|
+
* Url name for querying WFM
|
|
53
112
|
*/
|
|
54
|
-
|
|
113
|
+
slug: string;
|
|
55
114
|
}
|
|
56
|
-
interface
|
|
57
|
-
|
|
58
|
-
* Dropped Item name
|
|
59
|
-
*/
|
|
60
|
-
itemName: string;
|
|
61
|
-
/**
|
|
62
|
-
* Dropchance Rarity (Uncommon/Rare ?)
|
|
63
|
-
*/
|
|
64
|
-
rarity: 'Uncommon' | 'Rare';
|
|
65
|
-
/**
|
|
66
|
-
* Actual Dropchance in %
|
|
67
|
-
*/
|
|
68
|
-
chance: number;
|
|
69
|
-
/**
|
|
70
|
-
* Internal ID
|
|
71
|
-
*/
|
|
72
|
-
_id: string;
|
|
115
|
+
interface WarframeMarketRoot {
|
|
116
|
+
data: WarframeMarketItem[];
|
|
73
117
|
}
|
|
74
118
|
interface WFCDItem {
|
|
119
|
+
/**
|
|
120
|
+
* Item Drop Location
|
|
121
|
+
*/
|
|
122
|
+
drops?: WFCDItemDropLocation[];
|
|
75
123
|
/**
|
|
76
124
|
* Item Name
|
|
77
125
|
*/
|
|
78
126
|
name: string;
|
|
79
127
|
/** Unique identifying name */
|
|
80
128
|
uniqueName: string;
|
|
81
|
-
/**
|
|
82
|
-
* Item Drop Location
|
|
83
|
-
*/
|
|
84
|
-
drops?: Array<WFCDItemDropLocation>;
|
|
85
129
|
}
|
|
86
130
|
interface WFCDItemDropLocation {
|
|
87
131
|
/**
|
|
@@ -101,103 +145,75 @@ interface WFCDItemDropLocation {
|
|
|
101
145
|
*/
|
|
102
146
|
type: string;
|
|
103
147
|
}
|
|
104
|
-
interface
|
|
148
|
+
interface WFCDRelic {
|
|
105
149
|
/**
|
|
106
|
-
*
|
|
150
|
+
* Internal WFCD id
|
|
107
151
|
*/
|
|
108
|
-
|
|
152
|
+
_id: string;
|
|
109
153
|
/**
|
|
110
|
-
* Relic
|
|
154
|
+
* Relic Name (A1, A10, etc.)
|
|
111
155
|
*/
|
|
112
|
-
|
|
156
|
+
relicName: string;
|
|
113
157
|
/**
|
|
114
|
-
*
|
|
158
|
+
* Relic Rewards
|
|
115
159
|
*/
|
|
116
|
-
|
|
160
|
+
rewards: WFCDRelicReward[];
|
|
117
161
|
/**
|
|
118
|
-
*
|
|
119
|
-
* undefined for untradable
|
|
162
|
+
* Relic Refinement state
|
|
120
163
|
*/
|
|
121
|
-
|
|
164
|
+
state: 'Exceptional' | 'Flawless' | 'Intact' | 'Radiant';
|
|
122
165
|
/**
|
|
123
|
-
* Relic
|
|
166
|
+
* Relic Tier (Axi, Neo, etc.)
|
|
124
167
|
*/
|
|
125
|
-
|
|
126
|
-
/** unique name for corresponding warframe-items Item */
|
|
127
|
-
uniqueName: string;
|
|
168
|
+
tier: string;
|
|
128
169
|
}
|
|
129
|
-
interface
|
|
170
|
+
interface WFCDRelicReward {
|
|
130
171
|
/**
|
|
131
|
-
*
|
|
172
|
+
* Internal ID
|
|
132
173
|
*/
|
|
133
|
-
|
|
174
|
+
_id: string;
|
|
134
175
|
/**
|
|
135
|
-
*
|
|
176
|
+
* Actual Dropchance in %
|
|
136
177
|
*/
|
|
137
178
|
chance: number;
|
|
138
179
|
/**
|
|
139
|
-
* Item
|
|
180
|
+
* Dropped Item name
|
|
140
181
|
*/
|
|
141
|
-
|
|
142
|
-
}
|
|
143
|
-
interface TitaniaRelicRewardItem {
|
|
182
|
+
itemName: string;
|
|
144
183
|
/**
|
|
145
|
-
*
|
|
184
|
+
* Dropchance Rarity (Uncommon/Rare ?)
|
|
146
185
|
*/
|
|
186
|
+
rarity: 'Rare' | 'Uncommon';
|
|
187
|
+
}
|
|
188
|
+
interface WFCDSparseComponent {
|
|
147
189
|
name: string;
|
|
148
|
-
/** unique name for corresponding warframe-items Item */
|
|
149
190
|
uniqueName: string;
|
|
150
|
-
/**
|
|
151
|
-
* WarframeMarket Info
|
|
152
|
-
*/
|
|
153
|
-
warframeMarket?: TitaniaWFMInfo;
|
|
154
191
|
}
|
|
155
|
-
|
|
156
|
-
interface
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
* Rarity (Uncommon, Rare ?)
|
|
161
|
-
*/
|
|
162
|
-
rarity: Rarity;
|
|
163
|
-
/**
|
|
164
|
-
* Dropchance in %
|
|
165
|
-
*/
|
|
166
|
-
chance: number;
|
|
167
|
-
}
|
|
168
|
-
interface TitaniaWFMInfo {
|
|
169
|
-
/**
|
|
170
|
-
* Warframe Market ID
|
|
171
|
-
*/
|
|
172
|
-
id: string;
|
|
173
|
-
/**
|
|
174
|
-
* Warframe market URL parameter
|
|
175
|
-
*/
|
|
176
|
-
urlName: string;
|
|
177
|
-
}
|
|
178
|
-
interface TitaniaRelicVaultedInfo {
|
|
179
|
-
/**
|
|
180
|
-
* If the relic is vaulted
|
|
181
|
-
*/
|
|
182
|
-
vaulted: boolean;
|
|
192
|
+
/** Sparse warframestat item (name + uniqueName, optional components) */
|
|
193
|
+
interface WFCDSparseItem {
|
|
194
|
+
components?: WFCDSparseComponent[];
|
|
195
|
+
name: string;
|
|
196
|
+
uniqueName: string;
|
|
183
197
|
}
|
|
184
198
|
//#endregion
|
|
185
199
|
//#region src/Generator.d.ts
|
|
186
200
|
declare class Generator {
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
201
|
+
/** Lowercase item name → uniqueName from sparse warframestat index (+ Blueprint follow-ups) */
|
|
202
|
+
itemUniqueNames: Map<string, string>;
|
|
203
|
+
relics: TitaniaRelic[];
|
|
204
|
+
relicsRaw: undefined | WFCDRelic[];
|
|
205
|
+
wfcdItems: undefined | WFCDItem[];
|
|
206
|
+
wfmItems: undefined | WarframeMarketRoot;
|
|
191
207
|
constructor();
|
|
192
|
-
/**
|
|
193
|
-
* Main function to fetch and generate the relic data
|
|
194
|
-
* @returns {Promise<Array<TitaniaRelic>>} The Relics data array
|
|
195
|
-
*/
|
|
196
|
-
generate(): Promise<Array<TitaniaRelic>>;
|
|
197
208
|
/**
|
|
198
209
|
* Fetches all required data from WFCD and WFM.
|
|
199
210
|
*/
|
|
200
211
|
fetchRawData(): Promise<void>;
|
|
212
|
+
/**
|
|
213
|
+
* Main function to fetch and generate the relic data
|
|
214
|
+
* @returns {Promise<Array<TitaniaRelic>>} The Relics data array
|
|
215
|
+
*/
|
|
216
|
+
generate(): Promise<TitaniaRelic[]>;
|
|
201
217
|
/**
|
|
202
218
|
* Generates the relic data
|
|
203
219
|
* uses WFCD/warframe-drop-data to check what relics exist,
|
|
@@ -211,6 +227,16 @@ declare class Generator {
|
|
|
211
227
|
* @param {boolean} generateMin True if a minified json should be generated too. Default: true
|
|
212
228
|
*/
|
|
213
229
|
writeData(dataDir?: string, fileName?: string, generateMin?: boolean): Promise<void>;
|
|
230
|
+
/**
|
|
231
|
+
* Fetch a single warframestat item by name with components for Blueprint resolution.
|
|
232
|
+
* @param {string} name Item display name
|
|
233
|
+
* @returns {Promise<WFCDSparseItem|undefined>} Item or undefined on failure
|
|
234
|
+
*/
|
|
235
|
+
private fetchItemByName;
|
|
236
|
+
/**
|
|
237
|
+
* Filters WFCD's relic data to only include Intact variants, since we just need the base.
|
|
238
|
+
*/
|
|
239
|
+
private filterWFCDRelics;
|
|
214
240
|
/**
|
|
215
241
|
* Generates a single relic from all available data
|
|
216
242
|
* @param {WFCDRelic} rawRelic relic to pull Titania data from
|
|
@@ -218,16 +244,22 @@ declare class Generator {
|
|
|
218
244
|
*/
|
|
219
245
|
private generateTitaniaRelic;
|
|
220
246
|
/**
|
|
221
|
-
*
|
|
247
|
+
* Index sparse warframestat items by lowercase name, preferring /Lotus/Types/ paths.
|
|
248
|
+
* @param {Array<WFCDSparseItem>} items Sparse item list from warframestat
|
|
222
249
|
*/
|
|
223
|
-
private
|
|
250
|
+
private indexSparseItems;
|
|
251
|
+
/**
|
|
252
|
+
* For reward names missing WFM, resolve uniqueNames from sparse index.
|
|
253
|
+
* Blueprint-suffixed names need a parent item fetch for the Blueprint component.
|
|
254
|
+
*/
|
|
255
|
+
private resolveSpecialRewardUniqueNames;
|
|
224
256
|
}
|
|
225
257
|
//#endregion
|
|
226
258
|
//#region src/VersionManager.d.ts
|
|
227
259
|
declare class VersionManager {
|
|
260
|
+
hashPath: string;
|
|
228
261
|
versionPath: string;
|
|
229
262
|
versionRawPath: string;
|
|
230
|
-
hashPath: string;
|
|
231
263
|
/**
|
|
232
264
|
* Creates a new VersionManager instance.
|
|
233
265
|
* @param {string} dataDir Folder to write version information to.
|
|
@@ -245,4 +277,4 @@ declare class VersionManager {
|
|
|
245
277
|
writeVersion(timestamp: number): Promise<void>;
|
|
246
278
|
}
|
|
247
279
|
//#endregion
|
|
248
|
-
export { Generator, Rarity, TitaniaRelic, TitaniaRelicLocation, TitaniaRelicReward, TitaniaRelicRewardItem, TitaniaRelicVaultedInfo, TitaniaWFMInfo, VersionManager, WFCDItem, WFCDItemDropLocation, WFCDRelic, WFCDRelicReward, WarframeMarketItem, WarframeMarketRoot };
|
|
280
|
+
export { Generator, Rarity, TitaniaRelic, TitaniaRelicLocation, TitaniaRelicReward, TitaniaRelicRewardItem, TitaniaRelicVaultedInfo, TitaniaWFMInfo, VersionManager, WFCDItem, WFCDItemDropLocation, WFCDRelic, WFCDRelicReward, WFCDSparseComponent, WFCDSparseItem, WarframeMarketItem, WarframeMarketRoot };
|