@wfcd/profile-parser 2.0.11 → 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 (83) 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 -6
  12. package/dist/LoadOutInventory.mjs +50 -7
  13. package/dist/LoadOutItem.d.mts +119 -4
  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 +10 -14
  24. package/dist/Profile.mjs +7 -13
  25. package/dist/ProfileParser.d.mts +5 -11
  26. package/dist/ProfileParser.mjs +2 -13
  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 +7 -7
  36. package/dist/Stats.mjs +7 -7
  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 +8 -9
  46. package/dist/Ability-CmHyNfw4.d.mts +0 -19
  47. package/dist/Ability-DsyqxzjP.mjs +0 -25
  48. package/dist/ChallengeProgress-BO8tPybG.d.mts +0 -20
  49. package/dist/ChallengeProgress-Cpks92At.mjs +0 -26
  50. package/dist/Enemy-5RVVfZme.d.mts +0 -44
  51. package/dist/Enemy-B3JSksZZ.mjs +0 -44
  52. package/dist/Intrinsics-DwonOlUE.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-DxhXby04.d.mts +0 -51
  56. package/dist/LoadOutInventory-B84bUV2-.d.mts +0 -53
  57. package/dist/LoadOutInventory-BbaIazHX.mjs +0 -52
  58. package/dist/LoadOutItem-DWQ4aFI_.d.mts +0 -120
  59. package/dist/LoadOutItem-p-f5RdTB.mjs +0 -127
  60. package/dist/LoadOutPreset-CwbK2VvR.mjs +0 -83
  61. package/dist/LoadOutPreset-m_1RVkf9.d.mts +0 -83
  62. package/dist/Mission-CeX2BRp0.d.mts +0 -53
  63. package/dist/Mission-DfGQMV7B.mjs +0 -55
  64. package/dist/OperatorLoadOuts-51DN5Rwo.d.mts +0 -75
  65. package/dist/OperatorLoadOuts-LYGpTHuj.mjs +0 -76
  66. package/dist/Polarity-KCoYUO6f.d.mts +0 -26
  67. package/dist/Polarity-Q2JfovbR.mjs +0 -28
  68. package/dist/Pvp-DCfleh26.mjs +0 -36
  69. package/dist/Pvp-R4iYmiAT.d.mts +0 -36
  70. package/dist/Race-DXOXL9VT.d.mts +0 -32
  71. package/dist/Race-dyrF8Zs5.mjs +0 -35
  72. package/dist/Scan-CJnYpzKb.d.mts +0 -27
  73. package/dist/Scan-D4p43-1c.mjs +0 -27
  74. package/dist/Skin-DJMr6L-X.d.mts +0 -28
  75. package/dist/Skin-D_brWp2g.mjs +0 -36
  76. package/dist/Syndicate-CcRnzmZs.mjs +0 -33
  77. package/dist/Syndicate-Dq5vLEB-.d.mts +0 -33
  78. package/dist/Utils-Bqm2Gg1K.mjs +0 -59
  79. package/dist/Utils-VTFhFHIp.d.mts +0 -37
  80. package/dist/Weapon-CsKff27X.mjs +0 -64
  81. package/dist/Weapon-DgQ4hNgE.d.mts +0 -32
  82. package/dist/XpInfo-IT6LOTzI.mjs +0 -35
  83. package/dist/XpInfo-qplT5008.d.mts +0 -34
@@ -1,28 +0,0 @@
1
- import { translatePolarity } from "warframe-worldstate-data/utilities";
2
-
3
- //#region src/Polarity.ts
4
- /**
5
- * A polarity in a LoadOutItem
6
- * @module
7
- */
8
- var Polarity = class {
9
- /**
10
- * Polarity name
11
- */
12
- polarity;
13
- /**
14
- * Polarized slot
15
- */
16
- slot;
17
- /**
18
- *
19
- * @param {Object} raw The polarity to parse
20
- */
21
- constructor(raw) {
22
- this.polarity = translatePolarity(raw.Value);
23
- this.slot = raw.Slot;
24
- }
25
- };
26
-
27
- //#endregion
28
- export { Polarity as t };
@@ -1,36 +0,0 @@
1
- //#region src/Pvp.ts
2
- /**
3
- * Player's conclave stats
4
- * @module
5
- */
6
- var Pvp = class {
7
- /**
8
- * PVP match unique name
9
- */
10
- uniqueName;
11
- /**
12
- * Deaths for this match
13
- */
14
- warframeDeaths;
15
- /**
16
- * Warframe kills
17
- */
18
- warframeKills;
19
- /**
20
- * Weapon killes
21
- */
22
- weaponKills;
23
- /**
24
- *
25
- * @param {Object} pvp PVP data to parse
26
- */
27
- constructor(pvp) {
28
- this.uniqueName = pvp.type;
29
- this.warframeDeaths = pvp.suitDeaths;
30
- this.warframeKills = pvp.suitKills;
31
- this.weaponKills = pvp.weaponKills;
32
- }
33
- };
34
-
35
- //#endregion
36
- export { Pvp as t };
@@ -1,36 +0,0 @@
1
- //#region src/Pvp.d.ts
2
- interface RawPvp {
3
- type: string;
4
- suitDeaths?: number;
5
- suitKills?: number;
6
- weaponKills?: number;
7
- }
8
- /**
9
- * Player's conclave stats
10
- * @module
11
- */
12
- declare class Pvp {
13
- /**
14
- * PVP match unique name
15
- */
16
- uniqueName: string;
17
- /**
18
- * Deaths for this match
19
- */
20
- warframeDeaths?: number;
21
- /**
22
- * Warframe kills
23
- */
24
- warframeKills?: number;
25
- /**
26
- * Weapon killes
27
- */
28
- weaponKills?: number;
29
- /**
30
- *
31
- * @param {Object} pvp PVP data to parse
32
- */
33
- constructor(pvp: RawPvp);
34
- }
35
- //#endregion
36
- export { RawPvp as n, Pvp as t };
@@ -1,32 +0,0 @@
1
- //#region src/Race.d.ts
2
- type RawRace = Record<string, {
3
- highScore: number;
4
- }>;
5
- /**
6
- * Represents a k-drive race
7
- * @module
8
- */
9
- declare class Race {
10
- /**
11
- * Race name
12
- */
13
- uniqueName: string;
14
- /**
15
- * Race High score
16
- */
17
- highScore: number;
18
- /**
19
- *
20
- * @param type Race name
21
- * @param highScore high score
22
- */
23
- constructor(type: string, highScore: number);
24
- /**
25
- * Created an array of Race objects from DE's Races array
26
- * @param races Array of races
27
- * @returns {Race[]} An array of races formatted in a more consumable way.
28
- */
29
- static fromRaceObject(races: RawRace): Race[];
30
- }
31
- //#endregion
32
- export { RawRace as n, Race as t };
@@ -1,35 +0,0 @@
1
- //#region src/Race.ts
2
- /**
3
- * Represents a k-drive race
4
- * @module
5
- */
6
- var Race = class Race {
7
- /**
8
- * Race name
9
- */
10
- uniqueName;
11
- /**
12
- * Race High score
13
- */
14
- highScore;
15
- /**
16
- *
17
- * @param type Race name
18
- * @param highScore high score
19
- */
20
- constructor(type, highScore) {
21
- this.uniqueName = type;
22
- this.highScore = highScore;
23
- }
24
- /**
25
- * Created an array of Race objects from DE's Races array
26
- * @param races Array of races
27
- * @returns {Race[]} An array of races formatted in a more consumable way.
28
- */
29
- static fromRaceObject(races) {
30
- return Object.entries(races ?? {}).map(([type, { highScore }]) => new Race(type, highScore));
31
- }
32
- };
33
-
34
- //#endregion
35
- export { Race as t };
@@ -1,27 +0,0 @@
1
- //#region src/Scan.d.ts
2
- interface RawScan {
3
- type: string;
4
- scans: number;
5
- }
6
- /**
7
- * Represents an enemy scanned to the codex
8
- * @module
9
- */
10
- declare class Scan {
11
- /**
12
- * Enemy unique name
13
- * @type {String}
14
- */
15
- uniqueName: string;
16
- /**
17
- * Number of scans done
18
- * @type {number}
19
- */
20
- scans: number;
21
- /**
22
- * @param {Object} scan The scanned Warframe object
23
- */
24
- constructor(scan: RawScan);
25
- }
26
- //#endregion
27
- export { Scan as n, RawScan as t };
@@ -1,27 +0,0 @@
1
- //#region src/Scan.ts
2
- /**
3
- * Represents an enemy scanned to the codex
4
- * @module
5
- */
6
- var Scan = class {
7
- /**
8
- * Enemy unique name
9
- * @type {String}
10
- */
11
- uniqueName;
12
- /**
13
- * Number of scans done
14
- * @type {number}
15
- */
16
- scans;
17
- /**
18
- * @param {Object} scan The scanned Warframe object
19
- */
20
- constructor(scan) {
21
- this.uniqueName = scan.type;
22
- this.scans = scan.scans;
23
- }
24
- };
25
-
26
- //#endregion
27
- export { Scan as t };
@@ -1,28 +0,0 @@
1
- import { Item } from "@wfcd/items";
2
-
3
- //#region src/Skin.d.ts
4
- interface RawSkin {
5
- ItemType: string;
6
- }
7
- /**
8
- * A skin class
9
- * @module
10
- */
11
- declare class Skin {
12
- uniqueName: string;
13
- item?: Item;
14
- /**
15
- *
16
- * @param skin The skin data to parse
17
- * @param locale The locale to return skin item in
18
- */
19
- constructor(skin: RawSkin, locale?: string);
20
- }
21
- /**
22
- * @deprecated Move to Skin, this is just here to not break anything for early users
23
- * @param {Object} skin Skin object
24
- * @returns {Skin} Skin object with possible item
25
- */
26
- declare const WeaponSkin: (skin: RawSkin) => Skin;
27
- //#endregion
28
- export { Skin as n, WeaponSkin as r, RawSkin as t };
@@ -1,36 +0,0 @@
1
- import { t as find } from "./Utils-Bqm2Gg1K.mjs";
2
-
3
- //#region src/Skin.ts
4
- /**
5
- * A skin class
6
- * @module
7
- */
8
- var Skin = class {
9
- uniqueName;
10
- item;
11
- /**
12
- *
13
- * @param skin The skin data to parse
14
- * @param locale The locale to return skin item in
15
- */
16
- constructor(skin, locale = "en") {
17
- /**
18
- * Unique name
19
- */
20
- this.uniqueName = skin.ItemType;
21
- const item = find(skin.ItemType, locale);
22
- /**
23
- * The Warframe item that matches the unique name
24
- */
25
- if (item) this.item = item;
26
- }
27
- };
28
- /**
29
- * @deprecated Move to Skin, this is just here to not break anything for early users
30
- * @param {Object} skin Skin object
31
- * @returns {Skin} Skin object with possible item
32
- */
33
- const WeaponSkin = (skin) => new Skin(skin);
34
-
35
- //#endregion
36
- export { WeaponSkin as n, Skin as t };
@@ -1,33 +0,0 @@
1
- import { syndicate } from "warframe-worldstate-data/utilities";
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
33
- export { Syndicate as t };
@@ -1,33 +0,0 @@
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
33
- export { Syndicate as n, RawAffiliation as t };
@@ -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,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,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,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 };
@@ -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 };