warframe-worldstate-parser 4.4.1 → 4.5.1

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/WorldState.js CHANGED
@@ -368,15 +368,26 @@ export class WorldState {
368
368
 
369
369
  this.kinepage = new Kinepage(tmp.pgr, deps.locale);
370
370
 
371
- const key = Object.keys(tmp).find((k) => k.startsWith('lqo'));
372
- if (key) {
371
+ const lqo = Object.keys(tmp).find((k) => k.startsWith('lqo'));
372
+ if (lqo) {
373
373
  const { activation, expiry } = this.nightwave.activeChallenges.filter((c) => !c.isDaily)[0];
374
374
 
375
375
  /**
376
376
  * The current Deep Archimedea missions and modifiers
377
377
  * @type {DeepArchimedea}
378
378
  */
379
- this.deepArchimedea = new DeepArchimedea(activation, expiry, tmp[key]);
379
+ this.deepArchimedea = new DeepArchimedea(activation, expiry, tmp[lqo]);
380
+ }
381
+
382
+ const hqo = Object.keys(tmp).find((k) => k.startsWith('hqo'));
383
+ if (hqo) {
384
+ const { activation, expiry } = this.nightwave.activeChallenges.filter((c) => !c.isDaily)[0];
385
+
386
+ /**
387
+ * The current Temporal Archimedea missions and modifiers
388
+ * @type {DeepArchimedea}
389
+ */
390
+ this.temporalArchimedea = new DeepArchimedea(activation, expiry, tmp[hqo]);
380
391
  }
381
392
 
382
393
  this.calendar = parseArray(Calendar, data.KnownCalendarSeasons, deps);
@@ -61,7 +61,8 @@ const hash = (str) => createHash('sha256').update(str, 'utf8').digest('hex');
61
61
  const parse = (data, locale) => {
62
62
  const parsed = { kuva: [], arbitration: {} };
63
63
  const now = new Date();
64
- data.forEach((mission) => {
64
+ if (!data) return undefined;
65
+ data?.forEach?.((mission) => {
65
66
  const p = {
66
67
  activation: new Date(mission.start),
67
68
  expiry: new Date(mission.end),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "warframe-worldstate-parser",
3
- "version": "4.4.1",
3
+ "version": "4.5.1",
4
4
  "description": "An Open parser for Warframe's Worldstate in Javascript",
5
5
  "keywords": [
6
6
  "warframe-worldstate",
@@ -154,6 +154,11 @@ export class WorldState {
154
154
  * @type {DeepArchimedea}
155
155
  */
156
156
  deepArchimedea: DeepArchimedea;
157
+ /**
158
+ * The current Temporal Archimedea missions and modifiers
159
+ * @type {DeepArchimedea}
160
+ */
161
+ temporalArchimedea: DeepArchimedea;
157
162
  calendar: WorldstateObject[];
158
163
  }
159
164
  declare function _default(json: any, deps: any): Promise<WorldState>;