koishi-plugin-warframe 1.4.10 → 1.4.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/lib/index.d.ts CHANGED
@@ -542,6 +542,7 @@ export const overrideGlobalRivenAttribute: (cache: AsyncCache<{
542
542
  }>) => void;
543
543
  export const globalDucatnatorIDDict: AsyncCache<Record<string, Ducatnator>>;
544
544
  export const wmOnReady: () => Promise<void>;
545
+ export const updateCache: () => Promise<string>;
545
546
  export const getItemOrders: (input: string) => Promise<{
546
547
  item: ItemShort;
547
548
  orders: OrderWithUser[];
@@ -635,6 +636,7 @@ export const ItemOrderComponent: (item: ItemShort, orders: OrderWithUser[]) => E
635
636
  export const RivenOrderComponent: (item: RivenItem, orders: RivenOrderInternal[]) => Element;
636
637
  export const wmCommand: (action: Argv, input: string) => Promise<string>;
637
638
  export const wmrCommand: (action: Argv, input: string) => Promise<string>;
639
+ export const wmuCommand: (action: Argv, input: string) => Promise<string>;
638
640
  export const onReadyHandler: () => Promise<void>;
639
641
  export const name = "warframe";
640
642
  export interface Config {
package/lib/index.js CHANGED
@@ -1198,7 +1198,12 @@ var getWFMDucatnator = /* @__PURE__ */ __name(async () => {
1198
1198
  var globalItemDataFactory = /* @__PURE__ */ __name(async (response) => {
1199
1199
  response ??= await getWFMItemList();
1200
1200
  if (!response) {
1201
- return void 0;
1201
+ return {
1202
+ globalItemList: [],
1203
+ globalItemDict: {},
1204
+ globalItemNameToSlugDict: {},
1205
+ globalItemGameRefDict: {}
1206
+ };
1202
1207
  }
1203
1208
  const data = response;
1204
1209
  const globalItemList = response;
@@ -1279,7 +1284,7 @@ var globalDucatnatorIDDict = createAsyncCache(async () => {
1279
1284
  var warframeAlias = {
1280
1285
  Volt: ["电", "电男", "伏特"],
1281
1286
  Trinity: ["奶妈", "奶"],
1282
- Rhino: ["犀牛", "牛", "铁甲犀牛"],
1287
+ Rhino: ["犀牛", "牛"],
1283
1288
  Mag: ["磁妹", "磁力"],
1284
1289
  Loki: ["洛基"],
1285
1290
  Excalibur: ["咖喱棒", "圣剑", "咖喱"],
@@ -1372,6 +1377,24 @@ var weaponPartSuffix = [
1372
1377
  ];
1373
1378
  var wmOnReady = /* @__PURE__ */ __name(async () => {
1374
1379
  }, "wmOnReady");
1380
+ var updateCache = /* @__PURE__ */ __name(async () => {
1381
+ const updateTasks = [
1382
+ { name: "globalItemData", fn: globalItemData.update() },
1383
+ { name: "globalRivenAttribute", fn: globalRivenAttribute.update() },
1384
+ { name: "globalRivenItemData", fn: globalRivenItemData.update() },
1385
+ { name: "globalDucatnatorIDDict", fn: globalDucatnatorIDDict.update() }
1386
+ ];
1387
+ const results = await Promise.allSettled(updateTasks.map((task) => task.fn));
1388
+ const lines = updateTasks.map((task, index) => {
1389
+ const result = results[index];
1390
+ if (result.status === "fulfilled") {
1391
+ return `${task.name}: 成功`;
1392
+ } else {
1393
+ return `${task.name}: 失败 - ${result.reason}`;
1394
+ }
1395
+ });
1396
+ return lines.join("\n");
1397
+ }, "updateCache");
1375
1398
  var getItemOrders = /* @__PURE__ */ __name(async (input) => {
1376
1399
  if (!input) return null;
1377
1400
  input = normalizeName(input);
@@ -52612,6 +52635,9 @@ var wmrCommand = /* @__PURE__ */ __name(async (action, input) => {
52612
52635
  RivenOrderComponent(result.item, result.orders)
52613
52636
  );
52614
52637
  }, "wmrCommand");
52638
+ var wmuCommand = /* @__PURE__ */ __name(async (action, input) => {
52639
+ return await updateCache();
52640
+ }, "wmuCommand");
52615
52641
 
52616
52642
  // src/hooks/on-ready.ts
52617
52643
  var onReadyHandler = /* @__PURE__ */ __name(async () => {
@@ -52656,6 +52682,7 @@ var setupCommands = /* @__PURE__ */ __name((ctx) => {
52656
52682
  ctx.command("wm <itemId:text>", "请使用wmi替代").action(wmCommand);
52657
52683
  ctx.command("wmr <itemId:text>", "查询wm的紫卡价格").action(wmrCommand);
52658
52684
  ctx.command("wmi <msg:text>", "查询wm的物品价格").action(wmCommand);
52685
+ ctx.command("wmu", "更新wm缓存数据").action(wmuCommand);
52659
52686
  ctx.command("arbitration [day:number]", "近期高价值仲裁任务").alias("arbi").alias("仲裁").alias("仲裁表").action(arbitrationCommand);
52660
52687
  ctx.command("fissure", "当前虚空裂隙").alias("裂缝").alias("裂隙").action(fissureCommand);
52661
52688
  ctx.command("spfissure", "当前钢铁之路虚空裂隙").alias("钢铁裂缝").alias("钢铁裂隙").action(steelPathFissureCommand);
@@ -52670,7 +52697,9 @@ var setupCommands = /* @__PURE__ */ __name((ctx) => {
52670
52697
  ctx.command(
52671
52698
  "rivenstat <weaponType:string> <statType:string> <disposition:number>",
52672
52699
  "获取紫卡数值范围"
52673
- ).usage("武器类型: 步枪, 手枪, 霰弹枪, 近战, Archwing枪械\n词条类型: 2, 3, 21, 31").example("rivenstat 步枪 31 0.7").alias("紫卡数值").action(rivenStatCommand);
52700
+ ).usage(
52701
+ "武器类型: 步枪, 手枪, 霰弹枪, 近战, Archwing枪械\n词条类型: 2, 3, 21, 31"
52702
+ ).example("rivenstat 步枪 31 0.7").alias("紫卡数值").action(rivenStatCommand);
52674
52703
  ctx.command("voidtrader", "虚空商人").alias("虚空商人").alias("奸商").action(voidtraderCommand);
52675
52704
  ctx.command("lichc", "c系玄骸武器", { hidden: true }).action(inDevelopment);
52676
52705
  ctx.command("lichi", "i系玄骸武器", { hidden: true }).action(inDevelopment);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "koishi-plugin-warframe",
3
3
  "description": "WF Toolkit",
4
- "version": "1.4.10",
4
+ "version": "1.4.11",
5
5
  "license": "GPL-3.0",
6
6
  "scripts": {
7
7
  "build": "yakumo build",
@@ -56,9 +56,9 @@
56
56
  "@semantic-release/changelog": "^6.0.3",
57
57
  "@semantic-release/commit-analyzer": "^13.0.1",
58
58
  "@semantic-release/git": "^10.0.1",
59
- "@semantic-release/github": "^12.0.6",
59
+ "@semantic-release/github": "^12.0.8",
60
60
  "@semantic-release/npm": "^13.1.5",
61
- "@semantic-release/release-notes-generator": "^14.1.0",
61
+ "@semantic-release/release-notes-generator": "^14.1.1",
62
62
  "@types/chai": "^5.2.3",
63
63
  "@types/mocha": "^10.0.10",
64
64
  "@types/node": "^25.6.0",
@@ -70,6 +70,7 @@
70
70
  "koishi": "^4.18.11",
71
71
  "koishi-plugin-puppeteer": "^3.9.0",
72
72
  "mocha": "^11.7.5",
73
+ "reflect-metadata": "^0.2.2",
73
74
  "typescript": "^5.9.3",
74
75
  "yakumo": "^1.0.0",
75
76
  "yakumo-esbuild": "^1.0.0",
@@ -80,8 +81,8 @@
80
81
  "@nestjs/core": "^11.1.19",
81
82
  "rxjs": "^7.8.2",
82
83
  "tencentcloud-sdk-nodejs-ocr": "^4.1.213",
83
- "warframe-public-export-plus": "^0.6.0",
84
- "warframe-worldstate-data": "^3.15.1",
85
- "warframe-worldstate-parser": "^5.3.3"
84
+ "warframe-public-export-plus": "^0.6.2",
85
+ "warframe-worldstate-data": "^3.16.1",
86
+ "warframe-worldstate-parser": "^5.4.1"
86
87
  }
87
88
  }