warframe-worldstate-data 3.1.10 → 3.1.11
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/.nycrc.json +7 -0
- package/biome.json +1 -1
- package/dist/{exports-CZKY8idU.d.mts → exports-BaguOygr.d.mts} +1 -1
- package/dist/exports-M2P8p7tW.mjs +78 -0
- package/dist/exports.d.mts +2 -2
- package/dist/exports.mjs +2 -2
- package/dist/{safeImport-D7h_Y_6K.mjs → safeImport-CE5wf6im.mjs} +3 -5
- package/dist/safeImport.d.mts +2 -2
- package/dist/safeImport.mjs +2 -2
- package/dist/{timeDate-Cpr1zckd.d.mts → timeDate-CWdYuKRw.d.mts} +9 -5
- package/dist/{timeDate-CgKkhsih.mjs → timeDate-Dr-FUBZ2.mjs} +5 -5
- package/dist/tools/timeDate.d.mts +2 -2
- package/dist/tools/timeDate.mjs +2 -2
- package/dist/tools/translation.d.mts +3 -3
- package/dist/tools/translation.mjs +3 -3
- package/dist/tools/utilities.d.mts +5 -6
- package/dist/tools/utilities.mjs +5 -6
- package/dist/{translation-aFS3KGXn.mjs → translation-B1nyVzj0.mjs} +1 -1
- package/dist/{translation-Dl9Sx9Td.d.mts → translation-DfnYeyoz.d.mts} +2 -2
- package/dist/types.d.mts +1 -1
- package/exports.ts +1 -1
- package/package.json +9 -8
- package/safeImport.ts +5 -6
- package/tools/timeDate.ts +5 -5
- package/tools/utilities.ts +2 -1
- package/tsdown.config.ts +2 -2
- package/.c8rc.json +0 -5
- package/dist/exports-DvjlJ_m2.mjs +0 -78
- package/dist/integrity-B8tf4op5.d.mts +0 -9
- package/dist/integrity-l9XvAM5B.mjs +0 -15
- package/dist/tools/integrity.d.mts +0 -2
- package/dist/tools/integrity.mjs +0 -3
- package/tools/integrity.ts +0 -16
- /package/dist/{types-3hUBzsIn.d.mts → types-BambsMUW.d.mts} +0 -0
package/.nycrc.json
ADDED
package/biome.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SolNode, i as Events, l as SynthesisTarget, n as ArchonShard, o as SortieData, r as Conclave, s as SteelPath, t as Arcane } from "./types-
|
|
1
|
+
import { a as SolNode, i as Events, l as SynthesisTarget, n as ArchonShard, o as SortieData, r as Conclave, s as SteelPath, t as Arcane } from "./types-BambsMUW.mjs";
|
|
2
2
|
|
|
3
3
|
//#region exports.d.ts
|
|
4
4
|
type Locale = 'de' | 'en' | 'es' | 'fr' | 'it' | 'ko' | 'pl' | 'pt' | 'ru' | 'zh' | 'cs' | 'sr' | 'uk';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { t as safeImport } from "./safeImport-CE5wf6im.mjs";
|
|
2
|
+
|
|
3
|
+
//#region exports.ts
|
|
4
|
+
const locales = [
|
|
5
|
+
"de",
|
|
6
|
+
"es",
|
|
7
|
+
"fr",
|
|
8
|
+
"it",
|
|
9
|
+
"ko",
|
|
10
|
+
"pl",
|
|
11
|
+
"pt",
|
|
12
|
+
"ru",
|
|
13
|
+
"zh",
|
|
14
|
+
"cs",
|
|
15
|
+
"sr",
|
|
16
|
+
"uk"
|
|
17
|
+
];
|
|
18
|
+
const makeBundle = async () => {
|
|
19
|
+
/**
|
|
20
|
+
* English United States translations bundle,
|
|
21
|
+
* default translations
|
|
22
|
+
* @type {WorldstateLangBundle}
|
|
23
|
+
*/
|
|
24
|
+
const enUS = {
|
|
25
|
+
arcanes: await safeImport("./data/arcanes.json"),
|
|
26
|
+
archonShards: await safeImport("./data/archonShards.json"),
|
|
27
|
+
conclave: await safeImport("./data/conclaveData.json"),
|
|
28
|
+
events: await safeImport("./data/eventsData.json"),
|
|
29
|
+
factions: await safeImport("./data/factionsData.json"),
|
|
30
|
+
fissureModifiers: await safeImport("./data/fissureModifiers.json"),
|
|
31
|
+
languages: await safeImport("./data/languages.json"),
|
|
32
|
+
missionTypes: await safeImport("./data/missionTypes.json"),
|
|
33
|
+
operationTypes: await safeImport("./data/operationTypes.json"),
|
|
34
|
+
persistentEnemy: await safeImport("./data/persistentEnemyData.json"),
|
|
35
|
+
solNodes: await safeImport("./data/solNodes.json"),
|
|
36
|
+
sortie: await safeImport("./data/sortieData.json"),
|
|
37
|
+
syndicates: await safeImport("./data/syndicatesData.json"),
|
|
38
|
+
tutorials: await safeImport("./data/tutorials.json"),
|
|
39
|
+
upgradeTypes: await safeImport("./data/upgradeTypes.json"),
|
|
40
|
+
synthTargets: await safeImport("./data/synthTargets.json"),
|
|
41
|
+
steelPath: await safeImport("./data/steelPath.json")
|
|
42
|
+
};
|
|
43
|
+
const bundle = {
|
|
44
|
+
en: enUS,
|
|
45
|
+
...enUS,
|
|
46
|
+
locales
|
|
47
|
+
};
|
|
48
|
+
for await (const locale of locales)
|
|
49
|
+
/**
|
|
50
|
+
* Translations bundle for $locale
|
|
51
|
+
* @type {WorldstateLangBundle}
|
|
52
|
+
*/
|
|
53
|
+
bundle[locale] = {
|
|
54
|
+
arcanes: await safeImport(`./data/${locale}/arcanes.json`, enUS.arcanes),
|
|
55
|
+
archonShards: await safeImport(`./data/${locale}/archonShards.json`, enUS.archonShards),
|
|
56
|
+
conclave: await safeImport(`./data/${locale}/conclaveData.json`, enUS.conclave),
|
|
57
|
+
events: await safeImport(`./data/${locale}/eventsData.json`, enUS.events),
|
|
58
|
+
factions: await safeImport(`./data/${locale}/factionsData.json`, enUS.factions),
|
|
59
|
+
fissureModifiers: await safeImport(`./data/${locale}/fissureModifiers.json`, enUS.fissureModifiers),
|
|
60
|
+
languages: await safeImport(`./data/${locale}/languages.json`, enUS.languages),
|
|
61
|
+
missionTypes: await safeImport(`./data/${locale}/missionTypes.json`, enUS.missionTypes),
|
|
62
|
+
operationTypes: await safeImport(`./data/${locale}/operationTypes.json`, enUS.operationTypes),
|
|
63
|
+
persistentEnemy: await safeImport(`./data/${locale}/persistentEnemyData.json`, enUS.persistentEnemy),
|
|
64
|
+
solNodes: await safeImport(`./data/${locale}/solNodes.json`, enUS.solNodes),
|
|
65
|
+
sortie: await safeImport(`./data/${locale}/sortieData.json`, enUS.sortie),
|
|
66
|
+
syndicates: await safeImport(`./data/${locale}/syndicatesData.json`, enUS.syndicates),
|
|
67
|
+
tutorials: await safeImport(`./data/${locale}/tutorials.json`, enUS.tutorials),
|
|
68
|
+
upgradeTypes: await safeImport(`./data/${locale}/upgradeTypes.json`, enUS.upgradeTypes),
|
|
69
|
+
synthTargets: await safeImport(`./data/${locale}/synthTargets.json`, enUS.synthTargets),
|
|
70
|
+
steelPath: await safeImport(`./data/${locale}/steelPath.json`, enUS.steelPath)
|
|
71
|
+
};
|
|
72
|
+
locales.push("en");
|
|
73
|
+
return bundle;
|
|
74
|
+
};
|
|
75
|
+
var exports_default = await makeBundle();
|
|
76
|
+
|
|
77
|
+
//#endregion
|
|
78
|
+
export { exports_default as t };
|
package/dist/exports.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./types-
|
|
2
|
-
import { n as WorldstateLangBundle, r as _default, t as Locale } from "./exports-
|
|
1
|
+
import "./types-BambsMUW.mjs";
|
|
2
|
+
import { n as WorldstateLangBundle, r as _default, t as Locale } from "./exports-BaguOygr.mjs";
|
|
3
3
|
export { Locale, WorldstateLangBundle, _default as default };
|
package/dist/exports.mjs
CHANGED
|
@@ -7,15 +7,13 @@
|
|
|
7
7
|
*/
|
|
8
8
|
const safeImport = async (path, fallback = {}) => {
|
|
9
9
|
try {
|
|
10
|
-
const mod =
|
|
11
|
-
|
|
12
|
-
return mod;
|
|
10
|
+
const mod = path.includes(".json") ? await import(path, { with: { type: "json" } }) : await import(path);
|
|
11
|
+
return "default" in mod ? mod.default : mod;
|
|
13
12
|
} catch (error) {
|
|
14
13
|
if ((process.env.LOG_LEVEL || "ERROR").toUpperCase() === "DEBUG") console.debug(`Failed to load module at ${path} ... returning fallback`);
|
|
15
14
|
return fallback;
|
|
16
15
|
}
|
|
17
16
|
};
|
|
18
|
-
var safeImport_default = safeImport;
|
|
19
17
|
|
|
20
18
|
//#endregion
|
|
21
|
-
export {
|
|
19
|
+
export { safeImport as t };
|
package/dist/safeImport.d.mts
CHANGED
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
* @param {Object} fallback fallback response if error or no module
|
|
6
6
|
* @returns {Promise<any>} module or the default object
|
|
7
7
|
*/
|
|
8
|
-
declare const safeImport: <T>(path: string, fallback?: T) => Promise<T>;
|
|
8
|
+
declare const safeImport: <T extends object>(path: string, fallback?: T) => Promise<T>;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { safeImport
|
|
10
|
+
export { safeImport };
|
package/dist/safeImport.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as safeImport } from "./safeImport-CE5wf6im.mjs";
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { safeImport };
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
//#region tools/timeDate.d.ts
|
|
2
|
+
declare const pieceIsSmoller: (seconds: number, ceiling: number, label: string, timePieces: string[]) => {
|
|
3
|
+
seconds: number;
|
|
4
|
+
timePieces: string[];
|
|
5
|
+
};
|
|
2
6
|
/**
|
|
3
7
|
* @param {number} millis The number of milliseconds in the time delta
|
|
4
8
|
* @returns {string} formatted time delta
|
|
@@ -32,14 +36,14 @@ declare const parseDate: (d?: ContentTimestamp) => Date;
|
|
|
32
36
|
/**
|
|
33
37
|
* Get a weekly reset timestamp
|
|
34
38
|
*/
|
|
35
|
-
declare const weeklyReset: () => {
|
|
39
|
+
declare const weeklyReset: (nowFunc?: () => Date) => {
|
|
36
40
|
activation: Date;
|
|
37
41
|
expiry: Date;
|
|
38
42
|
};
|
|
39
43
|
/**
|
|
40
44
|
* Get a daily reset timestamp
|
|
41
45
|
*/
|
|
42
|
-
declare const dailyReset: () => {
|
|
46
|
+
declare const dailyReset: (nowFunc?: () => Date) => {
|
|
43
47
|
activation: Date;
|
|
44
48
|
expiry: Date;
|
|
45
49
|
};
|
|
@@ -57,14 +61,14 @@ declare const _default: {
|
|
|
57
61
|
fromNow: (d: Date, now?: () => number) => number;
|
|
58
62
|
toNow: (d: Date, now?: () => number) => number;
|
|
59
63
|
parseDate: (d?: ContentTimestamp) => Date;
|
|
60
|
-
dailyReset: () => {
|
|
64
|
+
dailyReset: (nowFunc?: () => Date) => {
|
|
61
65
|
activation: Date;
|
|
62
66
|
expiry: Date;
|
|
63
67
|
};
|
|
64
|
-
weeklyReset: () => {
|
|
68
|
+
weeklyReset: (nowFunc?: () => Date) => {
|
|
65
69
|
activation: Date;
|
|
66
70
|
expiry: Date;
|
|
67
71
|
};
|
|
68
72
|
};
|
|
69
73
|
//#endregion
|
|
70
|
-
export { parseDate as a,
|
|
74
|
+
export { parseDate as a, toNow as c, fromNow as i, weeklyReset as l, _default as n, pieceIsSmoller as o, dailyReset as r, timeDeltaToString as s, ContentTimestamp as t };
|
|
@@ -57,8 +57,8 @@ const parseDate = (d) => {
|
|
|
57
57
|
/**
|
|
58
58
|
* Get a weekly reset timestamp
|
|
59
59
|
*/
|
|
60
|
-
const weeklyReset = () => {
|
|
61
|
-
const now =
|
|
60
|
+
const weeklyReset = (nowFunc = () => /* @__PURE__ */ new Date()) => {
|
|
61
|
+
const now = nowFunc();
|
|
62
62
|
const currentDay = now.getUTCDay();
|
|
63
63
|
const daysUntilNextMonday = currentDay === 0 ? 1 : 8 - currentDay;
|
|
64
64
|
const expiry = new Date(now.getTime());
|
|
@@ -74,8 +74,8 @@ const weeklyReset = () => {
|
|
|
74
74
|
/**
|
|
75
75
|
* Get a daily reset timestamp
|
|
76
76
|
*/
|
|
77
|
-
const dailyReset = () => {
|
|
78
|
-
const now =
|
|
77
|
+
const dailyReset = (nowFunc = () => /* @__PURE__ */ new Date()) => {
|
|
78
|
+
const now = nowFunc();
|
|
79
79
|
const activation = new Date(now.getTime());
|
|
80
80
|
activation.setUTCHours(0, 0, 0, 0);
|
|
81
81
|
const expiry = new Date(now.getTime());
|
|
@@ -105,4 +105,4 @@ var timeDate_default = {
|
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
//#endregion
|
|
108
|
-
export {
|
|
108
|
+
export { timeDate_default as a, weeklyReset as c, pieceIsSmoller as i, fromNow as n, timeDeltaToString as o, parseDate as r, toNow as s, dailyReset as t };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as parseDate, c as
|
|
2
|
-
export { ContentTimestamp, dailyReset, _default as default, fromNow, parseDate, timeDeltaToString, toNow, weeklyReset };
|
|
1
|
+
import { a as parseDate, c as toNow, i as fromNow, l as weeklyReset, n as _default, o as pieceIsSmoller, r as dailyReset, s as timeDeltaToString, t as ContentTimestamp } from "../timeDate-CWdYuKRw.mjs";
|
|
2
|
+
export { ContentTimestamp, dailyReset, _default as default, fromNow, parseDate, pieceIsSmoller, timeDeltaToString, toNow, weeklyReset };
|
package/dist/tools/timeDate.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as timeDate_default, c as weeklyReset, i as pieceIsSmoller, n as fromNow, o as timeDeltaToString, r as parseDate, s as toNow, t as dailyReset } from "../timeDate-Dr-FUBZ2.mjs";
|
|
2
2
|
|
|
3
|
-
export { dailyReset, timeDate_default as default, fromNow, parseDate, timeDeltaToString, toNow, weeklyReset };
|
|
3
|
+
export { dailyReset, timeDate_default as default, fromNow, parseDate, pieceIsSmoller, timeDeltaToString, toNow, weeklyReset };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import "../exports-
|
|
3
|
-
import { A as translateCalendarEvent, C as sortieModDesc, D as syndicate, E as steelPath, M as translatePolarity, N as translateSeason, O as toTitleCase, P as upgrade, S as sortieFaction, T as splitResourceName, _ as nodeMissionType, a as conclaveCategory, b as region, c as faction, d as languageDesc, f as languageString, g as nodeEnemy, h as node, i as archonShardUpgradeType, j as translateFocus, k as translateArchimedeaType, l as fissureModifier, m as missionType, n as archonShard, o as conclaveChallenge, p as lastResourceName, r as archonShardColor, s as conclaveMode, t as _default, u as fissureTier, v as operation, w as sortieModifier, x as sortieBoss, y as operationSymbol } from "../translation-
|
|
1
|
+
import "../types-BambsMUW.mjs";
|
|
2
|
+
import "../exports-BaguOygr.mjs";
|
|
3
|
+
import { A as translateCalendarEvent, C as sortieModDesc, D as syndicate, E as steelPath, M as translatePolarity, N as translateSeason, O as toTitleCase, P as upgrade, S as sortieFaction, T as splitResourceName, _ as nodeMissionType, a as conclaveCategory, b as region, c as faction, d as languageDesc, f as languageString, g as nodeEnemy, h as node, i as archonShardUpgradeType, j as translateFocus, k as translateArchimedeaType, l as fissureModifier, m as missionType, n as archonShard, o as conclaveChallenge, p as lastResourceName, r as archonShardColor, s as conclaveMode, t as _default, u as fissureTier, v as operation, w as sortieModifier, x as sortieBoss, y as operationSymbol } from "../translation-DfnYeyoz.mjs";
|
|
4
4
|
export { archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, _default as default, faction, fissureModifier, fissureTier, languageDesc, languageString, lastResourceName, missionType, node, nodeEnemy, nodeMissionType, operation, operationSymbol, region, sortieBoss, sortieFaction, sortieModDesc, sortieModifier, splitResourceName, steelPath, syndicate, toTitleCase, translateArchimedeaType, translateCalendarEvent, translateFocus, translatePolarity, translateSeason, upgrade };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../safeImport-
|
|
2
|
-
import "../exports-
|
|
3
|
-
import { A as translateFocus, C as sortieModifier, D as toTitleCase, E as syndicate, M as translateSeason, N as translation_default, O as translateArchimedeaType, P as upgrade, S as sortieModDesc, T as steelPath, _ as operation, a as conclaveChallenge, b as sortieBoss, c as fissureModifier, d as languageString, f as lastResourceName, g as nodeMissionType, h as nodeEnemy, i as conclaveCategory, j as translatePolarity, k as translateCalendarEvent, l as fissureTier, m as node, n as archonShardColor, o as conclaveMode, p as missionType, r as archonShardUpgradeType, s as faction, t as archonShard, u as languageDesc, v as operationSymbol, w as splitResourceName, x as sortieFaction, y as region } from "../translation-
|
|
1
|
+
import "../safeImport-CE5wf6im.mjs";
|
|
2
|
+
import "../exports-M2P8p7tW.mjs";
|
|
3
|
+
import { A as translateFocus, C as sortieModifier, D as toTitleCase, E as syndicate, M as translateSeason, N as translation_default, O as translateArchimedeaType, P as upgrade, S as sortieModDesc, T as steelPath, _ as operation, a as conclaveChallenge, b as sortieBoss, c as fissureModifier, d as languageString, f as lastResourceName, g as nodeMissionType, h as nodeEnemy, i as conclaveCategory, j as translatePolarity, k as translateCalendarEvent, l as fissureTier, m as node, n as archonShardColor, o as conclaveMode, p as missionType, r as archonShardUpgradeType, s as faction, t as archonShard, u as languageDesc, v as operationSymbol, w as splitResourceName, x as sortieFaction, y as region } from "../translation-B1nyVzj0.mjs";
|
|
4
4
|
|
|
5
5
|
export { archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, translation_default as default, faction, fissureModifier, fissureTier, languageDesc, languageString, lastResourceName, missionType, node, nodeEnemy, nodeMissionType, operation, operationSymbol, region, sortieBoss, sortieFaction, sortieModDesc, sortieModifier, splitResourceName, steelPath, syndicate, toTitleCase, translateArchimedeaType, translateCalendarEvent, translateFocus, translatePolarity, translateSeason, upgrade };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import "../types-
|
|
2
|
-
import "../exports-
|
|
3
|
-
import { t as
|
|
4
|
-
import { a as
|
|
5
|
-
|
|
6
|
-
export { ContentTimestamp, archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, dailyReset, faction, fissureModifier, fissureTier, fromNow, insist, languageDesc, languageString, lastResourceName, missionType, node, nodeEnemy, nodeMissionType, operation, operationSymbol, parseDate, region, sortieBoss, sortieFaction, sortieModDesc, sortieModifier, splitResourceName, steelPath, syndicate, timeDeltaToString, toNow, toTitleCase, translateArchimedeaType, translateCalendarEvent, translateFocus, translatePolarity, translateSeason, upgrade, weeklyReset };
|
|
1
|
+
import "../types-BambsMUW.mjs";
|
|
2
|
+
import "../exports-BaguOygr.mjs";
|
|
3
|
+
import { a as parseDate, c as toNow, i as fromNow, l as weeklyReset, o as pieceIsSmoller, r as dailyReset, s as timeDeltaToString, t as ContentTimestamp } from "../timeDate-CWdYuKRw.mjs";
|
|
4
|
+
import { A as translateCalendarEvent, C as sortieModDesc, D as syndicate, E as steelPath, M as translatePolarity, N as translateSeason, O as toTitleCase, P as upgrade, S as sortieFaction, T as splitResourceName, _ as nodeMissionType, a as conclaveCategory, b as region, c as faction, d as languageDesc, f as languageString, g as nodeEnemy, h as node, i as archonShardUpgradeType, j as translateFocus, k as translateArchimedeaType, l as fissureModifier, m as missionType, n as archonShard, o as conclaveChallenge, p as lastResourceName, r as archonShardColor, s as conclaveMode, u as fissureTier, v as operation, w as sortieModifier, x as sortieBoss, y as operationSymbol } from "../translation-DfnYeyoz.mjs";
|
|
5
|
+
export { ContentTimestamp, archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, dailyReset, faction, fissureModifier, fissureTier, fromNow, languageDesc, languageString, lastResourceName, missionType, node, nodeEnemy, nodeMissionType, operation, operationSymbol, parseDate, pieceIsSmoller, region, sortieBoss, sortieFaction, sortieModDesc, sortieModifier, splitResourceName, steelPath, syndicate, timeDeltaToString, toNow, toTitleCase, translateArchimedeaType, translateCalendarEvent, translateFocus, translatePolarity, translateSeason, upgrade, weeklyReset };
|
package/dist/tools/utilities.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import "../safeImport-
|
|
2
|
-
import "../exports-
|
|
3
|
-
import { t as
|
|
4
|
-
import { a as
|
|
5
|
-
import { A as translateFocus, C as sortieModifier, D as toTitleCase, E as syndicate, M as translateSeason, O as translateArchimedeaType, P as upgrade, S as sortieModDesc, T as steelPath, _ as operation, a as conclaveChallenge, b as sortieBoss, c as fissureModifier, d as languageString, f as lastResourceName, g as nodeMissionType, h as nodeEnemy, i as conclaveCategory, j as translatePolarity, k as translateCalendarEvent, l as fissureTier, m as node, n as archonShardColor, o as conclaveMode, p as missionType, r as archonShardUpgradeType, s as faction, t as archonShard, u as languageDesc, v as operationSymbol, w as splitResourceName, x as sortieFaction, y as region } from "../translation-aFS3KGXn.mjs";
|
|
1
|
+
import "../safeImport-CE5wf6im.mjs";
|
|
2
|
+
import "../exports-M2P8p7tW.mjs";
|
|
3
|
+
import { c as weeklyReset, i as pieceIsSmoller, n as fromNow, o as timeDeltaToString, r as parseDate, s as toNow, t as dailyReset } from "../timeDate-Dr-FUBZ2.mjs";
|
|
4
|
+
import { A as translateFocus, C as sortieModifier, D as toTitleCase, E as syndicate, M as translateSeason, O as translateArchimedeaType, P as upgrade, S as sortieModDesc, T as steelPath, _ as operation, a as conclaveChallenge, b as sortieBoss, c as fissureModifier, d as languageString, f as lastResourceName, g as nodeMissionType, h as nodeEnemy, i as conclaveCategory, j as translatePolarity, k as translateCalendarEvent, l as fissureTier, m as node, n as archonShardColor, o as conclaveMode, p as missionType, r as archonShardUpgradeType, s as faction, t as archonShard, u as languageDesc, v as operationSymbol, w as splitResourceName, x as sortieFaction, y as region } from "../translation-B1nyVzj0.mjs";
|
|
6
5
|
|
|
7
|
-
export { archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, dailyReset, faction, fissureModifier, fissureTier, fromNow,
|
|
6
|
+
export { archonShard, archonShardColor, archonShardUpgradeType, conclaveCategory, conclaveChallenge, conclaveMode, dailyReset, faction, fissureModifier, fissureTier, fromNow, languageDesc, languageString, lastResourceName, missionType, node, nodeEnemy, nodeMissionType, operation, operationSymbol, parseDate, pieceIsSmoller, region, sortieBoss, sortieFaction, sortieModDesc, sortieModifier, splitResourceName, steelPath, syndicate, timeDeltaToString, toNow, toTitleCase, translateArchimedeaType, translateCalendarEvent, translateFocus, translatePolarity, translateSeason, upgrade, weeklyReset };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ArchonShard, s as SteelPath } from "./types-
|
|
2
|
-
import { t as Locale } from "./exports-
|
|
1
|
+
import { n as ArchonShard, s as SteelPath } from "./types-BambsMUW.mjs";
|
|
2
|
+
import { t as Locale } from "./exports-BaguOygr.mjs";
|
|
3
3
|
|
|
4
4
|
//#region tools/translation.d.ts
|
|
5
5
|
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SolNode, c as SteelPathOffering, i as Events, l as SynthesisTarget, n as ArchonShard, o as SortieData, r as Conclave, s as SteelPath, t as Arcane } from "./types-
|
|
1
|
+
import { a as SolNode, c as SteelPathOffering, i as Events, l as SynthesisTarget, n as ArchonShard, o as SortieData, r as Conclave, s as SteelPath, t as Arcane } from "./types-BambsMUW.mjs";
|
|
2
2
|
export { Arcane, ArchonShard, Conclave, Events, SolNode, SortieData, SteelPath, SteelPathOffering, SynthesisTarget };
|
package/exports.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import safeImport from './safeImport';
|
|
1
|
+
import { safeImport } from './safeImport';
|
|
2
2
|
import { Arcane, ArchonShard, Conclave, Events, SolNode, SortieData, SteelPath, SynthesisTarget } from './types';
|
|
3
3
|
|
|
4
4
|
export type Locale = 'de' | 'en' | 'es' | 'fr' | 'it' | 'ko' | 'pl' | 'pt' | 'ru' | 'zh' | 'cs' | 'sr' | 'uk';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "warframe-worldstate-data",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.11",
|
|
4
4
|
"description": "Warframe data for use with warframe-worldstate-parser",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"warframe-worldstate",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
],
|
|
37
37
|
"type": "module",
|
|
38
38
|
"exports": {
|
|
39
|
-
".": "./dist/exports.
|
|
40
|
-
"./utilities": "./dist/tools/utilities.
|
|
41
|
-
"./types": "./dist/types.
|
|
39
|
+
".": "./dist/exports.mjs",
|
|
40
|
+
"./utilities": "./dist/tools/utilities.mjs",
|
|
41
|
+
"./types": "./dist/types.mjs"
|
|
42
42
|
},
|
|
43
|
-
"main": "./dist/exports.
|
|
43
|
+
"main": "./dist/exports.mjs",
|
|
44
44
|
"directories": {
|
|
45
45
|
"test": "test"
|
|
46
46
|
},
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"prepare": "husky && npx install-peerdeps @wfcd/eslint-config@latest -S",
|
|
52
52
|
"prepublishOnly": "npm run build",
|
|
53
53
|
"sort": "tsx ./tools/sortLanguages.ts",
|
|
54
|
-
"test": "
|
|
55
|
-
"test:cov": "npm test &&
|
|
54
|
+
"test": "nyc mocha",
|
|
55
|
+
"test:cov": "npm test && nyc report --reporter=text-lcov | npx coveralls",
|
|
56
56
|
"validate": "npm run lint:fix && npm run test && git add -u ."
|
|
57
57
|
},
|
|
58
58
|
"prettier": "@wfcd/eslint-config/prettier",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"@biomejs/biome": "2.3.6",
|
|
66
66
|
"@commitlint/cli": "^20.0.0",
|
|
67
67
|
"@commitlint/config-conventional": "^20.0.0",
|
|
68
|
+
"@istanbuljs/nyc-config-typescript": "^1.0.2",
|
|
68
69
|
"@types/chai": "^5.0.0",
|
|
69
70
|
"@types/mocha": "^10.0.10",
|
|
70
71
|
"@types/node": "^24.0.7",
|
|
@@ -73,13 +74,13 @@
|
|
|
73
74
|
"@types/yargs": "^17.0.33",
|
|
74
75
|
"ajv": "^8.17.1",
|
|
75
76
|
"ajv-formats": "^3.0.1",
|
|
76
|
-
"c8": "^10.1.3",
|
|
77
77
|
"chai": "^6.0.1",
|
|
78
78
|
"chai-json": "^1.0.0",
|
|
79
79
|
"chai-json-schema-ajv": "^5.2.4",
|
|
80
80
|
"husky": "^9.0.11",
|
|
81
81
|
"lint-staged": "^16.0.0",
|
|
82
82
|
"mocha": "^11.7.1",
|
|
83
|
+
"nyc": "^17.1.0",
|
|
83
84
|
"prettier": "^3.6.2",
|
|
84
85
|
"sinon": "^21.0.0",
|
|
85
86
|
"sinon-chai": "^4.0.0",
|
package/safeImport.ts
CHANGED
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
* @param {Object} fallback fallback response if error or no module
|
|
8
8
|
* @returns {Promise<any>} module or the default object
|
|
9
9
|
*/
|
|
10
|
-
const safeImport = async <T>(path: string, fallback: T = {} as T): Promise<T> => {
|
|
10
|
+
export const safeImport = async <T extends object>(path: string, fallback: T = {} as T): Promise<T> => {
|
|
11
11
|
try {
|
|
12
|
-
const mod:
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
const mod: T | { default: T } = path.includes('.json')
|
|
13
|
+
? await import(path, { with: { type: 'json' } })
|
|
14
|
+
: await import(path);
|
|
15
|
+
return 'default' in mod ? (mod as { default: T }).default : (mod as T);
|
|
15
16
|
} catch (error) {
|
|
16
17
|
if ((process.env.LOG_LEVEL || 'ERROR').toUpperCase() === 'DEBUG') {
|
|
17
|
-
// eslint-disable-next-line no-console
|
|
18
18
|
console.debug(`Failed to load module at ${path} ... returning fallback`);
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -22,4 +22,3 @@ const safeImport = async <T>(path: string, fallback: T = {} as T): Promise<T> =>
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
|
|
25
|
-
export default safeImport;
|
package/tools/timeDate.ts
CHANGED
|
@@ -4,7 +4,7 @@ const epochZero: ContentTimestamp = {
|
|
|
4
4
|
},
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
const pieceIsSmoller = (seconds: number, ceiling: number, label: string, timePieces: string[]) => {
|
|
7
|
+
export const pieceIsSmoller = (seconds: number, ceiling: number, label: string, timePieces: string[]) => {
|
|
8
8
|
if (seconds >= ceiling) {
|
|
9
9
|
timePieces.push(`${Math.floor(seconds / ceiling)}${label}`);
|
|
10
10
|
seconds = Math.floor(seconds) % ceiling;
|
|
@@ -79,8 +79,8 @@ export const parseDate = (d?: ContentTimestamp): Date => {
|
|
|
79
79
|
/**
|
|
80
80
|
* Get a weekly reset timestamp
|
|
81
81
|
*/
|
|
82
|
-
export const weeklyReset = (): { activation: Date; expiry: Date } => {
|
|
83
|
-
const now =
|
|
82
|
+
export const weeklyReset = (nowFunc = () => new Date()): { activation: Date; expiry: Date } => {
|
|
83
|
+
const now = nowFunc();
|
|
84
84
|
const currentDay = now.getUTCDay();
|
|
85
85
|
const daysUntilNextMonday = currentDay === 0 ? 1 : 8 - currentDay;
|
|
86
86
|
|
|
@@ -97,8 +97,8 @@ export const weeklyReset = (): { activation: Date; expiry: Date } => {
|
|
|
97
97
|
/**
|
|
98
98
|
* Get a daily reset timestamp
|
|
99
99
|
*/
|
|
100
|
-
export const dailyReset = (): { activation: Date; expiry: Date } => {
|
|
101
|
-
const now =
|
|
100
|
+
export const dailyReset = (nowFunc = () => new Date()): { activation: Date; expiry: Date } => {
|
|
101
|
+
const now = nowFunc();
|
|
102
102
|
|
|
103
103
|
const activation = new Date(now.getTime());
|
|
104
104
|
activation.setUTCHours(0, 0, 0, 0);
|
package/tools/utilities.ts
CHANGED
package/tsdown.config.ts
CHANGED
|
@@ -5,11 +5,11 @@ export default defineConfig({
|
|
|
5
5
|
'exports.ts',
|
|
6
6
|
'safeImport.ts',
|
|
7
7
|
'types.ts',
|
|
8
|
-
'./tools/integrity.ts',
|
|
9
8
|
'./tools/timeDate.ts',
|
|
10
9
|
'./tools/translation.ts',
|
|
11
10
|
'./tools/utilities.ts',
|
|
12
11
|
],
|
|
13
12
|
copy: ['./data'],
|
|
14
|
-
dts: true
|
|
13
|
+
dts: true,
|
|
14
|
+
format: 'esm',
|
|
15
15
|
});
|
package/.c8rc.json
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { t as safeImport_default } from "./safeImport-D7h_Y_6K.mjs";
|
|
2
|
-
|
|
3
|
-
//#region exports.ts
|
|
4
|
-
const locales = [
|
|
5
|
-
"de",
|
|
6
|
-
"es",
|
|
7
|
-
"fr",
|
|
8
|
-
"it",
|
|
9
|
-
"ko",
|
|
10
|
-
"pl",
|
|
11
|
-
"pt",
|
|
12
|
-
"ru",
|
|
13
|
-
"zh",
|
|
14
|
-
"cs",
|
|
15
|
-
"sr",
|
|
16
|
-
"uk"
|
|
17
|
-
];
|
|
18
|
-
const makeBundle = async () => {
|
|
19
|
-
/**
|
|
20
|
-
* English United States translations bundle,
|
|
21
|
-
* default translations
|
|
22
|
-
* @type {WorldstateLangBundle}
|
|
23
|
-
*/
|
|
24
|
-
const enUS = {
|
|
25
|
-
arcanes: await safeImport_default("./data/arcanes.json"),
|
|
26
|
-
archonShards: await safeImport_default("./data/archonShards.json"),
|
|
27
|
-
conclave: await safeImport_default("./data/conclaveData.json"),
|
|
28
|
-
events: await safeImport_default("./data/eventsData.json"),
|
|
29
|
-
factions: await safeImport_default("./data/factionsData.json"),
|
|
30
|
-
fissureModifiers: await safeImport_default("./data/fissureModifiers.json"),
|
|
31
|
-
languages: await safeImport_default("./data/languages.json"),
|
|
32
|
-
missionTypes: await safeImport_default("./data/missionTypes.json"),
|
|
33
|
-
operationTypes: await safeImport_default("./data/operationTypes.json"),
|
|
34
|
-
persistentEnemy: await safeImport_default("./data/persistentEnemyData.json"),
|
|
35
|
-
solNodes: await safeImport_default("./data/solNodes.json"),
|
|
36
|
-
sortie: await safeImport_default("./data/sortieData.json"),
|
|
37
|
-
syndicates: await safeImport_default("./data/syndicatesData.json"),
|
|
38
|
-
tutorials: await safeImport_default("./data/tutorials.json"),
|
|
39
|
-
upgradeTypes: await safeImport_default("./data/upgradeTypes.json"),
|
|
40
|
-
synthTargets: await safeImport_default("./data/synthTargets.json"),
|
|
41
|
-
steelPath: await safeImport_default("./data/steelPath.json")
|
|
42
|
-
};
|
|
43
|
-
const bundle = {
|
|
44
|
-
en: enUS,
|
|
45
|
-
...enUS,
|
|
46
|
-
locales
|
|
47
|
-
};
|
|
48
|
-
for await (const locale of locales)
|
|
49
|
-
/**
|
|
50
|
-
* Translations bundle for $locale
|
|
51
|
-
* @type {WorldstateLangBundle}
|
|
52
|
-
*/
|
|
53
|
-
bundle[locale] = {
|
|
54
|
-
arcanes: await safeImport_default(`./data/${locale}/arcanes.json`, enUS.arcanes),
|
|
55
|
-
archonShards: await safeImport_default(`./data/${locale}/archonShards.json`, enUS.archonShards),
|
|
56
|
-
conclave: await safeImport_default(`./data/${locale}/conclaveData.json`, enUS.conclave),
|
|
57
|
-
events: await safeImport_default(`./data/${locale}/eventsData.json`, enUS.events),
|
|
58
|
-
factions: await safeImport_default(`./data/${locale}/factionsData.json`, enUS.factions),
|
|
59
|
-
fissureModifiers: await safeImport_default(`./data/${locale}/fissureModifiers.json`, enUS.fissureModifiers),
|
|
60
|
-
languages: await safeImport_default(`./data/${locale}/languages.json`, enUS.languages),
|
|
61
|
-
missionTypes: await safeImport_default(`./data/${locale}/missionTypes.json`, enUS.missionTypes),
|
|
62
|
-
operationTypes: await safeImport_default(`./data/${locale}/operationTypes.json`, enUS.operationTypes),
|
|
63
|
-
persistentEnemy: await safeImport_default(`./data/${locale}/persistentEnemyData.json`, enUS.persistentEnemy),
|
|
64
|
-
solNodes: await safeImport_default(`./data/${locale}/solNodes.json`, enUS.solNodes),
|
|
65
|
-
sortie: await safeImport_default(`./data/${locale}/sortieData.json`, enUS.sortie),
|
|
66
|
-
syndicates: await safeImport_default(`./data/${locale}/syndicatesData.json`, enUS.syndicates),
|
|
67
|
-
tutorials: await safeImport_default(`./data/${locale}/tutorials.json`, enUS.tutorials),
|
|
68
|
-
upgradeTypes: await safeImport_default(`./data/${locale}/upgradeTypes.json`, enUS.upgradeTypes),
|
|
69
|
-
synthTargets: await safeImport_default(`./data/${locale}/synthTargets.json`, enUS.synthTargets),
|
|
70
|
-
steelPath: await safeImport_default(`./data/${locale}/steelPath.json`, enUS.steelPath)
|
|
71
|
-
};
|
|
72
|
-
locales.push("en");
|
|
73
|
-
return bundle;
|
|
74
|
-
};
|
|
75
|
-
var exports_default = await makeBundle();
|
|
76
|
-
|
|
77
|
-
//#endregion
|
|
78
|
-
export { exports_default as t };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region tools/integrity.d.ts
|
|
2
|
-
/**
|
|
3
|
-
* @description Insist that the provided data has the required properties.
|
|
4
|
-
* @param thing to encourage to have data
|
|
5
|
-
* @param args arguments to ensure
|
|
6
|
-
*/
|
|
7
|
-
declare const insist: (thing: Record<string, unknown>, ...args: string[]) => void;
|
|
8
|
-
//#endregion
|
|
9
|
-
export { insist as t };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region tools/integrity.ts
|
|
2
|
-
/**
|
|
3
|
-
* @description Insist that the provided data has the required properties.
|
|
4
|
-
* @param thing to encourage to have data
|
|
5
|
-
* @param args arguments to ensure
|
|
6
|
-
*/
|
|
7
|
-
const insist = (thing, ...args) => {
|
|
8
|
-
if (!thing || !Object.keys(thing).length) throw new TypeError("The provided data does not have the required properties.");
|
|
9
|
-
args.forEach((arg) => {
|
|
10
|
-
if (!thing[arg]) throw new TypeError("The provided data does not have the required properties.");
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
export { insist as t };
|
package/dist/tools/integrity.mjs
DELETED
package/tools/integrity.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @description Insist that the provided data has the required properties.
|
|
3
|
-
* @param thing to encourage to have data
|
|
4
|
-
* @param args arguments to ensure
|
|
5
|
-
*/
|
|
6
|
-
export const insist = (thing: Record<string, unknown>, ...args: string[]) => {
|
|
7
|
-
if (!thing || !Object.keys(thing).length) {
|
|
8
|
-
throw new TypeError('The provided data does not have the required properties.');
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
args.forEach((arg) => {
|
|
12
|
-
if (!thing[arg]) {
|
|
13
|
-
throw new TypeError('The provided data does not have the required properties.');
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
};
|
|
File without changes
|