warframe-worldstate-parser 2.26.0 → 2.26.2
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/lib/CambionCycle.js +5 -3
- package/lib/Fissure.js +4 -2
- package/lib/NightwaveChallenge.js +1 -1
- package/lib/WorldState.js +4 -3
- package/lib/ZarimanCycle.js +4 -2
- package/package.json +1 -1
- package/types/lib/CambionCycle.d.ts +6 -1
- package/types/lib/Fissure.d.ts +4 -0
- package/types/lib/WorldState.d.ts +6 -2
- package/types/lib/ZarimanCycle.d.ts +4 -0
- package/types/main.d.ts +1 -1
package/lib/CambionCycle.js
CHANGED
|
@@ -7,7 +7,7 @@ const WorldstateObject = require('./WorldstateObject');
|
|
|
7
7
|
* @extends {WorldstateObject}
|
|
8
8
|
* @property {string} timeLeft time rendering of amount of time left
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
class CambionCycle extends WorldstateObject {
|
|
11
11
|
/**
|
|
12
12
|
* @param {CetusCycle} cetusCycle Match data from cetus cycle for data
|
|
13
13
|
* @param {Object} deps The dependencies object
|
|
@@ -25,10 +25,12 @@ module.exports = class CambionCycle extends WorldstateObject {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
|
-
* Get whether
|
|
28
|
+
* Get whether the event has expired
|
|
29
29
|
* @returns {boolean}
|
|
30
30
|
*/
|
|
31
31
|
getExpired() {
|
|
32
32
|
return this.timeDate.fromNow(this.expiry) < 0;
|
|
33
33
|
}
|
|
34
|
-
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
module.exports = CambionCycle;
|
package/lib/Fissure.js
CHANGED
|
@@ -6,7 +6,7 @@ const WorldstateObject = require('./WorldstateObject');
|
|
|
6
6
|
* Represents a fissure mission
|
|
7
7
|
* @extends {WorldstateObject}
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
class Fissure extends WorldstateObject {
|
|
10
10
|
/**
|
|
11
11
|
* @param {Object} data The fissure data
|
|
12
12
|
* @param {Object} deps The dependencies object
|
|
@@ -137,4 +137,6 @@ module.exports = class Fissure extends WorldstateObject {
|
|
|
137
137
|
toString() {
|
|
138
138
|
return `[${this.getETAString()}] ${this.tier} fissure at ${this.node} - ${this.enemy} ${this.missionType}`;
|
|
139
139
|
}
|
|
140
|
-
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
module.exports = Fissure;
|
package/lib/WorldState.js
CHANGED
|
@@ -34,6 +34,7 @@ const Kuva = require('./Kuva');
|
|
|
34
34
|
const SentientOutpost = require('./SentientOutpost');
|
|
35
35
|
const CambionCycle = require('./CambionCycle');
|
|
36
36
|
const SteelPathOffering = require('./SteelPathOffering');
|
|
37
|
+
const Dependency = require('./supporting/Dependency'); // eslint-disable-line no-unused-vars
|
|
37
38
|
|
|
38
39
|
// needed for type declarations
|
|
39
40
|
const MarkdownSettings = require('./supporting/MarkdownSettings');
|
|
@@ -79,8 +80,8 @@ const defaultDeps = {
|
|
|
79
80
|
* @param {Object} ParserClass class for parsing data
|
|
80
81
|
* @param {Array<BaseContentObject>} dataArray array of raw data
|
|
81
82
|
* @param {Dependency} deps shared dependency object
|
|
82
|
-
* @param {*} uniqueField field to treat as unique
|
|
83
|
-
* @returns {WorldstateObject}
|
|
83
|
+
* @param {*} [uniqueField] field to treat as unique
|
|
84
|
+
* @returns {WorldstateObject[]}
|
|
84
85
|
*/
|
|
85
86
|
function parseArray(ParserClass, dataArray, deps, uniqueField) {
|
|
86
87
|
const arr = (dataArray || []).map((d) => new ParserClass(d, deps));
|
|
@@ -164,7 +165,7 @@ module.exports = class WorldState {
|
|
|
164
165
|
|
|
165
166
|
/**
|
|
166
167
|
* The current fissures: 'ActiveMissions' & 'VoidStorms'
|
|
167
|
-
* @type {Array.<
|
|
168
|
+
* @type {Array.<Fissure>}
|
|
168
169
|
*/
|
|
169
170
|
this.fissures = parseArray(deps.Fissure, data.ActiveMissions, deps).concat(
|
|
170
171
|
parseArray(deps.Fissure, data.VoidStorms, deps)
|
package/lib/ZarimanCycle.js
CHANGED
|
@@ -13,7 +13,7 @@ const stateMaximum = 9000000;
|
|
|
13
13
|
* Represents the current Zariman Corpus/Grineer Cycle
|
|
14
14
|
* @extends {WorldstateObject}
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
class ZarimanCycle extends WorldstateObject {
|
|
17
17
|
/**
|
|
18
18
|
* @param {Date} bountiesEndDate The current zariman cycle expiry
|
|
19
19
|
* @param {Object} deps The dependencies object
|
|
@@ -138,4 +138,6 @@ module.exports = class ZarimanCycle extends WorldstateObject {
|
|
|
138
138
|
|
|
139
139
|
return lines.join(this.mdConfig.lineEnd);
|
|
140
140
|
}
|
|
141
|
-
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
module.exports = ZarimanCycle;
|
package/package.json
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export = CambionCycle;
|
|
2
|
+
/**
|
|
3
|
+
* Represents the current Cambion Drift Fass/Vome Cycle
|
|
4
|
+
* @extends {WorldstateObject}
|
|
5
|
+
* @property {string} timeLeft time rendering of amount of time left
|
|
6
|
+
*/
|
|
2
7
|
declare class CambionCycle extends WorldstateObject {
|
|
3
8
|
/**
|
|
4
9
|
* @param {CetusCycle} cetusCycle Match data from cetus cycle for data
|
|
@@ -12,7 +17,7 @@ declare class CambionCycle extends WorldstateObject {
|
|
|
12
17
|
active: string;
|
|
13
18
|
id: string;
|
|
14
19
|
/**
|
|
15
|
-
* Get whether
|
|
20
|
+
* Get whether the event has expired
|
|
16
21
|
* @returns {boolean}
|
|
17
22
|
*/
|
|
18
23
|
getExpired(): boolean;
|
package/types/lib/Fissure.d.ts
CHANGED
|
@@ -33,9 +33,9 @@ declare class WorldState {
|
|
|
33
33
|
syndicateMissions: Array<SyndicateMission>;
|
|
34
34
|
/**
|
|
35
35
|
* The current fissures: 'ActiveMissions' & 'VoidStorms'
|
|
36
|
-
* @type {Array.<
|
|
36
|
+
* @type {Array.<Fissure>}
|
|
37
37
|
*/
|
|
38
|
-
fissures: Array<
|
|
38
|
+
fissures: Array<Fissure>;
|
|
39
39
|
/**
|
|
40
40
|
* The current global upgrades
|
|
41
41
|
* @type {Array.<GlobalUpgrade>}
|
|
@@ -132,6 +132,7 @@ import News = require("./News");
|
|
|
132
132
|
import WorldEvent = require("./WorldEvent");
|
|
133
133
|
import Alert = require("./Alert");
|
|
134
134
|
import SyndicateMission = require("./SyndicateMission");
|
|
135
|
+
import Fissure = require("./Fissure");
|
|
135
136
|
import GlobalUpgrade = require("./GlobalUpgrade");
|
|
136
137
|
import FlashSale = require("./FlashSale");
|
|
137
138
|
import Invasion = require("./Invasion");
|
|
@@ -142,9 +143,12 @@ import ConclaveChallenge = require("./ConclaveChallenge");
|
|
|
142
143
|
import PersistentEnemy = require("./PersistentEnemy");
|
|
143
144
|
import EarthCycle = require("./EarthCycle");
|
|
144
145
|
import CetusCycle = require("./CetusCycle");
|
|
146
|
+
import CambionCycle = require("./CambionCycle");
|
|
147
|
+
import ZarimanCycle = require("./ZarimanCycle");
|
|
145
148
|
import WeeklyChallenge = require("./WeeklyChallenge");
|
|
146
149
|
import ConstructionProgress = require("./ConstructionProgress");
|
|
147
150
|
import VallisCycle = require("./VallisCycle");
|
|
148
151
|
import Nightwave = require("./Nightwave");
|
|
149
152
|
import SentientOutpost = require("./SentientOutpost");
|
|
150
153
|
import SteelPathOffering = require("./SteelPathOffering");
|
|
154
|
+
import Dependency = require("./supporting/Dependency");
|
package/types/main.d.ts
CHANGED