@zhin.js/plugin-rps 1.0.24 → 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.
- package/commands/rps/{[[action]].js → [[action]]/index.js} +2 -2
- package/commands/rps/{[[action]].ts → [[action]]/index.ts} +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/middlewares/{rps-alias.js → rps-alias/index.js} +2 -2
- package/middlewares/{rps-alias.ts → rps-alias/index.ts} +2 -2
- package/middlewares/{rps-choice.js → rps-choice/index.js} +2 -2
- package/middlewares/{rps-choice.ts → rps-choice/index.ts} +2 -2
- package/package.json +11 -7
- package/src/index.ts +1 -1
|
@@ -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, normalizeRpsAction } from '@zhin.js/game-kit';
|
|
4
|
-
import { RPS_HELP, runRpsCommand } from "
|
|
5
|
-
import { resolveGameServices } from "
|
|
4
|
+
import { RPS_HELP, runRpsCommand } from "../../../lib/rps-command.js";
|
|
5
|
+
import { resolveGameServices } from "../../../lib/runtime-store.js";
|
|
6
6
|
export default defineCommand({
|
|
7
7
|
description: 'RPS',
|
|
8
8
|
params: { action: { type: 'string', default: '' } },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineCommand } from 'zhin.js/command';
|
|
2
2
|
import { messageFromCommandInput, normalizeRpsAction } from '@zhin.js/game-kit';
|
|
3
|
-
import { RPS_HELP, runRpsCommand } from '
|
|
4
|
-
import { resolveGameServices } from '
|
|
3
|
+
import { RPS_HELP, runRpsCommand } from '../../../src/rps-command.js';
|
|
4
|
+
import { resolveGameServices } from '../../../src/runtime-store.js';
|
|
5
5
|
|
|
6
6
|
export default defineCommand({
|
|
7
7
|
description: 'RPS',
|
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { RPS_HELP } from './rps-command.js';
|
|
|
2
2
|
export { gameServicesToken, resolveGameServices } from './runtime-store.js';
|
|
3
3
|
/**
|
|
4
4
|
* 已由 plugin.ts 接线:commands/ 命令、middlewares/ 文本与选项中间件、
|
|
5
|
-
*
|
|
5
|
+
* 游戏大厅 Game capability、过期会话 cron(scheduleHostToken)、
|
|
6
6
|
* host DatabaseHost(databaseHostToken)。仍未接:interactive 按钮回调。
|
|
7
7
|
*/
|
package/lib/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { RPS_HELP } from './rps-command.js';
|
|
|
2
2
|
export { gameServicesToken, resolveGameServices } from './runtime-store.js';
|
|
3
3
|
/**
|
|
4
4
|
* 已由 plugin.ts 接线:commands/ 命令、middlewares/ 文本与选项中间件、
|
|
5
|
-
*
|
|
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, isRpsAction, messageFromCommandInput, normalizeRpsAction, } from '@zhin.js/game-kit';
|
|
3
|
-
import { RPS_HELP, runRpsCommand } from "
|
|
4
|
-
import { resolveGameServices } from "
|
|
3
|
+
import { RPS_HELP, runRpsCommand } from "../../lib/rps-command.js";
|
|
4
|
+
import { resolveGameServices } from "../../lib/runtime-store.js";
|
|
5
5
|
export default defineGameCommandAliasMiddleware({
|
|
6
6
|
aliases: ['猜拳', 'rps'],
|
|
7
7
|
async run(action, input, context) {
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
messageFromCommandInput,
|
|
5
5
|
normalizeRpsAction,
|
|
6
6
|
} from '@zhin.js/game-kit';
|
|
7
|
-
import { RPS_HELP, runRpsCommand } from '
|
|
8
|
-
import { resolveGameServices } from '
|
|
7
|
+
import { RPS_HELP, runRpsCommand } from '../../src/rps-command.js';
|
|
8
|
+
import { resolveGameServices } from '../../src/runtime-store.js';
|
|
9
9
|
|
|
10
10
|
export default defineGameCommandAliasMiddleware({
|
|
11
11
|
aliases: ['猜拳', 'rps'],
|
|
@@ -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 "
|
|
5
|
-
import { handleChoice, RPS_PREFIX } from "
|
|
4
|
+
import { resolveGameServices } from "../../lib/runtime-store.js";
|
|
5
|
+
import { handleChoice, RPS_PREFIX } from "../../lib/game-flow.js";
|
|
6
6
|
/**
|
|
7
7
|
* 文本入口:按钮 payload(`rps:session:rock|paper|scissors|restart`)与数字 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 '
|
|
11
|
-
import { handleChoice, RPS_PREFIX } from '
|
|
10
|
+
import { resolveGameServices } from '../../src/runtime-store.js';
|
|
11
|
+
import { handleChoice, RPS_PREFIX } from '../../src/game-flow.js';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* 文本入口:按钮 payload(`rps:session:rock|paper|scissors|restart`)与数字 fallback
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/plugin-rps",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Zhin.js 猜拳游戏 — 石头剪刀布三局两胜 (Plugin Runtime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
],
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@zhin.js/core": "1.
|
|
28
|
-
"@zhin.js/game-kit": "
|
|
27
|
+
"@zhin.js/core": "1.1.37",
|
|
28
|
+
"@zhin.js/game-kit": "1.1.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"typescript": "^6.0.3",
|
|
32
32
|
"vitest": "^4.1.10",
|
|
33
|
-
"zhin.js": "
|
|
33
|
+
"zhin.js": "1.1.2"
|
|
34
34
|
},
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|
|
@@ -58,14 +58,18 @@
|
|
|
58
58
|
{
|
|
59
59
|
"package": "@zhin.js/middleware",
|
|
60
60
|
"api": "^1.0.0"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"package": "@zhin.js/game-kit",
|
|
64
|
+
"api": "^1.0.0"
|
|
61
65
|
}
|
|
62
66
|
],
|
|
63
67
|
"plugins": []
|
|
64
68
|
},
|
|
65
69
|
"peerDependencies": {
|
|
66
|
-
"@zhin.js/command": "1.
|
|
67
|
-
"@zhin.js/middleware": "1.
|
|
68
|
-
"zhin.js": "
|
|
70
|
+
"@zhin.js/command": "^1.1.1",
|
|
71
|
+
"@zhin.js/middleware": "^1.1.1",
|
|
72
|
+
"zhin.js": "^1.1.2"
|
|
69
73
|
},
|
|
70
74
|
"peerDependenciesMeta": {
|
|
71
75
|
"@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
|
-
*
|
|
6
|
+
* 游戏大厅 Game capability、过期会话 cron(scheduleHostToken)、
|
|
7
7
|
* host DatabaseHost(databaseHostToken)。仍未接:interactive 按钮回调。
|
|
8
8
|
*/
|