@wfcd/profile-parser 2.0.10 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/Ability.d.mts +18 -1
  2. package/dist/Ability.mjs +23 -1
  3. package/dist/ChallengeProgress.d.mts +19 -1
  4. package/dist/ChallengeProgress.mjs +24 -1
  5. package/dist/Enemy.d.mts +43 -1
  6. package/dist/Enemy.mjs +42 -1
  7. package/dist/Intrinsics.d.mts +66 -1
  8. package/dist/Intrinsics.mjs +65 -1
  9. package/dist/ItemConfig.d.mts +50 -3
  10. package/dist/ItemConfig.mjs +48 -3
  11. package/dist/LoadOutInventory.d.mts +52 -7
  12. package/dist/LoadOutInventory.mjs +50 -7
  13. package/dist/LoadOutItem.d.mts +119 -5
  14. package/dist/LoadOutItem.mjs +125 -5
  15. package/dist/LoadOutPreset.d.mts +82 -1
  16. package/dist/LoadOutPreset.mjs +81 -2
  17. package/dist/Mission.d.mts +52 -1
  18. package/dist/Mission.mjs +53 -1
  19. package/dist/OperatorLoadOuts.d.mts +80 -3
  20. package/dist/OperatorLoadOuts.mjs +74 -3
  21. package/dist/Polarity.d.mts +25 -1
  22. package/dist/Polarity.mjs +26 -1
  23. package/dist/Profile.d.mts +211 -14
  24. package/dist/Profile.mjs +191 -14
  25. package/dist/ProfileParser.d.mts +7 -25
  26. package/dist/ProfileParser.mjs +4 -23
  27. package/dist/Pvp.d.mts +35 -1
  28. package/dist/Pvp.mjs +34 -1
  29. package/dist/Race.d.mts +31 -1
  30. package/dist/Race.mjs +33 -1
  31. package/dist/Scan.d.mts +26 -1
  32. package/dist/Scan.mjs +25 -1
  33. package/dist/Skin.d.mts +27 -1
  34. package/dist/Skin.mjs +34 -2
  35. package/dist/Stats.d.mts +324 -8
  36. package/dist/Stats.mjs +303 -8
  37. package/dist/Syndicate.d.mts +32 -1
  38. package/dist/Syndicate.mjs +31 -1
  39. package/dist/Utils.d.mts +35 -1
  40. package/dist/Utils.mjs +58 -1
  41. package/dist/Weapon.d.mts +31 -1
  42. package/dist/Weapon.mjs +62 -1
  43. package/dist/XpInfo.d.mts +33 -1
  44. package/dist/XpInfo.mjs +33 -2
  45. package/package.json +10 -11
  46. package/dist/Ability-Bkn1Kr0F.d.mts +0 -19
  47. package/dist/Ability-DsyqxzjP.mjs +0 -25
  48. package/dist/ChallengeProgress-ByYNDHWY.d.mts +0 -20
  49. package/dist/ChallengeProgress-Cpks92At.mjs +0 -26
  50. package/dist/Enemy-B3JSksZZ.mjs +0 -44
  51. package/dist/Enemy-VT_y6RNw.d.mts +0 -44
  52. package/dist/Intrinsics-aQNZre3S.d.mts +0 -67
  53. package/dist/Intrinsics-kYw_LPq1.mjs +0 -67
  54. package/dist/ItemConfig-DTIrA_P_.mjs +0 -50
  55. package/dist/ItemConfig-R2z1Z3uo.d.mts +0 -51
  56. package/dist/LoadOutInventory-BbaIazHX.mjs +0 -52
  57. package/dist/LoadOutInventory-BtVQX9Mi.d.mts +0 -53
  58. package/dist/LoadOutItem-p-f5RdTB.mjs +0 -127
  59. package/dist/LoadOutItem-weow3bab.d.mts +0 -120
  60. package/dist/LoadOutPreset-CwbK2VvR.mjs +0 -83
  61. package/dist/LoadOutPreset-Dvs-Zisw.d.mts +0 -83
  62. package/dist/Mission-Bkx_g_to.d.mts +0 -53
  63. package/dist/Mission-DfGQMV7B.mjs +0 -55
  64. package/dist/OperatorLoadOuts-DtxjrIci.d.mts +0 -75
  65. package/dist/OperatorLoadOuts-LYGpTHuj.mjs +0 -76
  66. package/dist/Polarity-0fJe_D8l.d.mts +0 -26
  67. package/dist/Polarity-Q2JfovbR.mjs +0 -28
  68. package/dist/Profile-Beptm6wY.d.mts +0 -212
  69. package/dist/Profile-D15zUqzG.mjs +0 -193
  70. package/dist/Pvp-DtncK80C.d.mts +0 -36
  71. package/dist/Pvp-DwOk9iPM.mjs +0 -36
  72. package/dist/Race-CV98F8P6.mjs +0 -35
  73. package/dist/Race-b-1i8d0Y.d.mts +0 -32
  74. package/dist/Scan-2TQmEr2X.d.mts +0 -27
  75. package/dist/Scan-Du5aj7LZ.mjs +0 -27
  76. package/dist/Skin-CqeNtCDU.d.mts +0 -28
  77. package/dist/Skin-D_brWp2g.mjs +0 -36
  78. package/dist/Stats-Bvzk1GOV.mjs +0 -305
  79. package/dist/Stats-D8GkxqWB.d.mts +0 -325
  80. package/dist/Syndicate-CcRnzmZs.mjs +0 -33
  81. package/dist/Syndicate-PiVz8ikQ.d.mts +0 -33
  82. package/dist/Utils-Bqm2Gg1K.mjs +0 -59
  83. package/dist/Utils-M8z7sZIf.d.mts +0 -37
  84. package/dist/Weapon-CUoF9mPh.d.mts +0 -32
  85. package/dist/Weapon-zRX33-22.mjs +0 -64
  86. package/dist/XpInfo-CpwSvxlR.d.mts +0 -34
  87. package/dist/XpInfo-IT6LOTzI.mjs +0 -35
package/dist/Stats.mjs CHANGED
@@ -1,10 +1,305 @@
1
- import "./Ability-DsyqxzjP.mjs";
2
- import "./Enemy-B3JSksZZ.mjs";
3
- import "./Mission-DfGQMV7B.mjs";
4
- import "./Pvp-DwOk9iPM.mjs";
5
- import "./Race-CV98F8P6.mjs";
6
- import "./Scan-Du5aj7LZ.mjs";
7
- import "./Weapon-zRX33-22.mjs";
8
- import { t as Stats } from "./Stats-Bvzk1GOV.mjs";
1
+ import Ability from "./Ability.mjs";
2
+ import Enemy from "./Enemy.mjs";
3
+ import Mission from "./Mission.mjs";
4
+ import Pvp from "./Pvp.mjs";
5
+ import Race from "./Race.mjs";
6
+ import Scan from "./Scan.mjs";
7
+ import Weapon from "./Weapon.mjs";
9
8
 
9
+ //#region src/Stats.ts
10
+ /**
11
+ * A player's overall career stats
12
+ * @module
13
+ */
14
+ var Stats = class {
15
+ /**
16
+ * Guild name
17
+ */
18
+ guildName;
19
+ /**
20
+ * Missions completed
21
+ */
22
+ missionsCompleted;
23
+ /**
24
+ * Missions quit
25
+ */
26
+ missionsQuit;
27
+ /**
28
+ * Misions failed
29
+ */
30
+ missionsFailed;
31
+ /**
32
+ * Missions interrupted
33
+ */
34
+ missionsInterrupted;
35
+ /**
36
+ * Missions dumped
37
+ */
38
+ missionsDumped;
39
+ /**
40
+ * Items picked up
41
+ */
42
+ pickupCount;
43
+ /**
44
+ * Stats per weapon
45
+ */
46
+ weapons;
47
+ /**
48
+ * Stats on enemy encounters.
49
+ */
50
+ enemies;
51
+ /**
52
+ * Max score for Operation: Cryotic Front
53
+ */
54
+ excavationEventScoreMax;
55
+ /**
56
+ * Max scoring for The Cicero crisis
57
+ */
58
+ forestEventScoreMax;
59
+ /**
60
+ * Clan scoring for The Cicero crisis
61
+ */
62
+ forestEventScoreSum;
63
+ /**
64
+ * Melee kills
65
+ */
66
+ meleeKills;
67
+ /**
68
+ * Used abilities
69
+ */
70
+ abilities;
71
+ /**
72
+ * Ciphers completed successfully
73
+ */
74
+ ciphersSolved;
75
+ /**
76
+ * Ciphers failed
77
+ */
78
+ ciphersFailed;
79
+ /**
80
+ * Gross income
81
+ */
82
+ income;
83
+ /**
84
+ * Total play time since account creation
85
+ */
86
+ timePlayedSec;
87
+ /**
88
+ * Average time to hack a panel
89
+ */
90
+ cipherTime;
91
+ /**
92
+ * N/A
93
+ */
94
+ rating;
95
+ /**
96
+ * Mastery rank
97
+ */
98
+ rank;
99
+ /**
100
+ * Total deaths since account creation
101
+ */
102
+ deaths;
103
+ /**
104
+ * Mastery rank
105
+ */
106
+ playerLevel;
107
+ /**
108
+ * List of missions and high scores
109
+ */
110
+ missions;
111
+ /**
112
+ * Team heals
113
+ */
114
+ healCount;
115
+ /**
116
+ * Event Scores for Operation breeding grounds
117
+ */
118
+ breedGrounds;
119
+ /**
120
+ * Event Scores for The Gradivus Dilemma
121
+ */
122
+ gradivusDilemma;
123
+ /**
124
+ * List of scanned Warframe objects
125
+ */
126
+ scans;
127
+ /**
128
+ * Team revives
129
+ */
130
+ reviveCount;
131
+ /**
132
+ * Score for Operation: Eyes of Blight
133
+ */
134
+ fomorianEventScore;
135
+ /**
136
+ * Conclave scores
137
+ */
138
+ pvp;
139
+ /**
140
+ * Lunaro stats
141
+ */
142
+ lunaro;
143
+ /**
144
+ * Dojo obstacle course goal
145
+ */
146
+ dojoObstacleScore;
147
+ /**
148
+ * N/A
149
+ */
150
+ pvpGamesPendingMask;
151
+ /**
152
+ * N/A
153
+ */
154
+ dedicatedServerGamesCompleted;
155
+ /**
156
+ * Event score for the Pacifism Defect
157
+ */
158
+ pacifismDefect;
159
+ /**
160
+ * Score for operation Ambulas reborn.
161
+ */
162
+ ambulasReborn;
163
+ /**
164
+ * Score for Wyrmius mini game
165
+ */
166
+ sentinelGameScore;
167
+ /**
168
+ * Event score for operation hostile merger
169
+ */
170
+ amalgamEventScoreMax;
171
+ /**
172
+ * Operation Scarlet spear event score and badges
173
+ */
174
+ scarletSpear;
175
+ /**
176
+ * Operation: Orphix Venom score
177
+ */
178
+ orphixVenomScore;
179
+ /**
180
+ * Play's Highest score in Happy Zephyr
181
+ */
182
+ happyZephyrScore;
183
+ /**
184
+ * K-Drive races
185
+ */
186
+ kDriveRaces;
187
+ /**
188
+ * Operation Gate Crash event
189
+ */
190
+ gateCrash;
191
+ /**
192
+ * Per mission score for Operation: False Profit
193
+ */
194
+ falseProfitMissionScore;
195
+ /**
196
+ * Total even score for Operation: False Profit
197
+ */
198
+ falseProfitEventScore;
199
+ /**
200
+ * Operation: Shadow Debt event score
201
+ */
202
+ shadowDebtEventScore;
203
+ /**
204
+ * Operation: Rathuum event score
205
+ */
206
+ rathuumEventScore;
207
+ /**
208
+ * Hollowed flame event max score
209
+ */
210
+ hallowedFlameScoreMax;
211
+ /**
212
+ * Survival Weekend event score
213
+ */
214
+ survivalWeekenedEventScore;
215
+ /**
216
+ * N/A
217
+ */
218
+ infestedEventScore;
219
+ /**
220
+ *
221
+ * @param stats Player stats
222
+ */
223
+ constructor(stats) {
224
+ this.guildName = stats.GuildName;
225
+ this.missionsCompleted = stats.MissionsCompleted;
226
+ this.missionsQuit = stats.MissionsQuit;
227
+ this.missionsFailed = stats.MissionsFailed;
228
+ this.missionsInterrupted = stats.MissionsInterrupted;
229
+ this.missionsDumped = stats.MissionsDumped;
230
+ this.pickupCount = stats.PickupCount;
231
+ this.weapons = stats.Weapons.map((w) => new Weapon(w));
232
+ this.enemies = stats.Enemies.map((e) => new Enemy(e));
233
+ if (stats.ExcavationEventScoreMax) this.excavationEventScoreMax = stats.ExcavationEventScoreMax;
234
+ if (stats.ForestEventScoreMax) this.forestEventScoreMax = stats.ForestEventScoreMax;
235
+ if (stats.ForestEventScoreSum) this.forestEventScoreSum = stats.ForestEventScoreSum;
236
+ this.meleeKills = stats.MeleeKills;
237
+ this.abilities = stats.Abilities.map((a) => new Ability(a));
238
+ this.ciphersSolved = stats.CiphersSolved;
239
+ this.ciphersFailed = stats.CiphersFailed;
240
+ this.income = stats.Income;
241
+ this.timePlayedSec = stats.TimePlayedSec;
242
+ this.cipherTime = stats.CipherTime;
243
+ this.rating = stats.Rating;
244
+ this.rank = stats.Rank;
245
+ this.deaths = stats.Deaths;
246
+ this.playerLevel = stats.PlayerLevel;
247
+ this.missions = stats.Missions.map((m) => new Mission(m));
248
+ this.healCount = stats.HealCount;
249
+ if (stats.HiveEventScore || stats.HiveEventScoreSum) this.breedGrounds = {
250
+ personalScore: stats.HiveEventScore,
251
+ clanScore: stats.HiveEventScoreSum
252
+ };
253
+ if (stats.InvasionEventGrineerScore || stats.InvasionEventCorpusScore) this.gradivusDilemma = {
254
+ grineer: stats.InvasionEventGrineerScore,
255
+ corpus: stats.InvasionEventCorpusScore
256
+ };
257
+ this.scans = stats.Scans?.map((s) => new Scan(s)) ?? [];
258
+ this.reviveCount = stats.ReviveCount;
259
+ if (stats.FomorianEventScore) this.fomorianEventScore = stats.FomorianEventScore;
260
+ this.pvp = stats.PVP?.map((pvp) => new Pvp(pvp)) ?? [];
261
+ this.lunaro = {
262
+ ties: stats.PVPSpeedballTies ?? 0,
263
+ checks: stats.PVPSpeedballChecks ?? 0,
264
+ goals: stats.PVPSpeedballGoals ?? 0,
265
+ interceptions: stats.PVPSpeedballInterceptions ?? 0,
266
+ steals: stats.PVPSpeedballSteals ?? 0,
267
+ points: stats.PVPSpeedballPoints ?? 0,
268
+ losses: stats.PVPSpeedballLosses ?? 0,
269
+ assists: stats.PVPSpeedballAssists ?? 0,
270
+ wins: stats.PVPSpeedballWins ?? 0,
271
+ saves: stats.PVPSpeedballSaves ?? 0,
272
+ passes: stats.PVPSpeedballPasses ?? 0
273
+ };
274
+ this.dojoObstacleScore = stats.DojoObstacleScore ?? 0;
275
+ this.pvpGamesPendingMask = stats.PvpGamesPendingMask ?? 0;
276
+ this.dedicatedServerGamesCompleted = stats.DedicatedServerGamesCompleted ?? 0;
277
+ if (stats.ColonistRescueEventScoreMax) this.pacifismDefect = stats.ColonistRescueEventScoreMax;
278
+ if (stats.AmbulasEventScoreMax) this.ambulasReborn = stats.AmbulasEventScoreMax;
279
+ if (stats.SentinelGameScore) this.sentinelGameScore = stats.SentinelGameScore;
280
+ if (stats.AmalgamEventScoreMax) this.amalgamEventScoreMax = stats.AmalgamEventScoreMax;
281
+ if (stats.FlotillaEventScore) this.scarletSpear = {
282
+ eventScore: stats.FlotillaEventScore,
283
+ condrixTier1: stats.FlotillaGroundBadgesTier1,
284
+ condrixTier2: stats.FlotillaGroundBadgesTier2,
285
+ condrixTier3: stats.FlotillaGroundBadgesTier3,
286
+ murexTier1: stats.FlotillaSpaceBadgesTier1,
287
+ murexTier2: stats.FlotillaSpaceBadgesTier2,
288
+ murexTier3: stats.FlotillaSpaceBadgesTier3
289
+ };
290
+ if (stats.MechSurvivalScoreMax) this.orphixVenomScore = stats.MechSurvivalScoreMax;
291
+ this.happyZephyrScore = stats.ZephyrScore ?? 0;
292
+ this.kDriveRaces = Race.fromRaceObject(stats.Races);
293
+ if (stats.PortalEventScore) this.gateCrash = stats.PortalEventScore;
294
+ if (stats.RiotMoaEventScore) this.falseProfitMissionScore = stats.RiotMoaEventScore;
295
+ if (stats.RiotMoaEventScoreMax) this.falseProfitEventScore = stats.RiotMoaEventScoreMax;
296
+ if (stats.ProjectSinisterEventScore) this.shadowDebtEventScore = stats.ProjectSinisterEventScore;
297
+ if (stats.KelaEventBonusScoreMax) this.rathuumEventScore = stats.KelaEventBonusScoreMax;
298
+ if (stats.Halloween19ScoreMax) this.hallowedFlameScoreMax = stats.Halloween19ScoreMax;
299
+ if (stats.SurvivalEventScore) this.survivalWeekenedEventScore = stats.SurvivalEventScore;
300
+ if (stats.InfestedEventScore) this.infestedEventScore = stats.InfestedEventScore;
301
+ }
302
+ };
303
+
304
+ //#endregion
10
305
  export { Stats as default };
@@ -1,2 +1,33 @@
1
- import { n as Syndicate, t as RawAffiliation } from "./Syndicate-PiVz8ikQ.mjs";
1
+ import { Locale } from "warframe-worldstate-data";
2
+
3
+ //#region src/Syndicate.d.ts
4
+ interface RawAffiliation {
5
+ Tag: string;
6
+ Standing: number;
7
+ Title: number;
8
+ }
9
+ /**
10
+ * Represents a syndicate
11
+ * @module
12
+ */
13
+ declare class Syndicate {
14
+ /**
15
+ * Name of the syndicate
16
+ */
17
+ name: string;
18
+ /**
19
+ * Current standing the player has with the syndicate
20
+ */
21
+ standing: number;
22
+ /**
23
+ * The player's current syndicate title
24
+ */
25
+ title: number;
26
+ /**
27
+ * @param affiliation The syndicate data
28
+ * @param locale locale code
29
+ */
30
+ constructor(affiliation: RawAffiliation, locale?: Locale);
31
+ }
32
+ //#endregion
2
33
  export { RawAffiliation, Syndicate as default };
@@ -1,3 +1,33 @@
1
- import { t as Syndicate } from "./Syndicate-CcRnzmZs.mjs";
1
+ import { syndicate } from "warframe-worldstate-data/utilities";
2
2
 
3
+ //#region src/Syndicate.ts
4
+ /**
5
+ * Represents a syndicate
6
+ * @module
7
+ */
8
+ var Syndicate = class {
9
+ /**
10
+ * Name of the syndicate
11
+ */
12
+ name;
13
+ /**
14
+ * Current standing the player has with the syndicate
15
+ */
16
+ standing;
17
+ /**
18
+ * The player's current syndicate title
19
+ */
20
+ title;
21
+ /**
22
+ * @param affiliation The syndicate data
23
+ * @param locale locale code
24
+ */
25
+ constructor(affiliation, locale = "en") {
26
+ this.name = syndicate(affiliation.Tag, locale);
27
+ this.standing = affiliation.Standing;
28
+ this.title = affiliation.Title;
29
+ }
30
+ };
31
+
32
+ //#endregion
3
33
  export { Syndicate as default };
package/dist/Utils.d.mts CHANGED
@@ -1,2 +1,36 @@
1
- import { a as mapToHex, i as find, n as RawDate, o as numberToLetter, r as RawId, t as ProfileRawColors } from "./Utils-M8z7sZIf.mjs";
1
+ import { WorldStateDate } from "warframe-worldstate-data/utilities";
2
+ import { Item, RawColors } from "@wfcd/items";
3
+
4
+ //#region src/Utils.d.ts
5
+ /**
6
+ * interface for DE's ID data
7
+ */
8
+ interface RawId {
9
+ $oid: string;
10
+ }
11
+ type RawDate = WorldStateDate;
12
+ interface ProfileRawColors {
13
+ t0?: number;
14
+ t1?: number;
15
+ t2?: number;
16
+ t3?: number;
17
+ m0?: number;
18
+ m1?: number;
19
+ en?: number;
20
+ e1?: number;
21
+ }
22
+ /**
23
+ * Map base10 int colors to hex color strings
24
+ * @param colors color map
25
+ */
26
+ declare const mapToHex: (colors: ProfileRawColors) => RawColors;
27
+ /**
28
+ * Find an item by Item#uniqueName
29
+ * @param {string} name string with which to query
30
+ * @param {string} locale locale to use for internationalization
31
+ * @returns {Item}
32
+ */
33
+ declare const find: (name: string, locale?: string) => Item;
34
+ declare const numberToLetter: (num: number) => string;
35
+ //#endregion
2
36
  export { ProfileRawColors, RawDate, RawId, find, mapToHex, numberToLetter };
package/dist/Utils.mjs CHANGED
@@ -1,3 +1,60 @@
1
- import { n as mapToHex, r as numberToLetter, t as find } from "./Utils-Bqm2Gg1K.mjs";
1
+ import Items from "@wfcd/items";
2
2
 
3
+ //#region src/Utils.ts
4
+ /**
5
+ * Map base10 int colors to hex color strings
6
+ * @param colors color map
7
+ */
8
+ const mapToHex = (colors) => {
9
+ const hex = {};
10
+ Object.entries(colors).forEach(([key, value]) => {
11
+ if (value) hex[key] = Math.abs(value).toString(16).toUpperCase();
12
+ });
13
+ return hex;
14
+ };
15
+ const categories = [
16
+ "Skins",
17
+ "Primary",
18
+ "Secondary",
19
+ "Melee",
20
+ "Arch-Melee",
21
+ "Arch-Gun",
22
+ "Warframes",
23
+ "Archwing",
24
+ "Sentinels",
25
+ "Pets"
26
+ ];
27
+ /**
28
+ * Find an item by Item#uniqueName
29
+ * @param {string} name string with which to query
30
+ * @param {string} locale locale to use for internationalization
31
+ * @returns {Item}
32
+ */
33
+ const find = (name, locale = "en") => {
34
+ const item = new Items({
35
+ category: categories,
36
+ i18n: [locale],
37
+ i18nOnObject: true
38
+ }).find((i) => i.uniqueName === name);
39
+ let itemClone = { ...item };
40
+ if (locale !== "en" && itemClone.i18n?.[locale]) {
41
+ itemClone = {
42
+ ...itemClone,
43
+ ...itemClone.i18n[locale]
44
+ };
45
+ const warframe = itemClone;
46
+ if (warframe.abilities) warframe.abilities = warframe.abilities.map((ability) => ({
47
+ uniqueName: ability.abilityUniqueName || ability.uniqueName || void 0,
48
+ name: ability.abilityName || ability.name,
49
+ description: ability.abilityDescription || ability.description,
50
+ imageName: ability.imageName ?? void 0
51
+ }));
52
+ delete itemClone.i18n;
53
+ return itemClone;
54
+ }
55
+ return item;
56
+ };
57
+ const numberToLetter = (num) => String.fromCharCode(64 + (num + 1));
58
+
59
+ //#endregion
3
60
  export { find, mapToHex, numberToLetter };
package/dist/Weapon.d.mts CHANGED
@@ -1,2 +1,32 @@
1
- import { n as Weapon, t as RawWeapon } from "./Weapon-CUoF9mPh.mjs";
1
+ //#region src/Weapon.d.ts
2
+ interface RawWeapon {
3
+ type: string;
4
+ xp: number;
5
+ equipTime: number;
6
+ headShots: number;
7
+ hits: number;
8
+ assists: number;
9
+ kills: number;
10
+ fired: number;
11
+ }
12
+ /**
13
+ * Represents a player's used weapon stats
14
+ * @module
15
+ */
16
+ declare class Weapon {
17
+ uniqueName: string;
18
+ xp: number;
19
+ equipTime: number;
20
+ headShots: number;
21
+ hits: number;
22
+ assists: number;
23
+ kills: number;
24
+ fired: number;
25
+ /**
26
+ *
27
+ * @param weapon The weapon stats being parsed
28
+ */
29
+ constructor(weapon: RawWeapon);
30
+ }
31
+ //#endregion
2
32
  export { RawWeapon, Weapon as default };
package/dist/Weapon.mjs CHANGED
@@ -1,3 +1,64 @@
1
- import { t as Weapon } from "./Weapon-zRX33-22.mjs";
1
+ //#region src/Weapon.ts
2
+ /**
3
+ * Represents a player's used weapon stats
4
+ * @module
5
+ */
6
+ var Weapon = class {
7
+ uniqueName;
8
+ xp;
9
+ equipTime;
10
+ headShots;
11
+ hits;
12
+ assists;
13
+ kills;
14
+ fired;
15
+ /**
16
+ *
17
+ * @param weapon The weapon stats being parsed
18
+ */
19
+ constructor(weapon) {
20
+ /**
21
+ * Weapon unique name
22
+ * @type {String}
23
+ */
24
+ this.uniqueName = weapon.type;
25
+ /**
26
+ * Earned XP with weapon
27
+ * @type {number}
28
+ */
29
+ this.xp = weapon.xp;
30
+ /**
31
+ * Time using this weapon
32
+ * @type {number}
33
+ */
34
+ this.equipTime = weapon.equipTime;
35
+ /**
36
+ * Headshots using this weapon
37
+ * @type {number}
38
+ */
39
+ this.headShots = weapon.headShots;
40
+ /**
41
+ * Hits using weapon
42
+ * @type {number}
43
+ */
44
+ this.hits = weapon.hits;
45
+ /**
46
+ * Assists using weapon
47
+ * @type {number}
48
+ */
49
+ this.assists = weapon.assists;
50
+ /**
51
+ * Kills with weapon
52
+ * @type {number}
53
+ */
54
+ this.kills = weapon.kills;
55
+ /**
56
+ * Shots fired
57
+ * @type {number}
58
+ */
59
+ this.fired = weapon.fired;
60
+ }
61
+ };
2
62
 
63
+ //#endregion
3
64
  export { Weapon as default };
package/dist/XpInfo.d.mts CHANGED
@@ -1,2 +1,34 @@
1
- import { n as XpInfo, t as RawXpItem } from "./XpInfo-CpwSvxlR.mjs";
1
+ import { Item } from "@wfcd/items";
2
+
3
+ //#region src/XpInfo.d.ts
4
+ interface RawXpItem {
5
+ ItemType: string;
6
+ XP: number;
7
+ }
8
+ /**
9
+ * An item that has contributed to a player's mastery rank
10
+ * @module
11
+ */
12
+ declare class XpInfo {
13
+ /**
14
+ * Unique name
15
+ */
16
+ uniqueName: string;
17
+ /**
18
+ * XP earned
19
+ */
20
+ xp: number;
21
+ /**
22
+ * The item corrosponding to the unique name.
23
+ */
24
+ item?: Item;
25
+ /**
26
+ *
27
+ * @param info The info for a given ranked item
28
+ * @param locale langauge to return item in
29
+ * @param withItem Whether or not to include items
30
+ */
31
+ constructor(info: RawXpItem, locale?: string, withItem?: boolean);
32
+ }
33
+ //#endregion
2
34
  export { RawXpItem, XpInfo as default };
package/dist/XpInfo.mjs CHANGED
@@ -1,4 +1,35 @@
1
- import "./Utils-Bqm2Gg1K.mjs";
2
- import { t as XpInfo } from "./XpInfo-IT6LOTzI.mjs";
1
+ import { find } from "./Utils.mjs";
3
2
 
3
+ //#region src/XpInfo.ts
4
+ /**
5
+ * An item that has contributed to a player's mastery rank
6
+ * @module
7
+ */
8
+ var XpInfo = class {
9
+ /**
10
+ * Unique name
11
+ */
12
+ uniqueName;
13
+ /**
14
+ * XP earned
15
+ */
16
+ xp;
17
+ /**
18
+ * The item corrosponding to the unique name.
19
+ */
20
+ item;
21
+ /**
22
+ *
23
+ * @param info The info for a given ranked item
24
+ * @param locale langauge to return item in
25
+ * @param withItem Whether or not to include items
26
+ */
27
+ constructor(info, locale = "en", withItem = false) {
28
+ this.uniqueName = info.ItemType;
29
+ this.xp = info.XP;
30
+ if (withItem) this.item = find(info.ItemType, locale);
31
+ }
32
+ };
33
+
34
+ //#endregion
4
35
  export { XpInfo as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wfcd/profile-parser",
3
- "version": "2.0.10",
3
+ "version": "2.0.12",
4
4
  "description": "Parser for Digital Extreme's profile data",
5
5
  "repository": "https://github.com/WFCD/profile-parser",
6
6
  "type": "module",
@@ -30,29 +30,28 @@
30
30
  "types"
31
31
  ],
32
32
  "devDependencies": {
33
- "@biomejs/biome": "2.3.8",
33
+ "@biomejs/biome": "2.4.4",
34
34
  "@types/chai": "^5.2.3",
35
35
  "@types/mocha": "^10.0.10",
36
- "@wfcd/eslint-config": "^1.6.4",
37
- "c8": "^10.1.3",
38
- "chai": "^6.2.1",
36
+ "c8": "^11.0.0",
37
+ "chai": "^6.2.2",
39
38
  "chai-json-equal": "^0.0.1",
40
39
  "husky": "^9.1.7",
41
- "install-peerdeps": "^3.0.7",
42
40
  "lint-staged": "^16.2.7",
43
41
  "mocha": "^11.7.5",
44
- "tsdown": "^0.16.8",
45
- "tsx": "^4.20.6",
42
+ "tsdown": "^0.20.1",
43
+ "tsx": "^4.21.0",
46
44
  "typescript": "^5.9.3"
47
45
  },
48
46
  "scripts": {
49
47
  "build": "tsdown",
50
48
  "build:docs": "tsdown && jsdoc -c .github/docs/conf.json -d docs",
51
49
  "coverage": "npm test && c8 report --reporter=text-lcov | npx -y -p coveralls coveralls",
52
- "lint": "biome lint",
53
- "lint:fix": "biome lint --write",
50
+ "lint": "biome check",
51
+ "lint:fix": "biome check --write",
54
52
  "prepublishOnly": "npm run build",
55
- "test": "c8 mocha"
53
+ "test": "c8 mocha",
54
+ "prepare": "husky"
56
55
  },
57
56
  "author": "SlayerOrnstein",
58
57
  "license": "MIT",