warframe-worldstate-parser 5.2.16 → 5.2.17

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 (181) hide show
  1. package/dist/lib/WorldState.d.mts +35 -19
  2. package/dist/lib/WorldState.mjs +31 -45
  3. package/dist/lib/models/Alert.d.mts +45 -17
  4. package/dist/lib/models/Alert.mjs +49 -5
  5. package/dist/lib/models/Archimedea.d.mts +86 -17
  6. package/dist/lib/models/Archimedea.mjs +88 -2
  7. package/dist/lib/models/Calendar.d.mts +77 -2
  8. package/dist/lib/models/Calendar.mjs +79 -2
  9. package/dist/lib/models/CambionCycle.d.mts +21 -3
  10. package/dist/lib/models/CambionCycle.mjs +28 -2
  11. package/dist/lib/models/CetusCycle.d.mts +48 -2
  12. package/dist/lib/models/CetusCycle.mjs +87 -2
  13. package/dist/lib/models/ChallengeInstance.d.mts +53 -17
  14. package/dist/lib/models/ChallengeInstance.mjs +46 -1
  15. package/dist/lib/models/ConclaveChallenge.d.mts +76 -17
  16. package/dist/lib/models/ConclaveChallenge.mjs +77 -2
  17. package/dist/lib/models/ConstructionProgress.d.mts +17 -2
  18. package/dist/lib/models/ConstructionProgress.mjs +23 -2
  19. package/dist/lib/models/DailyDeal.d.mts +66 -17
  20. package/dist/lib/models/DailyDeal.mjs +64 -2
  21. package/dist/lib/models/DarkSector.d.mts +142 -17
  22. package/dist/lib/models/DarkSector.mjs +136 -6
  23. package/dist/lib/models/DarkSectorBattle.d.mts +52 -2
  24. package/dist/lib/models/DarkSectorBattle.mjs +49 -1
  25. package/dist/lib/models/DuviriCycle.d.mts +23 -17
  26. package/dist/lib/models/DuviriCycle.mjs +55 -2
  27. package/dist/lib/models/EarthCycle.d.mts +59 -2
  28. package/dist/lib/models/EarthCycle.mjs +73 -2
  29. package/dist/lib/models/Fissure.d.mts +78 -17
  30. package/dist/lib/models/Fissure.mjs +83 -2
  31. package/dist/lib/models/FlashSale.d.mts +71 -17
  32. package/dist/lib/models/FlashSale.mjs +73 -2
  33. package/dist/lib/models/GlobalUpgrade.d.mts +55 -17
  34. package/dist/lib/models/GlobalUpgrade.mjs +56 -2
  35. package/dist/lib/models/Invasion.d.mts +113 -17
  36. package/dist/lib/models/Invasion.mjs +106 -4
  37. package/dist/lib/models/Kinepage.d.mts +21 -1
  38. package/dist/lib/models/Kinepage.mjs +22 -1
  39. package/dist/lib/models/Kuva.d.mts +20 -17
  40. package/dist/lib/models/Kuva.mjs +85 -1
  41. package/dist/lib/models/MidrathCycle.d.mts +24 -2
  42. package/dist/lib/models/MidrathCycle.mjs +66 -2
  43. package/dist/lib/models/Mission.d.mts +138 -17
  44. package/dist/lib/models/Mission.mjs +138 -3
  45. package/dist/lib/models/News.d.mts +100 -2
  46. package/dist/lib/models/News.mjs +116 -2
  47. package/dist/lib/models/Nightwave.d.mts +58 -3
  48. package/dist/lib/models/Nightwave.mjs +58 -3
  49. package/dist/lib/models/NightwaveChallenge.d.mts +50 -2
  50. package/dist/lib/models/NightwaveChallenge.mjs +51 -2
  51. package/dist/lib/models/PersistentEnemy.d.mts +78 -2
  52. package/dist/lib/models/PersistentEnemy.mjs +74 -2
  53. package/dist/lib/models/Reward.d.mts +67 -17
  54. package/dist/lib/models/Reward.mjs +71 -2
  55. package/dist/lib/models/SentientOutpost.d.mts +46 -17
  56. package/dist/lib/models/SentientOutpost.mjs +63 -1
  57. package/dist/lib/models/Simaris.d.mts +36 -17
  58. package/dist/lib/models/Simaris.mjs +33 -1
  59. package/dist/lib/models/Sortie.d.mts +60 -17
  60. package/dist/lib/models/Sortie.mjs +71 -6
  61. package/dist/lib/models/SortieVariant.d.mts +49 -17
  62. package/dist/lib/models/SortieVariant.mjs +49 -1
  63. package/dist/lib/models/SteelPathOffering.d.mts +36 -1
  64. package/dist/lib/models/SteelPathOffering.mjs +81 -1
  65. package/dist/lib/models/SyndicateJob.d.mts +92 -17
  66. package/dist/lib/models/SyndicateJob.mjs +161 -5
  67. package/dist/lib/models/SyndicateMission.d.mts +58 -17
  68. package/dist/lib/models/SyndicateMission.mjs +64 -6
  69. package/dist/lib/models/Tmp.d.mts +34 -17
  70. package/dist/lib/models/Tmp.mjs +28 -2
  71. package/dist/lib/models/VallisCycle.d.mts +29 -2
  72. package/dist/lib/models/VallisCycle.mjs +72 -2
  73. package/dist/lib/models/VoidTrader.d.mts +76 -17
  74. package/dist/lib/models/VoidTrader.mjs +76 -4
  75. package/dist/lib/models/VoidTraderItem.d.mts +43 -17
  76. package/dist/lib/models/VoidTraderItem.mjs +36 -1
  77. package/dist/lib/models/VoidTraderSchedule.d.mts +16 -17
  78. package/dist/lib/models/VoidTraderSchedule.mjs +12 -1
  79. package/dist/lib/models/WeeklyChallenge.d.mts +19 -17
  80. package/dist/lib/models/WeeklyChallenge.mjs +19 -3
  81. package/dist/lib/models/WorldEvent.d.mts +204 -17
  82. package/dist/lib/models/WorldEvent.mjs +211 -7
  83. package/dist/lib/models/WorldStateObject.d.mts +47 -1
  84. package/dist/lib/models/WorldStateObject.mjs +52 -1
  85. package/dist/lib/models/ZarimanCycle.d.mts +44 -2
  86. package/dist/lib/models/ZarimanCycle.mjs +77 -2
  87. package/dist/lib/models/index.d.mts +42 -18
  88. package/dist/lib/models/index.mjs +42 -45
  89. package/dist/lib/supporting/Dependency.d.mts +40 -1
  90. package/dist/lib/supporting/DuviriChoice.d.mts +18 -17
  91. package/dist/lib/supporting/DuviriChoice.mjs +23 -1
  92. package/dist/lib/supporting/ExternalMission.d.mts +48 -1
  93. package/dist/lib/supporting/FetchProxy.d.mts +9 -1
  94. package/dist/lib/supporting/FetchProxy.mjs +44 -1
  95. package/dist/lib/supporting/ImgCdn.d.mts +5 -1
  96. package/dist/lib/supporting/ImgCdn.mjs +5 -1
  97. package/dist/lib/supporting/KuvaLogEntry.d.mts +20 -1
  98. package/dist/lib/supporting/RewardData.d.mts +10 -1
  99. package/dist/lib/supporting/RewardData.mjs +74 -1
  100. package/dist/lib/supporting/RewardTypes.d.mts +33 -1
  101. package/dist/lib/supporting/RewardTypes.mjs +326 -1
  102. package/dist/lib/supporting/index.d.mts +8 -23
  103. package/dist/lib/supporting/index.mjs +5 -6
  104. package/dist/main.d.mts +52 -24
  105. package/dist/main.mjs +47 -48
  106. package/package.json +1 -1
  107. package/dist/Alert-CPT2sBmd.mjs +0 -51
  108. package/dist/Archimedea-Vo36QE99.mjs +0 -90
  109. package/dist/Calendar-CRM0XhAy.d.mts +0 -78
  110. package/dist/Calendar-_gEQ9BEd.mjs +0 -81
  111. package/dist/CambionCycle-B1pqIgks.mjs +0 -30
  112. package/dist/CambionCycle-OI3v1knd.d.mts +0 -22
  113. package/dist/CetusCycle-Ct51M2pd.mjs +0 -89
  114. package/dist/CetusCycle-DQ4n05vO.d.mts +0 -49
  115. package/dist/ChallengeInstance-BOu_e7ML.mjs +0 -48
  116. package/dist/ConclaveChallenge-BTN6UyV6.mjs +0 -79
  117. package/dist/ConstructionProgress-BoF2P9fx.mjs +0 -25
  118. package/dist/ConstructionProgress-DG2KzS0X.d.mts +0 -18
  119. package/dist/DailyDeal-aoNeCFWT.mjs +0 -66
  120. package/dist/DarkSector-D0uJWCg7.mjs +0 -138
  121. package/dist/DarkSectorBattle-CiSe3kFm.d.mts +0 -53
  122. package/dist/DarkSectorBattle-CqRYeNpe.mjs +0 -51
  123. package/dist/Dependency-BR-dAeHI.mjs +0 -1
  124. package/dist/Dependency-CNqXngHD.d.mts +0 -41
  125. package/dist/DuviriChoice-BEBiWA-g.mjs +0 -25
  126. package/dist/DuviriCycle-Do7mMnoC.mjs +0 -57
  127. package/dist/EarthCycle-BOAlcAuQ.mjs +0 -75
  128. package/dist/EarthCycle-CxtijnVV.d.mts +0 -60
  129. package/dist/ExternalMission-C82w4uMq.d.mts +0 -49
  130. package/dist/ExternalMission-D3MSZgnN.mjs +0 -1
  131. package/dist/FetchProxy-Bkdk15SX.mjs +0 -46
  132. package/dist/FetchProxy-DfSTUgkf.d.mts +0 -10
  133. package/dist/Fissure-diM4hyi3.mjs +0 -85
  134. package/dist/FlashSale-CNfRaZhM.mjs +0 -75
  135. package/dist/GlobalUpgrade-CUtZw05z.mjs +0 -58
  136. package/dist/ImgCdn-BJOdWAbU.mjs +0 -7
  137. package/dist/ImgCdn-D0hSGSB1.d.mts +0 -6
  138. package/dist/Invasion-Corx1lxf.mjs +0 -108
  139. package/dist/Kinepage-B-Ym_VW5.d.mts +0 -22
  140. package/dist/Kinepage-CbSzge67.mjs +0 -24
  141. package/dist/Kuva-Ijy2ZGBL.mjs +0 -87
  142. package/dist/KuvaLogEntry-D_VzIT3W.mjs +0 -1
  143. package/dist/KuvaLogEntry-cftxhjfU.d.mts +0 -21
  144. package/dist/MidrathCycle-E0gMF3AR.d.mts +0 -25
  145. package/dist/MidrathCycle-XD2T8Dx5.mjs +0 -68
  146. package/dist/Mission-b8KP-YDf.mjs +0 -140
  147. package/dist/News-DxEm-q6V.d.mts +0 -101
  148. package/dist/News-zAK-sYRg.mjs +0 -118
  149. package/dist/Nightwave-CPqMSqGK.d.mts +0 -59
  150. package/dist/Nightwave-cTRmlbwH.mjs +0 -60
  151. package/dist/NightwaveChallenge-C8ARG7LC.mjs +0 -53
  152. package/dist/NightwaveChallenge-CG3uychc.d.mts +0 -51
  153. package/dist/PersistentEnemy-3Sw5E8AN.mjs +0 -76
  154. package/dist/PersistentEnemy-DnnnreSz.d.mts +0 -79
  155. package/dist/Reward-3FBJF_hS.mjs +0 -73
  156. package/dist/RewardData-C_9b8Yhi.mjs +0 -76
  157. package/dist/RewardData-DWCgJ3UT.d.mts +0 -11
  158. package/dist/RewardTypes-DUrR7H3G.mjs +0 -328
  159. package/dist/RewardTypes-Y3tHrtIJ.d.mts +0 -34
  160. package/dist/SentientOutpost-Cadk-pIW.mjs +0 -65
  161. package/dist/Simaris-D6etEQp_.mjs +0 -35
  162. package/dist/Sortie-rSBgJc6U.mjs +0 -73
  163. package/dist/SortieVariant-CnuLkkNZ.mjs +0 -51
  164. package/dist/SteelPathOffering--wm-7hwb.mjs +0 -83
  165. package/dist/SteelPathOffering-CQkoKi5T.d.mts +0 -37
  166. package/dist/SyndicateJob-R89tWqvT.mjs +0 -162
  167. package/dist/SyndicateMission-CKZDWNyf.mjs +0 -66
  168. package/dist/Tmp-BYL_mYIG.mjs +0 -30
  169. package/dist/VallisCycle-6DCaWFoR.d.mts +0 -30
  170. package/dist/VallisCycle-BW2g49wB.mjs +0 -74
  171. package/dist/VoidTrader-DtjtVUgR.mjs +0 -78
  172. package/dist/VoidTraderItem-Cz6x1KTF.mjs +0 -38
  173. package/dist/VoidTraderSchedule-BsJLu50V.mjs +0 -14
  174. package/dist/WeeklyChallenge-Dl2ekl6X.mjs +0 -21
  175. package/dist/WorldEvent-C-LaV2ug.mjs +0 -213
  176. package/dist/WorldStateObject-45dbRgp7.mjs +0 -54
  177. package/dist/WorldStateObject-C1HEDkH7.d.mts +0 -48
  178. package/dist/ZarimanCycle-BrSLIWhD.d.mts +0 -45
  179. package/dist/ZarimanCycle-DoAPwgaM.mjs +0 -79
  180. package/dist/index-Bgx8kIDy.d.mts +0 -1671
  181. package/dist/supporting-BLSXhlWM.mjs +0 -1
@@ -1,75 +0,0 @@
1
- import { t as WorldStateObject } from "./WorldStateObject-45dbRgp7.mjs";
2
- import { fromNow, languageString, timeDeltaToString } from "warframe-worldstate-data/utilities";
3
-
4
- //#region lib/models/FlashSale.ts
5
- /**
6
- * Represents a flash sale
7
- */
8
- var FlashSale = class extends WorldStateObject {
9
- /**
10
- * The item being offered in the flash sale
11
- */
12
- item;
13
- /**
14
- * The item's discount percentage
15
- */
16
- discount;
17
- /**
18
- * The item's discounted credit price
19
- */
20
- regularOverride;
21
- /**
22
- * The item's discounted platinum price
23
- */
24
- premiumOverride;
25
- /**
26
- * Whether this item is show in the in-game market
27
- */
28
- isShownInMarket;
29
- /**
30
- * Whether this item is featured in the in-game market
31
- */
32
- isFeatured;
33
- /**
34
- * Whether this item is marked as popular in the in-game market
35
- */
36
- isPopular;
37
- /**
38
- * Unique identifier for this sale built from the end time and reward
39
- */
40
- id;
41
- /**
42
- * @param {object} data The flash sale data
43
- * @param {Dependency} deps The dependencies object
44
- * @param {string} deps.locale Locale to use for translations
45
- */
46
- constructor(data, { locale = "en" } = { locale: "en" }) {
47
- super({
48
- Activation: data.StartDate,
49
- Expiry: data.EndDate
50
- });
51
- this.item = languageString(data.TypeName, locale);
52
- this.discount = data.Discount;
53
- this.regularOverride = data.RegularOverride;
54
- this.premiumOverride = data.PremiumOverride;
55
- this.isShownInMarket = data.ShowInMarket;
56
- this.isFeatured = data.Featured;
57
- this.isPopular = data.Popular;
58
- this.id = `${data.TypeName.split("/").slice(-1)[0]}${this.expiry.getTime()}`;
59
- }
60
- /**
61
- * ETA string (at time of object creation)
62
- */
63
- get eta() {
64
- return timeDeltaToString(fromNow(this.expiry));
65
- }
66
- /**
67
- * Whether or not this is expired (at time of object creation)
68
- */
69
- get expired() {
70
- return fromNow(this.expiry) < 0;
71
- }
72
- };
73
-
74
- //#endregion
75
- export { FlashSale as t };
@@ -1,58 +0,0 @@
1
- import { t as WorldStateObject } from "./WorldStateObject-45dbRgp7.mjs";
2
- import { fromNow, operation, operationSymbol, timeDeltaToString, upgrade } from "warframe-worldstate-data/utilities";
3
-
4
- //#region lib/models/GlobalUpgrade.ts
5
- /**
6
- * Represents an upgrade that applies to all players
7
- */
8
- var GlobalUpgrade = class extends WorldStateObject {
9
- /**
10
- * The effect of the upgrade
11
- */
12
- upgrade;
13
- /**
14
- * The operation type
15
- */
16
- operation;
17
- /**
18
- * Symbol for operation
19
- */
20
- operationSymbol;
21
- /**
22
- * The operation value
23
- */
24
- upgradeOperationValue;
25
- /**
26
- * @param {object} data The global upgrade data
27
- * @param {object} deps The dependencies object
28
- * @param {string} deps.locale Locale to use for translations
29
- */
30
- constructor(data, { locale = "en" } = { locale: "en" }) {
31
- super(data);
32
- this.upgrade = upgrade(data.UpgradeType, locale);
33
- this.operation = operation(data.OperationType, locale);
34
- this.operationSymbol = operationSymbol(data.OperationType, locale);
35
- this.upgradeOperationValue = data.Value;
36
- }
37
- /**
38
- * Plaintext description of upgrade
39
- */
40
- get desc() {
41
- return `${this.upgradeOperationValue}${this.operationSymbol} ${this.upgrade} for ${this.eta}`;
42
- }
43
- /**
44
- * ETA string (at time of object creation)
45
- */
46
- get eta() {
47
- return timeDeltaToString(fromNow(this.expiry));
48
- }
49
- /**
50
- * Whether or not this is expired (at time of object creation)
51
- */
52
- get expired() {
53
- return fromNow(this.expiry) < 0;
54
- }
55
- };
56
-
57
- //#endregion
58
- export { GlobalUpgrade as t };
@@ -1,7 +0,0 @@
1
- //#region lib/supporting/ImgCdn.ts
2
- const cdn = (path) => `https://cdn.warframestat.us/genesis/${path}`;
3
- const wfCdn = (path) => `https://cdn.warframestat.us/img/${path}`;
4
- const deProxy = (url) => url.replace("https://forums.warframe.com/applications/core/interface/imageproxy/imageproxy.php?img=", "").replace(/&key=\w*/gi, "").replace("http://", "https://");
5
-
6
- //#endregion
7
- export { deProxy as n, wfCdn as r, cdn as t };
@@ -1,6 +0,0 @@
1
- //#region lib/supporting/ImgCdn.d.ts
2
- declare const cdn: (path: string) => string;
3
- declare const wfCdn: (path: string) => string;
4
- declare const deProxy: (url: string) => string;
5
- //#endregion
6
- export { deProxy as n, wfCdn as r, cdn as t };
@@ -1,108 +0,0 @@
1
- import { t as Reward } from "./Reward-3FBJF_hS.mjs";
2
- import { t as WorldStateObject } from "./WorldStateObject-45dbRgp7.mjs";
3
- import { faction, languageString, node, timeDeltaToString, toNow } from "warframe-worldstate-data/utilities";
4
-
5
- //#region lib/models/Invasion.ts
6
- /**
7
- * Represents an invasion
8
- */
9
- var Invasion = class extends WorldStateObject {
10
- /**
11
- * The node where the invasion is taking place
12
- */
13
- node;
14
- /**
15
- * The node key where the invasion is taking place
16
- */
17
- nodeKey;
18
- /**
19
- * The invasion's description
20
- */
21
- desc;
22
- /**
23
- * Invasion attacker
24
- */
25
- attacker;
26
- /**
27
- * Invasion defender
28
- */
29
- defender;
30
- /**
31
- * Whether this invasion is against the infestation
32
- */
33
- vsInfestation;
34
- /**
35
- * The signed count of completed runs. Supporting the attackers makes the count go up,
36
- * supporting the defenders makes it go down
37
- */
38
- count;
39
- /**
40
- * The number of runs that one side needs to win
41
- */
42
- requiredRuns;
43
- /**
44
- * The invasion's completion percentage. Defenders win if it gets to 0
45
- * Grineer vs. Corpus invasions start at 50, Infested invasions start at 100
46
- */
47
- completion;
48
- /**
49
- * Whether the invasion has finished
50
- */
51
- completed;
52
- /**
53
- * An array containing the types of all of the invasions's rewards
54
- */
55
- rewardTypes;
56
- /**
57
- * @param {object} data The invasion data
58
- * @param {Dependency} deps The dependencies object
59
- * @param {string} deps.locale Locale to use for translations
60
- */
61
- constructor(data, { locale = "en" } = { locale: "en" }) {
62
- super(data);
63
- const opts = { locale };
64
- this.node = node(data.Node, locale);
65
- this.nodeKey = node(data.Node);
66
- this.desc = languageString(data.LocTag, locale);
67
- this.attacker = {
68
- reward: Object.keys(data?.AttackerReward || {})?.length ? new Reward(data.AttackerReward, opts) : void 0,
69
- faction: faction(data.DefenderMissionInfo.faction, locale),
70
- factionKey: faction(data.DefenderMissionInfo.faction, "en")
71
- };
72
- this.defender = {
73
- reward: Object.keys(data?.DefenderReward || {})?.length ? new Reward(data.DefenderReward, opts) : void 0,
74
- faction: faction(data.AttackerMissionInfo.faction, locale),
75
- factionKey: faction(data.AttackerMissionInfo.faction, "en")
76
- };
77
- this.vsInfestation = /infest/i.test(data.DefenderMissionInfo.faction);
78
- this.count = data.Count;
79
- this.requiredRuns = data.Goal;
80
- this.completion = (1 + data.Count / data.Goal) * (this.vsInfestation ? 100 : 50);
81
- this.completed = data.Completed;
82
- this.rewardTypes = [...this.attacker.reward?.getTypes() ?? [], ...this.defender.reward?.getTypes() ?? []];
83
- }
84
- /**
85
- * Whether or not the attackers are winning.
86
- * This is always false when the infestation is attacking
87
- */
88
- get isAttackerWinning() {
89
- return this.count > 0;
90
- }
91
- /**
92
- * ETA string (at time of object creation)
93
- */
94
- get eta() {
95
- return timeDeltaToString(this.getRemainingTime());
96
- }
97
- /**
98
- * Get an estimation of how much time is left before the invasion ends in milliseconds
99
- */
100
- getRemainingTime() {
101
- const completedRuns = Math.abs(this.count);
102
- const elapsedMillis = toNow(this.activation);
103
- return (this.requiredRuns - completedRuns) * (elapsedMillis / completedRuns);
104
- }
105
- };
106
-
107
- //#endregion
108
- export { Invasion as t };
@@ -1,22 +0,0 @@
1
- //#region lib/models/Kinepage.d.ts
2
- declare class Kinepage {
3
- /**
4
- * Timestamp of when the message appeared on
5
- */
6
- timestamp: Date;
7
- /**
8
- * The message itself
9
- */
10
- message: string;
11
- /**
12
- * Message translations
13
- */
14
- translations: {
15
- [k: string]: unknown;
16
- };
17
- constructor(data: {
18
- [k: string]: string | number;
19
- }, locale?: string);
20
- }
21
- //#endregion
22
- export { Kinepage as t };
@@ -1,24 +0,0 @@
1
- //#region lib/models/Kinepage.ts
2
- var Kinepage = class {
3
- /**
4
- * Timestamp of when the message appeared on
5
- */
6
- timestamp;
7
- /**
8
- * The message itself
9
- */
10
- message;
11
- /**
12
- * Message translations
13
- */
14
- translations;
15
- constructor(data, locale = "en") {
16
- this.timestamp = /* @__PURE__ */ new Date(Number(data.ts) * 1e3);
17
- const translations = Object.fromEntries(Object.entries(data).filter(([key]) => key !== "ts"));
18
- this.message = String(translations[locale] || data.en);
19
- this.translations = Object.fromEntries(Object.entries(translations).filter(([key]) => key !== locale));
20
- }
21
- };
22
-
23
- //#endregion
24
- export { Kinepage as t };
@@ -1,87 +0,0 @@
1
- import { createHash } from "node:crypto";
2
- import { node, nodeMissionType } from "warframe-worldstate-data/utilities";
3
-
4
- //#region lib/models/Kuva.ts
5
- const HOURS_2 = 72e5;
6
- /**
7
- * Truncate time for a semlar-provided mission
8
- * @param mission parsed mission with re-aligned field names
9
- */
10
- const truncateTime = (mission) => {
11
- mission.expiry.setHours(mission.activation.getHours() + 1);
12
- mission.expiry.setMinutes(4);
13
- mission.expiry.setSeconds(0);
14
- mission.expiry.setMilliseconds(0);
15
- mission.activation.setMinutes(mission.activation.getMinutes() + 5.1);
16
- };
17
- /**
18
- * Scrub unnecessary details from the mission
19
- * @param mission parsed mission with re-aligned field names
20
- */
21
- const scrub = (mission) => {
22
- delete mission.solnode;
23
- delete mission.name;
24
- delete mission.node_type;
25
- delete mission.tile;
26
- delete mission.planet;
27
- };
28
- const hash = (str) => createHash("md5").update(str, "utf8").digest("hex");
29
- /**
30
- * Parse kuva & arbitration data
31
- * @param data Data to split for kuva/arbitration
32
- * @param locale locale to translate
33
- * @returns Split parsed data
34
- */
35
- const parse = (data, locale) => {
36
- const parsed = {
37
- kuva: [],
38
- arbitration: {}
39
- };
40
- const now = /* @__PURE__ */ new Date();
41
- if (!data) return void 0;
42
- data?.forEach?.((mission) => {
43
- const p = {
44
- id: "",
45
- activation: new Date(mission.start),
46
- expiry: new Date(mission.end),
47
- ...mission.solnodedata,
48
- node: node(mission.solnode, locale),
49
- nodeKey: node(mission.solnode, "en"),
50
- type: nodeMissionType(mission.solnode, locale),
51
- typeKey: nodeMissionType(mission.solnode, "en"),
52
- expired: false,
53
- archwing: mission.solnodedata?.archwing ?? false,
54
- sharkwing: mission.solnodedata?.sharkwing ?? false
55
- };
56
- truncateTime(p);
57
- p.id = hash(JSON.stringify(p));
58
- p.expired = Date.now() - p.expiry.getTime() < 0;
59
- if (p.activation < now && now < p.expiry && new Date(p.activation.getTime() + HOURS_2) > now && new Date(p.expiry.getTime() - HOURS_2) < now) {
60
- if (mission.missiontype === "EliteAlertMission") parsed.arbitration = p;
61
- if (mission.missiontype?.startsWith("KuvaMission")) parsed.kuva.push(p);
62
- }
63
- scrub(p);
64
- });
65
- parsed.kuva = Array.from(new Set(parsed.kuva));
66
- return parsed;
67
- };
68
- /**
69
- * Stores and parses kuva data from https://10o.io/kuvalog.json
70
- * @property {ExternalMission[]} kuva currently active kuva missions
71
- * @property {ExternalMission} arbitration current arbitration
72
- */
73
- var Kuva = class {
74
- kuva;
75
- arbitration;
76
- constructor({ kuvaData, locale, logger }) {
77
- if (!kuvaData) logger?.debug("No defined kuva data, skipping data");
78
- else {
79
- const parsed = parse(kuvaData, locale);
80
- this.kuva = parsed?.kuva;
81
- this.arbitration = parsed?.arbitration;
82
- }
83
- }
84
- };
85
-
86
- //#endregion
87
- export { Kuva as t };
@@ -1 +0,0 @@
1
- export { };
@@ -1,21 +0,0 @@
1
- //#region lib/supporting/KuvaLogEntry.d.ts
2
- interface KuvaLogEntry {
3
- start: string;
4
- end: string;
5
- missiontype?: string;
6
- solnode: string;
7
- solnodedata?: SolnodeData;
8
- realtime?: string;
9
- }
10
- interface SolnodeData {
11
- name: string;
12
- tile: string;
13
- planet: string;
14
- enemy: string;
15
- type: string;
16
- node_type: string;
17
- archwing: boolean;
18
- sharkwing: boolean;
19
- }
20
- //#endregion
21
- export { SolnodeData as n, KuvaLogEntry as t };
@@ -1,25 +0,0 @@
1
- import { r as WorldStateObject } from "./WorldStateObject-C1HEDkH7.mjs";
2
-
3
- //#region lib/models/MidrathCycle.d.ts
4
- declare class MidrathCycle extends WorldStateObject {
5
- #private;
6
- /**
7
- * Whether it's day or not
8
- */
9
- isDay: boolean;
10
- /**
11
- * The current state
12
- */
13
- state: string;
14
- constructor();
15
- /**
16
- * Get whether or not the event has expired
17
- */
18
- get expired(): boolean;
19
- /**
20
- * The amount of time left as a string
21
- */
22
- get timeLeft(): string;
23
- }
24
- //#endregion
25
- export { MidrathCycle as t };
@@ -1,68 +0,0 @@
1
- import { t as WorldStateObject } from "./WorldStateObject-45dbRgp7.mjs";
2
- import { createHash } from "node:crypto";
3
- import { fromNow, timeDeltaToString } from "warframe-worldstate-data/utilities";
4
-
5
- //#region lib/models/MidrathCycle.ts
6
- /**
7
- * Get the current Midrath cycle time
8
- */
9
- function getCurrentMidrathCycle() {
10
- const dayDuration = 1920 * 1e3;
11
- const nightDuration = 960 * 1e3;
12
- const totalDuration = dayDuration + nightDuration;
13
- const refPoint = Date.parse("2025-08-07T16:05:29Z");
14
- const now = Date.now();
15
- const elapsedInCycle = (now - refPoint) % totalDuration;
16
- const isDay = elapsedInCycle < dayDuration;
17
- let phase = {
18
- name: "night",
19
- remaining: totalDuration - elapsedInCycle,
20
- duration: nightDuration
21
- };
22
- if (isDay) phase = {
23
- name: "day",
24
- remaining: dayDuration - elapsedInCycle,
25
- duration: dayDuration
26
- };
27
- const activation = new Date(now - (phase.duration - phase.remaining));
28
- return {
29
- activation,
30
- expiry: new Date(activation.getTime() + phase.duration),
31
- state: phase.name,
32
- isDay
33
- };
34
- }
35
- var MidrathCycle = class extends WorldStateObject {
36
- #cycle = getCurrentMidrathCycle();
37
- /**
38
- * Whether it's day or not
39
- */
40
- isDay;
41
- /**
42
- * The current state
43
- */
44
- state;
45
- constructor() {
46
- super({ _id: { $oid: "midrathCycle0" } });
47
- this.activation = this.#cycle.activation;
48
- this.expiry = this.#cycle.expiry;
49
- this.isDay = this.#cycle.isDay;
50
- this.state = this.#cycle.state;
51
- this.id = createHash("md5").update(JSON.stringify(this.expiry), "utf8").digest("hex");
52
- }
53
- /**
54
- * Get whether or not the event has expired
55
- */
56
- get expired() {
57
- return fromNow(this.expiry) < 0;
58
- }
59
- /**
60
- * The amount of time left as a string
61
- */
62
- get timeLeft() {
63
- return timeDeltaToString(fromNow(this.expiry));
64
- }
65
- };
66
-
67
- //#endregion
68
- export { MidrathCycle as t };
@@ -1,140 +0,0 @@
1
- import { t as Reward } from "./Reward-3FBJF_hS.mjs";
2
- import { faction, insist, languageString, missionType, node } from "warframe-worldstate-data/utilities";
3
-
4
- //#region lib/models/Mission.ts
5
- /**
6
- * Represents an in-game mission
7
- */
8
- var Mission = class {
9
- /**
10
- * The mission's description
11
- */
12
- description;
13
- /**
14
- * The node where the mission takes place
15
- */
16
- node;
17
- /**
18
- * Unlocalized node
19
- */
20
- nodeKey;
21
- /**
22
- * The mission's type
23
- */
24
- type;
25
- /**
26
- * The mission's type
27
- */
28
- typeKey;
29
- /**
30
- * The factions that the players must fight in the mission
31
- */
32
- faction;
33
- /**
34
- * The factions that the players must fight in the mission
35
- */
36
- factionKey;
37
- /**
38
- * The mission's reward
39
- */
40
- reward;
41
- /**
42
- * The minimum level of the enemies in the mission
43
- */
44
- minEnemyLevel;
45
- /**
46
- * The maximum level of the enemies in the mission
47
- */
48
- maxEnemyLevel;
49
- /**
50
- * The number of waves that the players need to complete (undefined if not applicable)
51
- */
52
- maxWaveNum;
53
- /**
54
- * The Mission's nightmare boolean
55
- */
56
- nightmare;
57
- /**
58
- * The Mission's archwing requirement
59
- */
60
- archwingRequired;
61
- /**
62
- * The Mission's sharkwing requirement
63
- */
64
- isSharkwing;
65
- /**
66
- * Override for the map on this mission
67
- */
68
- levelOverride;
69
- /**
70
- * Enemy specification for the mission
71
- */
72
- enemySpec;
73
- /**
74
- * Array of strings denoting extra spawners for a mission
75
- */
76
- advancedSpawners;
77
- /**
78
- * Items required to enter the mission
79
- */
80
- requiredItems;
81
- /**
82
- * Whether or not the required items are consumed
83
- */
84
- consumeRequiredItems;
85
- /**
86
- * Target for the mission
87
- */
88
- target;
89
- /**
90
- * Whether or not leaders are always allowed
91
- */
92
- leadersAlwaysAllowed;
93
- /**
94
- * A tag for the event that this corresponds to
95
- */
96
- goalTag;
97
- /**
98
- * Affectors for this mission
99
- */
100
- levelAuras;
101
- /**
102
- * Only weapon allowed for the mission
103
- */
104
- exclusiveWeapon;
105
- /**
106
- * @param data The mission data
107
- * @param locale Locale to use for translations
108
- */
109
- constructor(data, { locale = "en" } = { locale: "en" }) {
110
- const deps = { locale };
111
- insist({ ...data });
112
- this.description = languageString(data.descText, locale);
113
- this.node = node(data.node || data.location, locale);
114
- this.nodeKey = node(data.node || data.location, "en");
115
- this.type = missionType(data.missionType, locale);
116
- this.typeKey = missionType(data.missionType, "en");
117
- this.faction = faction(data.faction, locale);
118
- this.factionKey = faction(data.faction, "en");
119
- this.reward = data.missionReward ? new Reward(data.missionReward, deps) : void 0;
120
- this.minEnemyLevel = data.minEnemyLevel;
121
- this.maxEnemyLevel = data.maxEnemyLevel;
122
- this.maxWaveNum = data.maxWaveNum;
123
- this.nightmare = data.nightmare || false;
124
- this.archwingRequired = data.archwingRequired || false;
125
- this.isSharkwing = data.isSharkwingMission || false;
126
- this.levelOverride = languageString(data.levelOverride, locale);
127
- this.enemySpec = languageString(data.enemySpec, locale);
128
- this.advancedSpawners = (data.advancedSpawners || []).map((spawner) => languageString(spawner, locale));
129
- this.requiredItems = (data.requiredItems || []).map((reqItem) => languageString(reqItem, locale));
130
- this.consumeRequiredItems = data.consumeRequiredItems;
131
- this.target = data.vipAgent ? languageString(data.vipAgent, locale) : void 0;
132
- this.leadersAlwaysAllowed = data.leadersAlwaysAllowed;
133
- this.goalTag = data.goalTag;
134
- this.levelAuras = (data.levelAuras || []).map((aura) => languageString(aura, locale));
135
- this.exclusiveWeapon = languageString(data.exclusiveWeapon, locale);
136
- }
137
- };
138
-
139
- //#endregion
140
- export { Mission as t };