@zhin.js/plugin-word-riddle 1.0.25 → 1.1.2

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.
@@ -1,8 +1,8 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineCommand } from 'zhin.js/command';
3
3
  import { messageFromCommandInput, normalizeRiddleAction } from '@zhin.js/game-kit';
4
- import { RIDDLE_HELP, runRiddleCommand } from "../../lib/riddle-command.js";
5
- import { resolveGameServices } from "../../lib/runtime-store.js";
4
+ import { RIDDLE_HELP, runRiddleCommand } from "../../../lib/riddle-command.js";
5
+ import { resolveGameServices } from "../../../lib/runtime-store.js";
6
6
  export default defineCommand({
7
7
  description: 'Word Riddle',
8
8
  params: { action: { type: 'string', default: '' } },
@@ -1,7 +1,7 @@
1
1
  import { defineCommand } from 'zhin.js/command';
2
2
  import { messageFromCommandInput, normalizeRiddleAction } from '@zhin.js/game-kit';
3
- import { RIDDLE_HELP, runRiddleCommand } from '../../src/riddle-command.js';
4
- import { resolveGameServices } from '../../src/runtime-store.js';
3
+ import { RIDDLE_HELP, runRiddleCommand } from '../../../src/riddle-command.js';
4
+ import { resolveGameServices } from '../../../src/runtime-store.js';
5
5
 
6
6
  export default defineCommand({
7
7
  description: 'Word Riddle',
package/lib/index.d.ts CHANGED
@@ -2,6 +2,6 @@ export { RIDDLE_HELP } from './riddle-command.js';
2
2
  export { gameServicesToken, resolveGameServices } from './runtime-store.js';
3
3
  /**
4
4
  * 已由 plugin.ts 接线:commands/ 命令、middlewares/ 文本与选项中间件、
5
- * 游戏大厅注册(registerRuntimeGame)、过期会话 cron(scheduleHostToken)、
5
+ * 游戏大厅 Game capability、过期会话 cron(scheduleHostToken)、
6
6
  * host DatabaseHost(databaseHostToken)。仍未接:interactive 按钮回调。
7
7
  */
package/lib/index.js CHANGED
@@ -2,7 +2,7 @@ export { RIDDLE_HELP } from './riddle-command.js';
2
2
  export { gameServicesToken, resolveGameServices } from './runtime-store.js';
3
3
  /**
4
4
  * 已由 plugin.ts 接线:commands/ 命令、middlewares/ 文本与选项中间件、
5
- * 游戏大厅注册(registerRuntimeGame)、过期会话 cron(scheduleHostToken)、
5
+ * 游戏大厅 Game capability、过期会话 cron(scheduleHostToken)、
6
6
  * host DatabaseHost(databaseHostToken)。仍未接:interactive 按钮回调。
7
7
  */
8
8
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineGameCommandAliasMiddleware, isRiddleAction, messageFromCommandInput, normalizeRiddleAction, } from '@zhin.js/game-kit';
3
- import { RIDDLE_HELP, runRiddleCommand } from "../lib/riddle-command.js";
4
- import { resolveGameServices } from "../lib/runtime-store.js";
3
+ import { RIDDLE_HELP, runRiddleCommand } from "../../lib/riddle-command.js";
4
+ import { resolveGameServices } from "../../lib/runtime-store.js";
5
5
  export default defineGameCommandAliasMiddleware({
6
6
  aliases: ['猜谜', 'riddle'],
7
7
  async run(action, input, context) {
@@ -4,8 +4,8 @@ import {
4
4
  messageFromCommandInput,
5
5
  normalizeRiddleAction,
6
6
  } from '@zhin.js/game-kit';
7
- import { RIDDLE_HELP, runRiddleCommand } from '../src/riddle-command.js';
8
- import { resolveGameServices } from '../src/runtime-store.js';
7
+ import { RIDDLE_HELP, runRiddleCommand } from '../../src/riddle-command.js';
8
+ import { resolveGameServices } from '../../src/runtime-store.js';
9
9
 
10
10
  export default defineGameCommandAliasMiddleware({
11
11
  aliases: ['猜谜', 'riddle'],
@@ -1,8 +1,8 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
2
  import { defineMiddleware } from 'zhin.js/middleware';
3
3
  import { buildChoiceFallbackMap, channelKey, messageFromCommandInput, parseChoicePayload, resolveGameTextPayload, } from '@zhin.js/game-kit';
4
- import { resolveGameServices } from "../lib/runtime-store.js";
5
- import { handleChoice, processAnswerText, RIDDLE_PREFIX } from "../lib/game-flow.js";
4
+ import { resolveGameServices } from "../../lib/runtime-store.js";
5
+ import { handleChoice, processAnswerText, RIDDLE_PREFIX } from "../../lib/game-flow.js";
6
6
  /**
7
7
  * 文本入口:按钮 payload(`riddle:session:choiceId`)、数字 fallback
8
8
  * (『1提示 2跳过 3结束』,对应 view 的 fallbackHint),其余按谜底作答。
@@ -7,8 +7,8 @@ import {
7
7
  parseChoicePayload,
8
8
  resolveGameTextPayload,
9
9
  } from '@zhin.js/game-kit';
10
- import { resolveGameServices } from '../src/runtime-store.js';
11
- import { handleChoice, processAnswerText, RIDDLE_PREFIX } from '../src/game-flow.js';
10
+ import { resolveGameServices } from '../../src/runtime-store.js';
11
+ import { handleChoice, processAnswerText, RIDDLE_PREFIX } from '../../src/game-flow.js';
12
12
 
13
13
  /**
14
14
  * 文本入口:按钮 payload(`riddle:session:choiceId`)、数字 fallback
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/plugin-word-riddle",
3
- "version": "1.0.25",
3
+ "version": "1.1.2",
4
4
  "description": "Zhin.js 猜谜 — 字谜与猜成语 (Plugin Runtime)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -25,13 +25,13 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "chinese-idiom-chengyu": "^1.1.0",
28
- "@zhin.js/core": "1.5.15",
29
- "@zhin.js/game-kit": "3.0.15"
28
+ "@zhin.js/core": "1.1.37",
29
+ "@zhin.js/game-kit": "1.1.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "typescript": "^6.0.3",
33
33
  "vitest": "^4.1.10",
34
- "zhin.js": "6.0.15"
34
+ "zhin.js": "1.1.2"
35
35
  },
36
36
  "repository": {
37
37
  "type": "git",
@@ -59,14 +59,18 @@
59
59
  {
60
60
  "package": "@zhin.js/middleware",
61
61
  "api": "^1.0.0"
62
+ },
63
+ {
64
+ "package": "@zhin.js/game-kit",
65
+ "api": "^1.0.0"
62
66
  }
63
67
  ],
64
68
  "plugins": []
65
69
  },
66
70
  "peerDependencies": {
67
- "@zhin.js/command": "1.0.16",
68
- "@zhin.js/middleware": "1.0.13",
69
- "zhin.js": "6.0.15"
71
+ "@zhin.js/command": "^1.1.1",
72
+ "@zhin.js/middleware": "^1.1.1",
73
+ "zhin.js": "^1.1.2"
70
74
  },
71
75
  "peerDependenciesMeta": {
72
76
  "@zhin.js/command": {
package/src/index.ts CHANGED
@@ -3,6 +3,6 @@ export { gameServicesToken, resolveGameServices } from './runtime-store.js';
3
3
 
4
4
  /**
5
5
  * 已由 plugin.ts 接线:commands/ 命令、middlewares/ 文本与选项中间件、
6
- * 游戏大厅注册(registerRuntimeGame)、过期会话 cron(scheduleHostToken)、
6
+ * 游戏大厅 Game capability、过期会话 cron(scheduleHostToken)、
7
7
  * host DatabaseHost(databaseHostToken)。仍未接:interactive 按钮回调。
8
8
  */