warframe-worldstate-parser 5.0.3 → 5.0.4

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.
@@ -13,6 +13,10 @@ var Alert = class extends WorldstateObject {
13
13
  */
14
14
  mission;
15
15
  /**
16
+ * An array containing the types of all of the alert's rewards
17
+ */
18
+ rewardTypes;
19
+ /**
16
20
  * A tag that DE occasionally provides, such as `LotusGift`
17
21
  */
18
22
  tag;
@@ -20,6 +24,7 @@ var Alert = class extends WorldstateObject {
20
24
  super(data);
21
25
  const deps = { locale };
22
26
  this.mission = new Mission(data.MissionInfo, deps);
27
+ this.rewardTypes = this.reward?.getTypes()?.length ? this.reward.getTypes() : ["credits"];
23
28
  this.tag = data.Tag || void 0;
24
29
  }
25
30
  /**
@@ -40,12 +45,6 @@ var Alert = class extends WorldstateObject {
40
45
  get eta() {
41
46
  return timeDeltaToString(fromNow(this.expiry));
42
47
  }
43
- /**
44
- * An array containing the types of all of the alert's rewards
45
- */
46
- get rewardTypes() {
47
- return this.reward?.getTypes()?.length ? this.reward.getTypes() : ["credits"];
48
- }
49
48
  };
50
49
 
51
50
  //#endregion
@@ -17,6 +17,10 @@ declare class Alert extends WorldstateObject {
17
17
  * The mission that the players have to complete
18
18
  */
19
19
  mission: Mission;
20
+ /**
21
+ * An array containing the types of all of the alert's rewards
22
+ */
23
+ rewardTypes: string[];
20
24
  /**
21
25
  * A tag that DE occasionally provides, such as `LotusGift`
22
26
  */
@@ -36,10 +40,6 @@ declare class Alert extends WorldstateObject {
36
40
  * How much time is left before the alert expires
37
41
  */
38
42
  get eta(): string;
39
- /**
40
- * An array containing the types of all of the alert's rewards
41
- */
42
- get rewardTypes(): string[] | undefined;
43
43
  }
44
44
  //#endregion
45
45
  export { Alert, RawAlert };
@@ -83,6 +83,10 @@ declare class Invasion extends WorldstateObject {
83
83
  * Whether the invasion has finished
84
84
  */
85
85
  completed: boolean;
86
+ /**
87
+ * An array containing the types of all of the invasions's rewards
88
+ */
89
+ rewardTypes: string[];
86
90
  /**
87
91
  * @param {object} data The invasion data
88
92
  * @param {Dependency} deps The dependencies object
@@ -100,10 +104,6 @@ declare class Invasion extends WorldstateObject {
100
104
  * ETA string (at time of object creation)
101
105
  */
102
106
  get eta(): string;
103
- /**
104
- * An array containing the types of all of the invasions's rewards
105
- */
106
- get rewardTypes(): string[];
107
107
  /**
108
108
  * Get an estimation of how much time is left before the invasion ends in milliseconds
109
109
  */
@@ -50,6 +50,10 @@ var Invasion = class extends WorldstateObject {
50
50
  */
51
51
  completed;
52
52
  /**
53
+ * An array containing the types of all of the invasions's rewards
54
+ */
55
+ rewardTypes;
56
+ /**
53
57
  * @param {object} data The invasion data
54
58
  * @param {Dependency} deps The dependencies object
55
59
  * @param {string} deps.locale Locale to use for translations
@@ -75,6 +79,7 @@ var Invasion = class extends WorldstateObject {
75
79
  this.requiredRuns = data.Goal;
76
80
  this.completion = (1 + data.Count / data.Goal) * (this.vsInfestation ? 100 : 50);
77
81
  this.completed = data.Completed;
82
+ this.rewardTypes = [...this.attacker.reward?.getTypes() ?? [], ...this.defender.reward?.getTypes() ?? []];
78
83
  }
79
84
  /**
80
85
  * Whether or not the attackers are winning.
@@ -90,12 +95,6 @@ var Invasion = class extends WorldstateObject {
90
95
  return timeDeltaToString(this.getRemainingTime());
91
96
  }
92
97
  /**
93
- * An array containing the types of all of the invasions's rewards
94
- */
95
- get rewardTypes() {
96
- return [...this.attacker.reward?.getTypes() ?? [], ...this.defender.reward?.getTypes() ?? []];
97
- }
98
- /**
99
98
  * Get an estimation of how much time is left before the invasion ends in milliseconds
100
99
  */
101
100
  getRemainingTime() {
@@ -1,4 +1,4 @@
1
- import { Alert } from "./Alert-DH1kglDU.js";
1
+ import { Alert } from "./Alert-CXEOqvgh.js";
2
2
  import { Calendar } from "./Calendar-CtzZQXj7.js";
3
3
  import { CambionCycle } from "./CambionCycle-C6NHUjOU.js";
4
4
  import { CetusCycle } from "./CetusCycle-DIZdevob.js";
@@ -11,7 +11,7 @@ import { EarthCycle } from "./EarthCycle-B9aIOAEY.js";
11
11
  import { Fissure } from "./Fissure-7yFmOet3.js";
12
12
  import { FlashSale } from "./FlashSale-BxVI0J6A.js";
13
13
  import { GlobalUpgrade } from "./GlobalUpgrade-B_TKK1m_.js";
14
- import { Invasion } from "./Invasion-BMic1K12.js";
14
+ import { Invasion } from "./Invasion-uloHTxoW.js";
15
15
  import { Kuva } from "./Kuva-DqkxvPUg.js";
16
16
  import { MidrathCycle } from "./MidrathCycle-DDfT7zVx.js";
17
17
  import { News } from "./News-7F8Nbp4A.js";
@@ -3,7 +3,7 @@ import { Kinepage } from "./Kinepage-CRRKVulq.js";
3
3
  import { Dependency } from "./Dependency-DkOHLql6.js";
4
4
  import { SentientOutpost } from "./SentientOutpost-DmlClvel.js";
5
5
  import { BaseContentObject, WorldstateObject } from "./WorldstateObject-wfRTeGpm.js";
6
- import { Alert, RawAlert } from "./Alert-BS8PWPP3.js";
6
+ import { Alert, RawAlert } from "./Alert-JQT9Y8z0.js";
7
7
  import { Calendar, RawCalender } from "./Calendar-CgEkm6e6.js";
8
8
  import { CetusCycle } from "./CetusCycle-ooMM7hkg.js";
9
9
  import { CambionCycle } from "./CambionCycle-uEBpbMim.js";
@@ -17,7 +17,7 @@ import { EarthCycle } from "./EarthCycle-RELuZL01.js";
17
17
  import { Fissure, RawFissure } from "./Fissure-Bj61i8dc.js";
18
18
  import { FlashSale, RawFlashSale } from "./FlashSale-PDG4uQq4.js";
19
19
  import { GlobalUpgrade, RawGlobalUpgrade } from "./GlobalUpgrade-BRQXf3JM.js";
20
- import { Invasion, RawInvasion } from "./Invasion-BskF60zh.js";
20
+ import { Invasion, RawInvasion } from "./Invasion-izHXvygb.js";
21
21
  import { MidrathCycle } from "./MidrathCycle-BfQtfG4p.js";
22
22
  import { News, RawNews } from "./News-BfAgbYSY.js";
23
23
  import { Nightwave, RawNightwave } from "./Nightwave-_0RzWikV.js";
@@ -7,7 +7,7 @@ import "../RewardTypes-DYaUn77A.js";
7
7
  import "../Reward-5VIpHu9A.js";
8
8
  import "../Mission-CWE16ouO.js";
9
9
  import "../WorldstateObject-wfRTeGpm.js";
10
- import "../Alert-BS8PWPP3.js";
10
+ import "../Alert-JQT9Y8z0.js";
11
11
  import "../Calendar-CgEkm6e6.js";
12
12
  import "../CetusCycle-ooMM7hkg.js";
13
13
  import "../CambionCycle-uEBpbMim.js";
@@ -22,7 +22,7 @@ import "../EarthCycle-RELuZL01.js";
22
22
  import "../Fissure-Bj61i8dc.js";
23
23
  import "../FlashSale-PDG4uQq4.js";
24
24
  import "../GlobalUpgrade-BRQXf3JM.js";
25
- import "../Invasion-BskF60zh.js";
25
+ import "../Invasion-izHXvygb.js";
26
26
  import "../MidrathCycle-BfQtfG4p.js";
27
27
  import "../News-BfAgbYSY.js";
28
28
  import "../NightwaveChallenge-DDdrqvge.js";
@@ -43,5 +43,5 @@ import "../WeeklyChallenge-C6sc4j7i.js";
43
43
  import "../WorldEvent-BS9QHG_f.js";
44
44
  import "../ZarimanCycle-CjNQXhVO.js";
45
45
  import "../ExternalMission-DCzJkPC8.js";
46
- import { InitialWorldState, WorldState, _default, parseArray, parseAsyncArray } from "../WorldState-DNSPrZR_.js";
46
+ import { InitialWorldState, WorldState, _default, parseArray, parseAsyncArray } from "../WorldState-CXGqeqpS.js";
47
47
  export { InitialWorldState, WorldState, _default as default, parseArray, parseAsyncArray };
@@ -4,7 +4,7 @@ import "../RewardTypes-Cfq9FeIl.js";
4
4
  import "../Reward-OauJ45jJ.js";
5
5
  import "../Mission-ZuSsAYNm.js";
6
6
  import "../WorldstateObject-BSTYuZwm.js";
7
- import "../Alert-DH1kglDU.js";
7
+ import "../Alert-CXEOqvgh.js";
8
8
  import "../Calendar-CtzZQXj7.js";
9
9
  import "../CambionCycle-C6NHUjOU.js";
10
10
  import "../CetusCycle-DIZdevob.js";
@@ -18,7 +18,7 @@ import "../EarthCycle-B9aIOAEY.js";
18
18
  import "../Fissure-7yFmOet3.js";
19
19
  import "../FlashSale-BxVI0J6A.js";
20
20
  import "../GlobalUpgrade-B_TKK1m_.js";
21
- import "../Invasion-BMic1K12.js";
21
+ import "../Invasion-uloHTxoW.js";
22
22
  import "../Kuva-DqkxvPUg.js";
23
23
  import "../MidrathCycle-DDfT7zVx.js";
24
24
  import "../News-7F8Nbp4A.js";
@@ -44,6 +44,6 @@ import "../Archidemea-C0EMRUKc.js";
44
44
  import "../Kinepage-iWFwTZtr.js";
45
45
  import "../SentientOutpost-B2KZUJ7H.js";
46
46
  import "../Tmp-DkQq1arD.js";
47
- import { WorldState, WorldState_default, parseArray, parseAsyncArray } from "../WorldState-uppX0Xt1.js";
47
+ import { WorldState, WorldState_default, parseArray, parseAsyncArray } from "../WorldState-BHxcC8Lb.js";
48
48
 
49
49
  export { WorldState, WorldState_default as default, parseArray, parseAsyncArray };
@@ -4,5 +4,5 @@ import "../../RewardTypes-DYaUn77A.js";
4
4
  import "../../Reward-5VIpHu9A.js";
5
5
  import "../../Mission-CWE16ouO.js";
6
6
  import "../../WorldstateObject-wfRTeGpm.js";
7
- import { Alert, RawAlert } from "../../Alert-BS8PWPP3.js";
7
+ import { Alert, RawAlert } from "../../Alert-JQT9Y8z0.js";
8
8
  export { RawAlert, Alert as default };
@@ -4,6 +4,6 @@ import "../../RewardTypes-Cfq9FeIl.js";
4
4
  import "../../Reward-OauJ45jJ.js";
5
5
  import "../../Mission-ZuSsAYNm.js";
6
6
  import "../../WorldstateObject-BSTYuZwm.js";
7
- import { Alert } from "../../Alert-DH1kglDU.js";
7
+ import { Alert } from "../../Alert-CXEOqvgh.js";
8
8
 
9
9
  export { Alert as default };
@@ -3,5 +3,5 @@ import "../../Dependency-DkOHLql6.js";
3
3
  import "../../RewardTypes-DYaUn77A.js";
4
4
  import "../../Reward-5VIpHu9A.js";
5
5
  import "../../WorldstateObject-wfRTeGpm.js";
6
- import { Invasion, RawInvasion } from "../../Invasion-BskF60zh.js";
6
+ import { Invasion, RawInvasion } from "../../Invasion-izHXvygb.js";
7
7
  export { RawInvasion, Invasion as default };
@@ -3,6 +3,6 @@ import "../../RewardData-qEvfHYxA.js";
3
3
  import "../../RewardTypes-Cfq9FeIl.js";
4
4
  import "../../Reward-OauJ45jJ.js";
5
5
  import "../../WorldstateObject-BSTYuZwm.js";
6
- import { Invasion } from "../../Invasion-BMic1K12.js";
6
+ import { Invasion } from "../../Invasion-uloHTxoW.js";
7
7
 
8
8
  export { Invasion as default };
package/dist/main.d.ts CHANGED
@@ -7,7 +7,7 @@ import "./RewardTypes-DYaUn77A.js";
7
7
  import "./Reward-5VIpHu9A.js";
8
8
  import "./Mission-CWE16ouO.js";
9
9
  import "./WorldstateObject-wfRTeGpm.js";
10
- import "./Alert-BS8PWPP3.js";
10
+ import "./Alert-JQT9Y8z0.js";
11
11
  import "./Calendar-CgEkm6e6.js";
12
12
  import "./CetusCycle-ooMM7hkg.js";
13
13
  import "./CambionCycle-uEBpbMim.js";
@@ -22,7 +22,7 @@ import "./EarthCycle-RELuZL01.js";
22
22
  import "./Fissure-Bj61i8dc.js";
23
23
  import "./FlashSale-PDG4uQq4.js";
24
24
  import "./GlobalUpgrade-BRQXf3JM.js";
25
- import "./Invasion-BskF60zh.js";
25
+ import "./Invasion-izHXvygb.js";
26
26
  import "./MidrathCycle-BfQtfG4p.js";
27
27
  import "./News-BfAgbYSY.js";
28
28
  import "./NightwaveChallenge-DDdrqvge.js";
@@ -43,5 +43,5 @@ import "./WeeklyChallenge-C6sc4j7i.js";
43
43
  import "./WorldEvent-BS9QHG_f.js";
44
44
  import "./ZarimanCycle-CjNQXhVO.js";
45
45
  import "./ExternalMission-DCzJkPC8.js";
46
- import { InitialWorldState, WorldState, parseArray, parseAsyncArray } from "./WorldState-DNSPrZR_.js";
46
+ import { InitialWorldState, WorldState, parseArray, parseAsyncArray } from "./WorldState-CXGqeqpS.js";
47
47
  export { InitialWorldState, WorldState, WorldState as default, parseArray, parseAsyncArray };
package/dist/main.js CHANGED
@@ -4,7 +4,7 @@ import "./RewardTypes-Cfq9FeIl.js";
4
4
  import "./Reward-OauJ45jJ.js";
5
5
  import "./Mission-ZuSsAYNm.js";
6
6
  import "./WorldstateObject-BSTYuZwm.js";
7
- import "./Alert-DH1kglDU.js";
7
+ import "./Alert-CXEOqvgh.js";
8
8
  import "./Calendar-CtzZQXj7.js";
9
9
  import "./CambionCycle-C6NHUjOU.js";
10
10
  import "./CetusCycle-DIZdevob.js";
@@ -18,7 +18,7 @@ import "./EarthCycle-B9aIOAEY.js";
18
18
  import "./Fissure-7yFmOet3.js";
19
19
  import "./FlashSale-BxVI0J6A.js";
20
20
  import "./GlobalUpgrade-B_TKK1m_.js";
21
- import "./Invasion-BMic1K12.js";
21
+ import "./Invasion-uloHTxoW.js";
22
22
  import "./Kuva-DqkxvPUg.js";
23
23
  import "./MidrathCycle-DDfT7zVx.js";
24
24
  import "./News-7F8Nbp4A.js";
@@ -44,7 +44,7 @@ import "./Archidemea-C0EMRUKc.js";
44
44
  import "./Kinepage-iWFwTZtr.js";
45
45
  import "./SentientOutpost-B2KZUJ7H.js";
46
46
  import "./Tmp-DkQq1arD.js";
47
- import { WorldState, parseArray, parseAsyncArray } from "./WorldState-uppX0Xt1.js";
47
+ import { WorldState, parseArray, parseAsyncArray } from "./WorldState-BHxcC8Lb.js";
48
48
 
49
49
  //#region main.ts
50
50
  var main_default = WorldState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warframe-worldstate-parser",
3
- "version": "5.0.3",
3
+ "version": "5.0.4",
4
4
  "description": "An Open parser for Warframe's Worldstate in Javascript",
5
5
  "keywords": [
6
6
  "warframe-worldstate",