warframe-worldstate-parser 5.2.16 → 5.2.18
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/dist/{Calendar-CRM0XhAy.d.mts → Calendar-C-rbmV_t.d.mts} +1 -1
- package/dist/{CambionCycle-OI3v1knd.d.mts → CambionCycle-BzR_MfPH.d.mts} +2 -2
- package/dist/{CetusCycle-DQ4n05vO.d.mts → CetusCycle-DaqfF4J1.d.mts} +1 -1
- package/dist/{ConstructionProgress-DG2KzS0X.d.mts → ConstructionProgress-BRxmro3-.d.mts} +1 -1
- package/dist/{DarkSectorBattle-CiSe3kFm.d.mts → DarkSectorBattle-DHRl5tG1.d.mts} +1 -1
- package/dist/{Dependency-CNqXngHD.d.mts → Dependency-Cd-TxBJy.d.mts} +1 -1
- package/dist/{EarthCycle-CxtijnVV.d.mts → EarthCycle-C_oB5gDc.d.mts} +1 -1
- package/dist/{MidrathCycle-E0gMF3AR.d.mts → MidrathCycle-CxveqDtx.d.mts} +1 -1
- package/dist/{News-DxEm-q6V.d.mts → News-CJ3lD7_g.d.mts} +1 -1
- package/dist/{Nightwave-CPqMSqGK.d.mts → Nightwave-BLHH02ht.d.mts} +2 -2
- package/dist/{NightwaveChallenge-CG3uychc.d.mts → NightwaveChallenge-j_m4hVQU.d.mts} +1 -1
- package/dist/{PersistentEnemy-DnnnreSz.d.mts → PersistentEnemy-BJ4twtUY.d.mts} +1 -1
- package/dist/{VallisCycle-6DCaWFoR.d.mts → VallisCycle-as7DM4a-.d.mts} +1 -1
- package/dist/{ZarimanCycle-BrSLIWhD.d.mts → ZarimanCycle-DyYiVfyG.d.mts} +1 -1
- package/dist/{index-Bgx8kIDy.d.mts → index-C4EJ_Mpd.d.mts} +6 -6
- package/dist/lib/WorldState.d.mts +16 -19
- package/dist/lib/WorldState.mjs +32 -48
- package/dist/lib/models/Alert.d.mts +1 -17
- package/dist/lib/models/Alert.mjs +49 -7
- package/dist/lib/models/Archimedea.d.mts +1 -17
- package/dist/lib/models/Archimedea.mjs +88 -4
- package/dist/lib/models/Calendar.d.mts +1 -2
- package/dist/lib/models/Calendar.mjs +79 -4
- package/dist/lib/models/CambionCycle.d.mts +1 -3
- package/dist/lib/models/CambionCycle.mjs +28 -4
- package/dist/lib/models/CetusCycle.d.mts +1 -2
- package/dist/lib/models/CetusCycle.mjs +87 -4
- package/dist/lib/models/ChallengeInstance.d.mts +1 -17
- package/dist/lib/models/ChallengeInstance.mjs +46 -3
- package/dist/lib/models/ConclaveChallenge.d.mts +1 -17
- package/dist/lib/models/ConclaveChallenge.mjs +77 -4
- package/dist/lib/models/ConstructionProgress.d.mts +1 -2
- package/dist/lib/models/ConstructionProgress.mjs +23 -4
- package/dist/lib/models/DailyDeal.d.mts +1 -17
- package/dist/lib/models/DailyDeal.mjs +64 -4
- package/dist/lib/models/DarkSector.d.mts +1 -17
- package/dist/lib/models/DarkSector.mjs +136 -8
- package/dist/lib/models/DarkSectorBattle.d.mts +1 -2
- package/dist/lib/models/DarkSectorBattle.mjs +49 -3
- package/dist/lib/models/DuviriCycle.d.mts +1 -17
- package/dist/lib/models/DuviriCycle.mjs +55 -4
- package/dist/lib/models/EarthCycle.d.mts +1 -2
- package/dist/lib/models/EarthCycle.mjs +73 -4
- package/dist/lib/models/Fissure.d.mts +1 -17
- package/dist/lib/models/Fissure.mjs +83 -4
- package/dist/lib/models/FlashSale.d.mts +1 -17
- package/dist/lib/models/FlashSale.mjs +73 -4
- package/dist/lib/models/GlobalUpgrade.d.mts +1 -17
- package/dist/lib/models/GlobalUpgrade.mjs +56 -4
- package/dist/lib/models/Invasion.d.mts +1 -17
- package/dist/lib/models/Invasion.mjs +106 -6
- package/dist/lib/models/Kinepage.d.mts +1 -1
- package/dist/lib/models/Kinepage.mjs +23 -3
- package/dist/lib/models/Kuva.d.mts +1 -17
- package/dist/lib/models/Kuva.mjs +85 -3
- package/dist/lib/models/MidrathCycle.d.mts +1 -2
- package/dist/lib/models/MidrathCycle.mjs +66 -4
- package/dist/lib/models/Mission.d.mts +1 -17
- package/dist/lib/models/Mission.mjs +138 -5
- package/dist/lib/models/News.d.mts +1 -2
- package/dist/lib/models/News.mjs +116 -4
- package/dist/lib/models/Nightwave.d.mts +1 -3
- package/dist/lib/models/Nightwave.mjs +58 -5
- package/dist/lib/models/NightwaveChallenge.d.mts +1 -2
- package/dist/lib/models/NightwaveChallenge.mjs +51 -4
- package/dist/lib/models/PersistentEnemy.d.mts +1 -2
- package/dist/lib/models/PersistentEnemy.mjs +74 -4
- package/dist/lib/models/Reward.d.mts +1 -17
- package/dist/lib/models/Reward.mjs +71 -4
- package/dist/lib/models/SentientOutpost.d.mts +1 -17
- package/dist/lib/models/SentientOutpost.mjs +63 -3
- package/dist/lib/models/Simaris.d.mts +1 -17
- package/dist/lib/models/Simaris.mjs +33 -3
- package/dist/lib/models/Sortie.d.mts +1 -17
- package/dist/lib/models/Sortie.mjs +71 -8
- package/dist/lib/models/SortieVariant.d.mts +1 -17
- package/dist/lib/models/SortieVariant.mjs +49 -3
- package/dist/lib/models/SteelPathOffering.d.mts +1 -1
- package/dist/lib/models/SteelPathOffering.mjs +81 -3
- package/dist/lib/models/SyndicateJob.d.mts +1 -17
- package/dist/lib/models/SyndicateJob.mjs +161 -7
- package/dist/lib/models/SyndicateMission.d.mts +1 -17
- package/dist/lib/models/SyndicateMission.mjs +64 -8
- package/dist/lib/models/Tmp.d.mts +1 -17
- package/dist/lib/models/Tmp.mjs +28 -4
- package/dist/lib/models/VallisCycle.d.mts +1 -2
- package/dist/lib/models/VallisCycle.mjs +72 -4
- package/dist/lib/models/VoidTrader.d.mts +1 -17
- package/dist/lib/models/VoidTrader.mjs +76 -6
- package/dist/lib/models/VoidTraderItem.d.mts +1 -17
- package/dist/lib/models/VoidTraderItem.mjs +36 -3
- package/dist/lib/models/VoidTraderSchedule.d.mts +1 -17
- package/dist/lib/models/VoidTraderSchedule.mjs +12 -3
- package/dist/lib/models/WeeklyChallenge.d.mts +1 -17
- package/dist/lib/models/WeeklyChallenge.mjs +19 -5
- package/dist/lib/models/WorldEvent.d.mts +1 -17
- package/dist/lib/models/WorldEvent.mjs +211 -9
- package/dist/lib/models/WorldStateObject.d.mts +1 -1
- package/dist/lib/models/WorldStateObject.mjs +52 -3
- package/dist/lib/models/ZarimanCycle.d.mts +1 -2
- package/dist/lib/models/ZarimanCycle.mjs +77 -4
- package/dist/lib/models/index.d.mts +17 -18
- package/dist/lib/models/index.mjs +43 -47
- package/dist/lib/supporting/Dependency.d.mts +1 -1
- package/dist/lib/supporting/Dependency.mjs +1 -1
- package/dist/lib/supporting/DuviriChoice.d.mts +1 -17
- package/dist/lib/supporting/DuviriChoice.mjs +24 -3
- package/dist/lib/supporting/ExternalMission.d.mts +1 -1
- package/dist/lib/supporting/ExternalMission.mjs +1 -1
- package/dist/lib/supporting/FetchProxy.d.mts +1 -1
- package/dist/lib/supporting/FetchProxy.mjs +45 -3
- package/dist/lib/supporting/ImgCdn.d.mts +1 -1
- package/dist/lib/supporting/ImgCdn.mjs +6 -3
- package/dist/lib/supporting/KuvaLogEntry.d.mts +1 -1
- package/dist/lib/supporting/KuvaLogEntry.mjs +1 -1
- package/dist/lib/supporting/RewardData.d.mts +1 -1
- package/dist/lib/supporting/RewardData.mjs +75 -3
- package/dist/lib/supporting/RewardTypes.d.mts +1 -1
- package/dist/lib/supporting/RewardTypes.mjs +326 -3
- package/dist/lib/supporting/index.d.mts +8 -23
- package/dist/lib/supporting/index.mjs +6 -8
- package/dist/main.d.mts +24 -24
- package/dist/main.mjs +48 -51
- package/package.json +1 -1
- package/dist/Alert-CPT2sBmd.mjs +0 -51
- package/dist/Archimedea-Vo36QE99.mjs +0 -90
- package/dist/Calendar-_gEQ9BEd.mjs +0 -81
- package/dist/CambionCycle-B1pqIgks.mjs +0 -30
- package/dist/CetusCycle-Ct51M2pd.mjs +0 -89
- package/dist/ChallengeInstance-BOu_e7ML.mjs +0 -48
- package/dist/ConclaveChallenge-BTN6UyV6.mjs +0 -79
- package/dist/ConstructionProgress-BoF2P9fx.mjs +0 -25
- package/dist/DailyDeal-aoNeCFWT.mjs +0 -66
- package/dist/DarkSector-D0uJWCg7.mjs +0 -138
- package/dist/DarkSectorBattle-CqRYeNpe.mjs +0 -51
- package/dist/Dependency-BR-dAeHI.mjs +0 -1
- package/dist/DuviriChoice-BEBiWA-g.mjs +0 -25
- package/dist/DuviriCycle-Do7mMnoC.mjs +0 -57
- package/dist/EarthCycle-BOAlcAuQ.mjs +0 -75
- package/dist/ExternalMission-D3MSZgnN.mjs +0 -1
- package/dist/FetchProxy-Bkdk15SX.mjs +0 -46
- package/dist/Fissure-diM4hyi3.mjs +0 -85
- package/dist/FlashSale-CNfRaZhM.mjs +0 -75
- package/dist/GlobalUpgrade-CUtZw05z.mjs +0 -58
- package/dist/ImgCdn-BJOdWAbU.mjs +0 -7
- package/dist/Invasion-Corx1lxf.mjs +0 -108
- package/dist/Kinepage-CbSzge67.mjs +0 -24
- package/dist/Kuva-Ijy2ZGBL.mjs +0 -87
- package/dist/KuvaLogEntry-D_VzIT3W.mjs +0 -1
- package/dist/MidrathCycle-XD2T8Dx5.mjs +0 -68
- package/dist/Mission-b8KP-YDf.mjs +0 -140
- package/dist/News-zAK-sYRg.mjs +0 -118
- package/dist/Nightwave-cTRmlbwH.mjs +0 -60
- package/dist/NightwaveChallenge-C8ARG7LC.mjs +0 -53
- package/dist/PersistentEnemy-3Sw5E8AN.mjs +0 -76
- package/dist/Reward-3FBJF_hS.mjs +0 -73
- package/dist/RewardData-C_9b8Yhi.mjs +0 -76
- package/dist/RewardTypes-DUrR7H3G.mjs +0 -328
- package/dist/SentientOutpost-Cadk-pIW.mjs +0 -65
- package/dist/Simaris-D6etEQp_.mjs +0 -35
- package/dist/Sortie-rSBgJc6U.mjs +0 -73
- package/dist/SortieVariant-CnuLkkNZ.mjs +0 -51
- package/dist/SteelPathOffering--wm-7hwb.mjs +0 -83
- package/dist/SyndicateJob-R89tWqvT.mjs +0 -162
- package/dist/SyndicateMission-CKZDWNyf.mjs +0 -66
- package/dist/Tmp-BYL_mYIG.mjs +0 -30
- package/dist/VallisCycle-BW2g49wB.mjs +0 -74
- package/dist/VoidTrader-DtjtVUgR.mjs +0 -78
- package/dist/VoidTraderItem-Cz6x1KTF.mjs +0 -38
- package/dist/VoidTraderSchedule-BsJLu50V.mjs +0 -14
- package/dist/WeeklyChallenge-Dl2ekl6X.mjs +0 -21
- package/dist/WorldEvent-C-LaV2ug.mjs +0 -213
- package/dist/WorldStateObject-45dbRgp7.mjs +0 -54
- package/dist/ZarimanCycle-DoAPwgaM.mjs +0 -79
- package/dist/supporting-BLSXhlWM.mjs +0 -1
- /package/dist/{ExternalMission-C82w4uMq.d.mts → ExternalMission-CT__oi7Q.d.mts} +0 -0
- /package/dist/{FetchProxy-DfSTUgkf.d.mts → FetchProxy-DHSI4JPP.d.mts} +0 -0
- /package/dist/{ImgCdn-D0hSGSB1.d.mts → ImgCdn-DIhZrwap.d.mts} +0 -0
- /package/dist/{Kinepage-B-Ym_VW5.d.mts → Kinepage-CKBuvbv5.d.mts} +0 -0
- /package/dist/{KuvaLogEntry-cftxhjfU.d.mts → KuvaLogEntry-f4ZBn2Xf.d.mts} +0 -0
- /package/dist/{RewardData-DWCgJ3UT.d.mts → RewardData-BdtdUFnh.d.mts} +0 -0
- /package/dist/{RewardTypes-Y3tHrtIJ.d.mts → RewardTypes-BnGaD7VF.d.mts} +0 -0
- /package/dist/{SteelPathOffering-CQkoKi5T.d.mts → SteelPathOffering-DYjZ29sT.d.mts} +0 -0
- /package/dist/{WorldStateObject-C1HEDkH7.d.mts → WorldStateObject-C2KjQZjd.d.mts} +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { parseDate } from "warframe-worldstate-data/utilities";
|
|
2
|
-
|
|
3
|
-
//#region lib/models/DarkSectorBattle.ts
|
|
4
|
-
/**
|
|
5
|
-
* Represents a battle over a dark sector
|
|
6
|
-
*/
|
|
7
|
-
var DarkSectorBattle = class {
|
|
8
|
-
/**
|
|
9
|
-
* The defenders of the dark sector
|
|
10
|
-
*/
|
|
11
|
-
defender;
|
|
12
|
-
/**
|
|
13
|
-
* Whether the defenders are an alliance or not
|
|
14
|
-
*/
|
|
15
|
-
defenderIsAlliance;
|
|
16
|
-
/**
|
|
17
|
-
* The attackers of the dark sector
|
|
18
|
-
*/
|
|
19
|
-
attacker;
|
|
20
|
-
/**
|
|
21
|
-
* Whether the attackers are an alliance or not
|
|
22
|
-
*/
|
|
23
|
-
attackerIsAlliance;
|
|
24
|
-
/**
|
|
25
|
-
* The winner of the battle
|
|
26
|
-
*/
|
|
27
|
-
winner;
|
|
28
|
-
/**
|
|
29
|
-
* The date and time at which the battle started
|
|
30
|
-
*/
|
|
31
|
-
start;
|
|
32
|
-
/**
|
|
33
|
-
* The date and time at which the battle ended
|
|
34
|
-
*/
|
|
35
|
-
end;
|
|
36
|
-
/**
|
|
37
|
-
* @param data The battle data
|
|
38
|
-
*/
|
|
39
|
-
constructor(data) {
|
|
40
|
-
this.defender = data.Def;
|
|
41
|
-
this.defenderIsAlliance = data.DefAli;
|
|
42
|
-
this.attacker = data.Att;
|
|
43
|
-
this.attackerIsAlliance = data.AttAli;
|
|
44
|
-
this.winner = (data.DefId.$oid || data.DefId.$id) === (data.WinId.$oid || data.WinId.$id) ? this.defender : this.attacker;
|
|
45
|
-
this.start = parseDate(data.Start);
|
|
46
|
-
this.end = parseDate(data.End);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
//#endregion
|
|
51
|
-
export { DarkSectorBattle as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
//#region lib/supporting/DuviriChoice.ts
|
|
2
|
-
/**
|
|
3
|
-
* Single category of duviri choices
|
|
4
|
-
*/
|
|
5
|
-
var DuviriChoice = class {
|
|
6
|
-
category;
|
|
7
|
-
categoryKey;
|
|
8
|
-
choices;
|
|
9
|
-
constructor(data) {
|
|
10
|
-
switch (data.Category) {
|
|
11
|
-
case "EXC_NORMAL":
|
|
12
|
-
this.category = "normal";
|
|
13
|
-
break;
|
|
14
|
-
case "EXC_HARD":
|
|
15
|
-
this.category = "hard";
|
|
16
|
-
break;
|
|
17
|
-
default: throw new Error(`Unknown category ${data.Category}`);
|
|
18
|
-
}
|
|
19
|
-
this.categoryKey = data.Category;
|
|
20
|
-
this.choices = data.Choices;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
//#endregion
|
|
25
|
-
export { DuviriChoice as t };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { t as WorldStateObject } from "./WorldStateObject-45dbRgp7.mjs";
|
|
2
|
-
|
|
3
|
-
//#region lib/models/DuviriCycle.ts
|
|
4
|
-
const cycleTime = 36e3;
|
|
5
|
-
const stateTime = 7200;
|
|
6
|
-
const states = [
|
|
7
|
-
"sorrow",
|
|
8
|
-
"fear",
|
|
9
|
-
"joy",
|
|
10
|
-
"anger",
|
|
11
|
-
"envy"
|
|
12
|
-
];
|
|
13
|
-
const getStageInfo = () => {
|
|
14
|
-
const cycleDelta = (Math.floor(Date.now() / 1e3) - 52) % cycleTime;
|
|
15
|
-
const stateInd = Math.floor(cycleDelta / stateTime);
|
|
16
|
-
const untilNext = stateTime - cycleDelta % stateTime;
|
|
17
|
-
const expiry = new Date(Date.now() + untilNext * 1e3);
|
|
18
|
-
expiry.setSeconds(0);
|
|
19
|
-
expiry.setMilliseconds(0);
|
|
20
|
-
const activation = /* @__PURE__ */ new Date(expiry.getTime() - stateTime * 1e3);
|
|
21
|
-
activation.setSeconds(0);
|
|
22
|
-
activation.setMilliseconds(0);
|
|
23
|
-
return {
|
|
24
|
-
state: states[stateInd],
|
|
25
|
-
expiry,
|
|
26
|
-
activation
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* @typedef {WorldStateObject} DuviriCycle
|
|
31
|
-
* @augments {WorldStateObject}
|
|
32
|
-
*/
|
|
33
|
-
var DuviriCycle = class extends WorldStateObject {
|
|
34
|
-
/**
|
|
35
|
-
* Current stage key
|
|
36
|
-
*/
|
|
37
|
-
state;
|
|
38
|
-
/**
|
|
39
|
-
* Choice options for this Cycle
|
|
40
|
-
*/
|
|
41
|
-
choices;
|
|
42
|
-
/**
|
|
43
|
-
* @param duviriChoices The current circuit choices
|
|
44
|
-
*/
|
|
45
|
-
constructor(duviriChoices) {
|
|
46
|
-
super({ _id: { $oid: "duviriCycle0" } });
|
|
47
|
-
const { activation, expiry, state } = getStageInfo();
|
|
48
|
-
this.activation = activation;
|
|
49
|
-
this.expiry = expiry;
|
|
50
|
-
this.state = state;
|
|
51
|
-
this.choices = duviriChoices;
|
|
52
|
-
this.id = `duviriCycle${this.state}${this.expiry.getTime()}`;
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
//#endregion
|
|
57
|
-
export { DuviriCycle as t };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { t as WorldStateObject } from "./WorldStateObject-45dbRgp7.mjs";
|
|
2
|
-
import { fromNow } from "warframe-worldstate-data/utilities";
|
|
3
|
-
|
|
4
|
-
//#region lib/models/EarthCycle.ts
|
|
5
|
-
/**
|
|
6
|
-
* Get the current Earth Day/Night Cycle
|
|
7
|
-
* @returns {EarthCycle} The current Earth Day/Night Cycle
|
|
8
|
-
*/
|
|
9
|
-
function getCurrentEarthCycle() {
|
|
10
|
-
const now = Date.now();
|
|
11
|
-
const cycleSeconds = Math.floor(now / 1e3) % 28800;
|
|
12
|
-
const dayTime = cycleSeconds < 14400;
|
|
13
|
-
let secondsLeft = 14400 - cycleSeconds % 14400;
|
|
14
|
-
const millisLeft = secondsLeft * 1e3;
|
|
15
|
-
const expiry = new Date(now + secondsLeft * 1e3);
|
|
16
|
-
const minutesCoef = 1e3 * 60;
|
|
17
|
-
const rounded = new Date(Math.round((now + millisLeft) / minutesCoef) * minutesCoef);
|
|
18
|
-
const timePieces = [];
|
|
19
|
-
if (secondsLeft > 3600) {
|
|
20
|
-
timePieces.push(`${Math.floor(secondsLeft / 3600)}h`);
|
|
21
|
-
secondsLeft %= 3600;
|
|
22
|
-
}
|
|
23
|
-
if (secondsLeft > 60) {
|
|
24
|
-
timePieces.push(`${Math.floor(secondsLeft / 60)}m`);
|
|
25
|
-
secondsLeft %= 60;
|
|
26
|
-
}
|
|
27
|
-
timePieces.push(`${secondsLeft}s`);
|
|
28
|
-
return {
|
|
29
|
-
dayTime,
|
|
30
|
-
timeLeft: timePieces.join(" "),
|
|
31
|
-
expiry,
|
|
32
|
-
expiresIn: millisLeft,
|
|
33
|
-
rounded,
|
|
34
|
-
state: dayTime ? "day" : "night",
|
|
35
|
-
start: /* @__PURE__ */ new Date(expiry.getTime() - 1e3 * 60 * 60 * 4)
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Represents the current Earth Day/Night Cycle
|
|
40
|
-
* @augments {WorldStateObject}
|
|
41
|
-
*/
|
|
42
|
-
var EarthCycle = class extends WorldStateObject {
|
|
43
|
-
#ec = getCurrentEarthCycle();
|
|
44
|
-
/**
|
|
45
|
-
* Whether or not this it's daytime
|
|
46
|
-
*/
|
|
47
|
-
isDay;
|
|
48
|
-
/**
|
|
49
|
-
* Current cycle state. One of `day`, `night`
|
|
50
|
-
*/
|
|
51
|
-
state;
|
|
52
|
-
/**
|
|
53
|
-
* Time remaining string
|
|
54
|
-
*/
|
|
55
|
-
timeLeft;
|
|
56
|
-
constructor() {
|
|
57
|
-
super({ _id: { $oid: "earthCycle0" } });
|
|
58
|
-
this.expiry = this.#ec.expiry;
|
|
59
|
-
this.activation = this.#ec.start;
|
|
60
|
-
this.isDay = this.#ec.dayTime;
|
|
61
|
-
this.state = this.#ec.state;
|
|
62
|
-
this.timeLeft = this.#ec.timeLeft;
|
|
63
|
-
this.id = `earthCycle${this.#ec.rounded.getTime()}`;
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Get whether or not the event has expired
|
|
67
|
-
* @returns {boolean} Whether or not the event has expired
|
|
68
|
-
*/
|
|
69
|
-
get expired() {
|
|
70
|
-
return fromNow(this.expiry) < 0;
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
//#endregion
|
|
75
|
-
export { EarthCycle as t };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { };
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
//#region lib/supporting/FetchProxy.ts
|
|
2
|
-
const proxyUrl = process.env.PROXY_URL ?? void 0;
|
|
3
|
-
const isCI = process.env.CI === "true";
|
|
4
|
-
const ciTimeout = process.env.CI_TIMEOUT ? parseInt(process.env.CI_TIMEOUT, 10) : 6e4;
|
|
5
|
-
const localTimeout = process.env.LOCAL_TIMEOUT ? parseInt(process.env.LOCAL_TIMEOUT, 10) : 12e6;
|
|
6
|
-
const fetchProxy = async (url, { session = "parser-session", contentType = "application/json" } = {
|
|
7
|
-
session: "parser-session",
|
|
8
|
-
contentType: "application/json"
|
|
9
|
-
}) => {
|
|
10
|
-
if (proxyUrl) {
|
|
11
|
-
const text = await (await fetch(`${proxyUrl}/v1`, {
|
|
12
|
-
method: "POST",
|
|
13
|
-
headers: { "Content-Type": "application/json" },
|
|
14
|
-
body: JSON.stringify({
|
|
15
|
-
cmd: "request.get",
|
|
16
|
-
url,
|
|
17
|
-
session,
|
|
18
|
-
maxTimeout: isCI ? ciTimeout : localTimeout,
|
|
19
|
-
returnOnlyCookies: false,
|
|
20
|
-
returnPageContent: true
|
|
21
|
-
})
|
|
22
|
-
})).text();
|
|
23
|
-
const { solution } = JSON.parse(text);
|
|
24
|
-
if (!solution?.response) throw solution;
|
|
25
|
-
if (contentType === "application/json") return {
|
|
26
|
-
ok: solution.responseCode === 200,
|
|
27
|
-
status: solution.responseCode,
|
|
28
|
-
json: async () => {
|
|
29
|
-
try {
|
|
30
|
-
return JSON.parse(solution.response);
|
|
31
|
-
} catch (_error) {
|
|
32
|
-
return {};
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
if (contentType === "text/html") return {
|
|
37
|
-
ok: solution.responseCode === 200,
|
|
38
|
-
status: solution.responseCode,
|
|
39
|
-
text: async () => solution.response.replace(/<\/?[^>]+(>|$)/g, "")
|
|
40
|
-
};
|
|
41
|
-
return solution.response;
|
|
42
|
-
} else return fetch(url);
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
//#endregion
|
|
46
|
-
export { fetchProxy as t };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { t as WorldStateObject } from "./WorldStateObject-45dbRgp7.mjs";
|
|
2
|
-
import { fissureModifier, fissureTier, fromNow, missionType, node, nodeEnemy, nodeMissionType, parseDate, timeDeltaToString } from "warframe-worldstate-data/utilities";
|
|
3
|
-
|
|
4
|
-
//#region lib/models/Fissure.ts
|
|
5
|
-
/**
|
|
6
|
-
* Represents a fissure mission
|
|
7
|
-
* @augments {WorldStateObject}
|
|
8
|
-
*/
|
|
9
|
-
var Fissure = class extends WorldStateObject {
|
|
10
|
-
/**
|
|
11
|
-
* The node where the fissure has appeared
|
|
12
|
-
*/
|
|
13
|
-
node;
|
|
14
|
-
/**
|
|
15
|
-
* The fissure mission type
|
|
16
|
-
*/
|
|
17
|
-
missionType;
|
|
18
|
-
/**
|
|
19
|
-
* The fissure mission type key
|
|
20
|
-
*/
|
|
21
|
-
missionTypeKey;
|
|
22
|
-
/**
|
|
23
|
-
* The faction controlling the node where the fissure has appeared
|
|
24
|
-
*/
|
|
25
|
-
enemy;
|
|
26
|
-
/**
|
|
27
|
-
* Faction enum for the faction controlling the node where the fissure has appeared
|
|
28
|
-
*/
|
|
29
|
-
enemyKey;
|
|
30
|
-
/**
|
|
31
|
-
* The node key where the fissure has appeared
|
|
32
|
-
*/
|
|
33
|
-
nodeKey;
|
|
34
|
-
/**
|
|
35
|
-
* The fissure's tier
|
|
36
|
-
*/
|
|
37
|
-
tier;
|
|
38
|
-
/**
|
|
39
|
-
* The fissure's tier as a number
|
|
40
|
-
*/
|
|
41
|
-
tierNum;
|
|
42
|
-
/**
|
|
43
|
-
* Whether this fissure corresponds to a RailJack Void Storm
|
|
44
|
-
*/
|
|
45
|
-
isStorm;
|
|
46
|
-
/**
|
|
47
|
-
* Whether this fissure is a Steel Path fissure
|
|
48
|
-
*/
|
|
49
|
-
isHard;
|
|
50
|
-
/**
|
|
51
|
-
* @param {object} data The fissure data
|
|
52
|
-
* @param {Dependency} deps The dependencies object
|
|
53
|
-
* @param {string} deps.locale Locale to use for translations
|
|
54
|
-
*/
|
|
55
|
-
constructor(data, { locale = "en" } = { locale: "en" }) {
|
|
56
|
-
super(data);
|
|
57
|
-
this.node = node(data.Node, locale);
|
|
58
|
-
this.missionType = data.MissionType ? missionType(data.MissionType, locale) : nodeMissionType(data.Node, locale);
|
|
59
|
-
this.missionTypeKey = data.MissionType ? missionType(data.MissionType) : nodeMissionType(data.Node);
|
|
60
|
-
this.enemy = nodeEnemy(data.Node, locale);
|
|
61
|
-
this.enemyKey = nodeEnemy(data.Node);
|
|
62
|
-
this.nodeKey = node(data.Node);
|
|
63
|
-
this.tier = fissureModifier(data.Modifier || data.ActiveMissionTier, locale);
|
|
64
|
-
this.tierNum = fissureTier(data.Modifier || data.ActiveMissionTier, locale);
|
|
65
|
-
this.activation = parseDate(data.Activation);
|
|
66
|
-
this.expiry = parseDate(data.Expiry);
|
|
67
|
-
this.isStorm = Boolean(data.ActiveMissionTier);
|
|
68
|
-
this.isHard = Boolean(data.Hard);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Whether this is expired (at time of object creation)
|
|
72
|
-
*/
|
|
73
|
-
get expired() {
|
|
74
|
-
return fromNow(this.expiry) < 0;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* ETA string (at time of object creation)
|
|
78
|
-
*/
|
|
79
|
-
get eta() {
|
|
80
|
-
return timeDeltaToString(fromNow(this.expiry));
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
//#endregion
|
|
85
|
-
export { Fissure as t };
|
|
@@ -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 };
|
package/dist/ImgCdn-BJOdWAbU.mjs
DELETED
|
@@ -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,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,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 };
|