@wfcd/relics 2.0.37 → 2.0.39
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/CHANGELOG.md +14 -0
- package/dist/Build.cjs +2 -3
- package/dist/Build.mjs +3 -4
- package/dist/{VersionManager--c_teh5c.mjs → VersionManager-Bd2uRI2J.mjs} +18 -27
- package/dist/{VersionManager-CcEflrXR.cjs → VersionManager-DTkzDUPy.cjs} +18 -28
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -8
- package/dist/index.d.mts +2 -8
- package/dist/index.mjs +1 -1
- package/dist/{rolldown-runtime-C0LytTxp.mjs → rolldown-runtime-BowF1xt-.mjs} +1 -2
- package/package.json +1 -1
- package/tsconfig.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [2.0.39](https://github.com/WFCD/warframe-relic-data/compare/v2.0.38...v2.0.39) (2026-11-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* set user agent in requests, fail on rejects ([#444](https://github.com/WFCD/warframe-relic-data/issues/444)) ([f6f92cc](https://github.com/WFCD/warframe-relic-data/commit/f6f92cccceb0f1bff8767ad73e824de6e26da37a))
|
|
7
|
+
|
|
8
|
+
## [2.0.38](https://github.com/WFCD/warframe-relic-data/compare/v2.0.37...v2.0.38) (2026-10-25)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **sec:** bump fast-uri from 3.1.8 to 3.1.9 ([#448](https://github.com/WFCD/warframe-relic-data/issues/448)) ([ffe6d62](https://github.com/WFCD/warframe-relic-data/commit/ffe6d62b08ffbad53d12a91150633f346cb58280))
|
|
14
|
+
|
|
1
15
|
## [2.0.37](https://github.com/WFCD/warframe-relic-data/compare/v2.0.36...v2.0.37) (2026-10-25)
|
|
2
16
|
|
|
3
17
|
|
package/dist/Build.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_VersionManager = require("./VersionManager-
|
|
2
|
-
|
|
1
|
+
const require_VersionManager = require("./VersionManager-DTkzDUPy.cjs");
|
|
2
|
+
// src/Build.ts
|
|
3
3
|
/**
|
|
4
4
|
* Entrypoint for the build process.
|
|
5
5
|
*/
|
|
@@ -17,4 +17,3 @@ async function run() {
|
|
|
17
17
|
require_VersionManager.Logger_default.log("Build finished.");
|
|
18
18
|
}
|
|
19
19
|
run().catch(require_VersionManager.Logger_default.error.bind(require_VersionManager.Logger_default));
|
|
20
|
-
//#endregion
|
package/dist/Build.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./rolldown-runtime-
|
|
2
|
-
import { n as Generator, r as Logger_default, t as VersionManager } from "./VersionManager
|
|
3
|
-
|
|
1
|
+
import "./rolldown-runtime-BowF1xt-.mjs";
|
|
2
|
+
import { n as Generator, r as Logger_default, t as VersionManager } from "./VersionManager-Bd2uRI2J.mjs";
|
|
3
|
+
// src/Build.ts
|
|
4
4
|
/**
|
|
5
5
|
* Entrypoint for the build process.
|
|
6
6
|
*/
|
|
@@ -18,5 +18,4 @@ async function run() {
|
|
|
18
18
|
Logger_default.log("Build finished.");
|
|
19
19
|
}
|
|
20
20
|
run().catch(Logger_default.error.bind(Logger_default));
|
|
21
|
-
//#endregion
|
|
22
21
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import "./rolldown-runtime-
|
|
1
|
+
import "./rolldown-runtime-BowF1xt-.mjs";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import * as console from "node:console";
|
|
5
|
-
|
|
5
|
+
// src/Config.ts
|
|
6
6
|
const Config = {
|
|
7
|
+
userAgent: `@wfcd/relics/2.0.39 (+https://github.com/WFCD/warframe-relic-data)`,
|
|
7
8
|
warframeItemByNameUrl: "https://api.warframestat.us/items/",
|
|
8
9
|
warframeItemsSparseUrl: "https://api.warframestat.us/items/?only=name,uniqueName",
|
|
9
10
|
warframeItemsUrl: "https://api.warframestat.us/items/search/Relics?by=category",
|
|
@@ -12,8 +13,14 @@ const Config = {
|
|
|
12
13
|
warframeRelicDropInfoUrl: "https://drops.warframestat.us/data/info.json",
|
|
13
14
|
warframeRelicDropUrl: "https://drops.warframestat.us/data/relics.json"
|
|
14
15
|
};
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
// src/fetch.ts
|
|
17
|
+
/**
|
|
18
|
+
* Fetch with an explicit user agent, warframe.market returns 403 with node's default.
|
|
19
|
+
* @param {string} url URL to fetch
|
|
20
|
+
* @returns {Promise<Response>} The response
|
|
21
|
+
*/
|
|
22
|
+
const fetch = (url) => globalThis.fetch(url, { headers: { "user-agent": Config.userAgent } });
|
|
23
|
+
// src/itemUniqueName.ts
|
|
17
24
|
const QTY_PREFIX = /^\d+X\s+/i;
|
|
18
25
|
const BLUEPRINT_SUFFIX = / Blueprint$/i;
|
|
19
26
|
/**
|
|
@@ -62,8 +69,7 @@ function uniqueNameRank(uniqueName) {
|
|
|
62
69
|
if (uniqueName.startsWith("/Lotus/StoreItems/")) return 1;
|
|
63
70
|
return 0;
|
|
64
71
|
}
|
|
65
|
-
|
|
66
|
-
//#region src/Logger.ts
|
|
72
|
+
// src/Logger.ts
|
|
67
73
|
const fromString = (logLevelIsh) => {
|
|
68
74
|
switch (logLevelIsh === null || logLevelIsh === void 0 ? void 0 : logLevelIsh.toLowerCase()) {
|
|
69
75
|
case "bad":
|
|
@@ -94,8 +100,7 @@ var Logger = class {
|
|
|
94
100
|
}
|
|
95
101
|
};
|
|
96
102
|
var Logger_default = new Logger();
|
|
97
|
-
|
|
98
|
-
//#region src/Generator.ts
|
|
103
|
+
// src/Generator.ts
|
|
99
104
|
var Generator = class {
|
|
100
105
|
/** Lowercase item name → uniqueName from sparse warframestat index (+ Blueprint follow-ups) */
|
|
101
106
|
itemUniqueNames;
|
|
@@ -113,28 +118,16 @@ var Generator = class {
|
|
|
113
118
|
async fetchRawData() {
|
|
114
119
|
var _await$relicRequest$j;
|
|
115
120
|
const relicRequest = await fetch(Config.warframeRelicDropUrl);
|
|
116
|
-
if (!relicRequest.ok) {
|
|
117
|
-
Logger_default.error("Failed to fetch Warframe relics from WFCD!");
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
121
|
+
if (!relicRequest.ok) Logger_default.fatal(`Failed to fetch Warframe relics from WFCD: HTTP ${relicRequest.status}`);
|
|
120
122
|
this.relicsRaw = (_await$relicRequest$j = await relicRequest.json()) === null || _await$relicRequest$j === void 0 ? void 0 : _await$relicRequest$j.relics;
|
|
121
123
|
const wfmRequest = await fetch(Config.warframeMarketItemUrl);
|
|
122
|
-
if (!wfmRequest.ok) {
|
|
123
|
-
Logger_default.error("Failed to fetch items from WFM!");
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
124
|
+
if (!wfmRequest.ok) Logger_default.fatal(`Failed to fetch items from WFM: HTTP ${wfmRequest.status}`);
|
|
126
125
|
this.wfmItems = await wfmRequest.json();
|
|
127
126
|
const wfcdItemRequest = await fetch(Config.warframeItemsUrl);
|
|
128
|
-
if (!wfcdItemRequest.ok) {
|
|
129
|
-
Logger_default.error("Failed to fetch items from WFCD! ");
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
127
|
+
if (!wfcdItemRequest.ok) Logger_default.fatal(`Failed to fetch items from WFCD: HTTP ${wfcdItemRequest.status}`);
|
|
132
128
|
this.wfcdItems = await wfcdItemRequest.json();
|
|
133
129
|
const sparseRequest = await fetch(Config.warframeItemsSparseUrl);
|
|
134
|
-
if (!sparseRequest.ok) {
|
|
135
|
-
Logger_default.error("Failed to fetch sparse items from WFCD!");
|
|
136
|
-
return;
|
|
137
|
-
}
|
|
130
|
+
if (!sparseRequest.ok) Logger_default.fatal(`Failed to fetch sparse items from WFCD: HTTP ${sparseRequest.status}`);
|
|
138
131
|
const sparseItems = await sparseRequest.json();
|
|
139
132
|
this.indexSparseItems(sparseItems);
|
|
140
133
|
}
|
|
@@ -326,8 +319,7 @@ var Generator = class {
|
|
|
326
319
|
}
|
|
327
320
|
}
|
|
328
321
|
};
|
|
329
|
-
|
|
330
|
-
//#region src/VersionManager.ts
|
|
322
|
+
// src/VersionManager.ts
|
|
331
323
|
var VersionManager = class {
|
|
332
324
|
hashPath;
|
|
333
325
|
versionPath;
|
|
@@ -390,5 +382,4 @@ var VersionManager = class {
|
|
|
390
382
|
Logger_default.debug("Finished writing version info");
|
|
391
383
|
}
|
|
392
384
|
};
|
|
393
|
-
//#endregion
|
|
394
385
|
export { Generator as n, Logger_default as r, VersionManager as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __name = (target, value) => __defProp(target, "name", {
|
|
@@ -23,15 +23,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
23
23
|
value: mod,
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
|
-
//#endregion
|
|
27
26
|
let node_fs_promises = require("node:fs/promises");
|
|
28
27
|
node_fs_promises = __toESM(node_fs_promises);
|
|
29
28
|
let node_path = require("node:path");
|
|
30
29
|
node_path = __toESM(node_path);
|
|
31
30
|
let node_console = require("node:console");
|
|
32
31
|
node_console = __toESM(node_console);
|
|
33
|
-
|
|
32
|
+
// src/Config.ts
|
|
34
33
|
const Config = {
|
|
34
|
+
userAgent: `@wfcd/relics/2.0.39 (+https://github.com/WFCD/warframe-relic-data)`,
|
|
35
35
|
warframeItemByNameUrl: "https://api.warframestat.us/items/",
|
|
36
36
|
warframeItemsSparseUrl: "https://api.warframestat.us/items/?only=name,uniqueName",
|
|
37
37
|
warframeItemsUrl: "https://api.warframestat.us/items/search/Relics?by=category",
|
|
@@ -40,8 +40,14 @@ const Config = {
|
|
|
40
40
|
warframeRelicDropInfoUrl: "https://drops.warframestat.us/data/info.json",
|
|
41
41
|
warframeRelicDropUrl: "https://drops.warframestat.us/data/relics.json"
|
|
42
42
|
};
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
// src/fetch.ts
|
|
44
|
+
/**
|
|
45
|
+
* Fetch with an explicit user agent, warframe.market returns 403 with node's default.
|
|
46
|
+
* @param {string} url URL to fetch
|
|
47
|
+
* @returns {Promise<Response>} The response
|
|
48
|
+
*/
|
|
49
|
+
const fetch = (url) => globalThis.fetch(url, { headers: { "user-agent": Config.userAgent } });
|
|
50
|
+
// src/itemUniqueName.ts
|
|
45
51
|
const QTY_PREFIX = /^\d+X\s+/i;
|
|
46
52
|
const BLUEPRINT_SUFFIX = / Blueprint$/i;
|
|
47
53
|
/**
|
|
@@ -90,8 +96,7 @@ function uniqueNameRank(uniqueName) {
|
|
|
90
96
|
if (uniqueName.startsWith("/Lotus/StoreItems/")) return 1;
|
|
91
97
|
return 0;
|
|
92
98
|
}
|
|
93
|
-
|
|
94
|
-
//#region src/Logger.ts
|
|
99
|
+
// src/Logger.ts
|
|
95
100
|
const fromString = (logLevelIsh) => {
|
|
96
101
|
switch (logLevelIsh === null || logLevelIsh === void 0 ? void 0 : logLevelIsh.toLowerCase()) {
|
|
97
102
|
case "bad":
|
|
@@ -122,8 +127,7 @@ var Logger = class {
|
|
|
122
127
|
}
|
|
123
128
|
};
|
|
124
129
|
var Logger_default = new Logger();
|
|
125
|
-
|
|
126
|
-
//#region src/Generator.ts
|
|
130
|
+
// src/Generator.ts
|
|
127
131
|
var Generator = class {
|
|
128
132
|
/** Lowercase item name → uniqueName from sparse warframestat index (+ Blueprint follow-ups) */
|
|
129
133
|
itemUniqueNames;
|
|
@@ -141,28 +145,16 @@ var Generator = class {
|
|
|
141
145
|
async fetchRawData() {
|
|
142
146
|
var _await$relicRequest$j;
|
|
143
147
|
const relicRequest = await fetch(Config.warframeRelicDropUrl);
|
|
144
|
-
if (!relicRequest.ok) {
|
|
145
|
-
Logger_default.error("Failed to fetch Warframe relics from WFCD!");
|
|
146
|
-
return;
|
|
147
|
-
}
|
|
148
|
+
if (!relicRequest.ok) Logger_default.fatal(`Failed to fetch Warframe relics from WFCD: HTTP ${relicRequest.status}`);
|
|
148
149
|
this.relicsRaw = (_await$relicRequest$j = await relicRequest.json()) === null || _await$relicRequest$j === void 0 ? void 0 : _await$relicRequest$j.relics;
|
|
149
150
|
const wfmRequest = await fetch(Config.warframeMarketItemUrl);
|
|
150
|
-
if (!wfmRequest.ok) {
|
|
151
|
-
Logger_default.error("Failed to fetch items from WFM!");
|
|
152
|
-
return;
|
|
153
|
-
}
|
|
151
|
+
if (!wfmRequest.ok) Logger_default.fatal(`Failed to fetch items from WFM: HTTP ${wfmRequest.status}`);
|
|
154
152
|
this.wfmItems = await wfmRequest.json();
|
|
155
153
|
const wfcdItemRequest = await fetch(Config.warframeItemsUrl);
|
|
156
|
-
if (!wfcdItemRequest.ok) {
|
|
157
|
-
Logger_default.error("Failed to fetch items from WFCD! ");
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
154
|
+
if (!wfcdItemRequest.ok) Logger_default.fatal(`Failed to fetch items from WFCD: HTTP ${wfcdItemRequest.status}`);
|
|
160
155
|
this.wfcdItems = await wfcdItemRequest.json();
|
|
161
156
|
const sparseRequest = await fetch(Config.warframeItemsSparseUrl);
|
|
162
|
-
if (!sparseRequest.ok) {
|
|
163
|
-
Logger_default.error("Failed to fetch sparse items from WFCD!");
|
|
164
|
-
return;
|
|
165
|
-
}
|
|
157
|
+
if (!sparseRequest.ok) Logger_default.fatal(`Failed to fetch sparse items from WFCD: HTTP ${sparseRequest.status}`);
|
|
166
158
|
const sparseItems = await sparseRequest.json();
|
|
167
159
|
this.indexSparseItems(sparseItems);
|
|
168
160
|
}
|
|
@@ -354,8 +346,7 @@ var Generator = class {
|
|
|
354
346
|
}
|
|
355
347
|
}
|
|
356
348
|
};
|
|
357
|
-
|
|
358
|
-
//#region src/VersionManager.ts
|
|
349
|
+
// src/VersionManager.ts
|
|
359
350
|
var VersionManager = class {
|
|
360
351
|
hashPath;
|
|
361
352
|
versionPath;
|
|
@@ -418,7 +409,6 @@ var VersionManager = class {
|
|
|
418
409
|
Logger_default.debug("Finished writing version info");
|
|
419
410
|
}
|
|
420
411
|
};
|
|
421
|
-
//#endregion
|
|
422
412
|
Object.defineProperty(exports, "Generator", {
|
|
423
413
|
enumerable: true,
|
|
424
414
|
get: function() {
|
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_VersionManager = require("./VersionManager-
|
|
2
|
+
const require_VersionManager = require("./VersionManager-DTkzDUPy.cjs");
|
|
3
3
|
exports.Generator = require_VersionManager.Generator;
|
|
4
4
|
exports.VersionManager = require_VersionManager.VersionManager;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
//#endregion
|
|
2
|
-
//#region src/Types.d.ts
|
|
3
1
|
export type Rarity = 'Common' | 'Legendary' | 'Rare' | 'Uncommon';
|
|
4
2
|
export interface TitaniaRelic {
|
|
5
3
|
/**
|
|
@@ -195,8 +193,6 @@ export interface WFCDSparseItem {
|
|
|
195
193
|
name: string;
|
|
196
194
|
uniqueName: string;
|
|
197
195
|
}
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region src/Generator.d.ts
|
|
200
196
|
export declare class Generator {
|
|
201
197
|
/** Lowercase item name → uniqueName from sparse warframestat index (+ Blueprint follow-ups) */
|
|
202
198
|
itemUniqueNames: Map<string, string>;
|
|
@@ -254,8 +250,6 @@ export declare class Generator {
|
|
|
254
250
|
*/
|
|
255
251
|
private resolveSpecialRewardUniqueNames;
|
|
256
252
|
}
|
|
257
|
-
//#endregion
|
|
258
|
-
//#region src/VersionManager.d.ts
|
|
259
253
|
export declare class VersionManager {
|
|
260
254
|
hashPath: string;
|
|
261
255
|
versionPath: string;
|
|
@@ -275,5 +269,4 @@ export declare class VersionManager {
|
|
|
275
269
|
* @param {number} timestamp Timestamp the build was started at
|
|
276
270
|
*/
|
|
277
271
|
writeVersion(timestamp: number): Promise<void>;
|
|
278
|
-
}
|
|
279
|
-
//#endregion
|
|
272
|
+
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { t as __name } from "./rolldown-runtime-
|
|
2
|
-
//#region src/Types.d.ts
|
|
1
|
+
import { t as __name } from "./rolldown-runtime-BowF1xt-.mjs";
|
|
3
2
|
export type Rarity = 'Common' | 'Legendary' | 'Rare' | 'Uncommon';
|
|
4
3
|
export interface TitaniaRelic {
|
|
5
4
|
/**
|
|
@@ -195,8 +194,6 @@ export interface WFCDSparseItem {
|
|
|
195
194
|
name: string;
|
|
196
195
|
uniqueName: string;
|
|
197
196
|
}
|
|
198
|
-
//#endregion
|
|
199
|
-
//#region src/Generator.d.ts
|
|
200
197
|
export declare class Generator {
|
|
201
198
|
/** Lowercase item name → uniqueName from sparse warframestat index (+ Blueprint follow-ups) */
|
|
202
199
|
itemUniqueNames: Map<string, string>;
|
|
@@ -254,8 +251,6 @@ export declare class Generator {
|
|
|
254
251
|
*/
|
|
255
252
|
private resolveSpecialRewardUniqueNames;
|
|
256
253
|
}
|
|
257
|
-
//#endregion
|
|
258
|
-
//#region src/VersionManager.d.ts
|
|
259
254
|
export declare class VersionManager {
|
|
260
255
|
hashPath: string;
|
|
261
256
|
versionPath: string;
|
|
@@ -275,5 +270,4 @@ export declare class VersionManager {
|
|
|
275
270
|
* @param {number} timestamp Timestamp the build was started at
|
|
276
271
|
*/
|
|
277
272
|
writeVersion(timestamp: number): Promise<void>;
|
|
278
|
-
}
|
|
279
|
-
//#endregion
|
|
273
|
+
}
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as Generator, t as VersionManager } from "./VersionManager
|
|
1
|
+
export { n as Generator, t as VersionManager } from "./VersionManager-Bd2uRI2J.mjs";
|
package/package.json
CHANGED