@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
@@ -1,59 +0,0 @@
1
- import Items from "@wfcd/items";
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 name string with which to query
30
- * @param 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] && itemClone.i18n[locale]) {
41
- itemClone = {
42
- ...itemClone,
43
- ...itemClone.i18n[locale]
44
- };
45
- if (itemClone.abilities) itemClone.abilities = itemClone.abilities.map((ability) => ({
46
- uniqueName: ability.abilityUniqueName || ability.uniqueName || void 0,
47
- name: ability.abilityName || ability.name,
48
- description: ability.abilityDescription || ability.description,
49
- imageName: ability.imageName ?? void 0
50
- }));
51
- delete itemClone.i18n;
52
- return itemClone;
53
- }
54
- return item;
55
- };
56
- const numberToLetter = (num) => String.fromCharCode(64 + (num + 1));
57
-
58
- //#endregion
59
- export { mapToHex as n, numberToLetter as r, find as t };
@@ -1,37 +0,0 @@
1
- import { WorldStateDate } from "warframe-worldstate-data/utilities";
2
- import { RawColors } from "@wfcd/items";
3
-
4
- //#region src/Utils.d.ts
5
-
6
- /**
7
- * interface for DE's ID data
8
- */
9
- interface RawId {
10
- $oid: string;
11
- }
12
- type RawDate = WorldStateDate;
13
- interface ProfileRawColors {
14
- t0?: number;
15
- t1?: number;
16
- t2?: number;
17
- t3?: number;
18
- m0?: number;
19
- m1?: number;
20
- en?: number;
21
- e1?: number;
22
- }
23
- /**
24
- * Map base10 int colors to hex color strings
25
- * @param colors color map
26
- */
27
- declare const mapToHex: (colors: ProfileRawColors) => RawColors;
28
- /**
29
- * Find an item by Item#uniqueName
30
- * @param name string with which to query
31
- * @param locale locale to use for internationalization
32
- * @returns {Item}
33
- */
34
- declare const find: (name: string, locale?: string) => any;
35
- declare const numberToLetter: (num: number) => string;
36
- //#endregion
37
- export { mapToHex as a, find as i, RawDate as n, numberToLetter as o, RawId as r, ProfileRawColors as t };
@@ -1,32 +0,0 @@
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
32
- export { Weapon as n, RawWeapon as t };
@@ -1,64 +0,0 @@
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
- };
62
-
63
- //#endregion
64
- export { Weapon as t };
@@ -1,34 +0,0 @@
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
34
- export { XpInfo as n, RawXpItem as t };
@@ -1,35 +0,0 @@
1
- import { t as find } from "./Utils-Bqm2Gg1K.mjs";
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
35
- export { XpInfo as t };