@zhin.js/plugin-text-adventure 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/adv/{[[action]].js → [[action]]/index.js} +2 -2
- package/commands/adv/{[[action]].ts → [[action]]/index.ts} +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/middlewares/{adv-alias.js → adv-alias/index.js} +2 -2
- package/middlewares/{adv-alias.ts → adv-alias/index.ts} +2 -2
- package/middlewares/{adv-choice.js → adv-choice/index.js} +3 -3
- package/middlewares/{adv-choice.ts → adv-choice/index.ts} +3 -3
- 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, normalizeAdvAction } from '@zhin.js/game-kit';
|
|
4
|
-
import { ADV_HELP, runAdvCommand } from "
|
|
5
|
-
import { resolveGameServices } from "
|
|
4
|
+
import { ADV_HELP, runAdvCommand } from "../../../lib/adv-command.js";
|
|
5
|
+
import { resolveGameServices } from "../../../lib/runtime-store.js";
|
|
6
6
|
export default defineCommand({
|
|
7
7
|
description: 'Text Adventure',
|
|
8
8
|
params: { action: { type: 'string', default: '' } },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineCommand } from 'zhin.js/command';
|
|
2
2
|
import { messageFromCommandInput, normalizeAdvAction } from '@zhin.js/game-kit';
|
|
3
|
-
import { ADV_HELP, runAdvCommand } from '
|
|
4
|
-
import { resolveGameServices } from '
|
|
3
|
+
import { ADV_HELP, runAdvCommand } from '../../../src/adv-command.js';
|
|
4
|
+
import { resolveGameServices } from '../../../src/runtime-store.js';
|
|
5
5
|
|
|
6
6
|
export default defineCommand({
|
|
7
7
|
description: 'Text Adventure',
|
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export { ADV_HELP } from './adv-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 { ADV_HELP } from './adv-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, isAdvAction, messageFromCommandInput, normalizeAdvAction, } from '@zhin.js/game-kit';
|
|
3
|
-
import { ADV_HELP, runAdvCommand } from "
|
|
4
|
-
import { resolveGameServices } from "
|
|
3
|
+
import { ADV_HELP, runAdvCommand } from "../../lib/adv-command.js";
|
|
4
|
+
import { resolveGameServices } from "../../lib/runtime-store.js";
|
|
5
5
|
export default defineGameCommandAliasMiddleware({
|
|
6
6
|
aliases: ['冒险', 'adv', '秘境'],
|
|
7
7
|
async run(action, input, context) {
|
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
messageFromCommandInput,
|
|
5
5
|
normalizeAdvAction,
|
|
6
6
|
} from '@zhin.js/game-kit';
|
|
7
|
-
import { ADV_HELP, runAdvCommand } from '
|
|
8
|
-
import { resolveGameServices } from '
|
|
7
|
+
import { ADV_HELP, runAdvCommand } from '../../src/adv-command.js';
|
|
8
|
+
import { resolveGameServices } from '../../src/runtime-store.js';
|
|
9
9
|
|
|
10
10
|
export default defineGameCommandAliasMiddleware({
|
|
11
11
|
aliases: ['冒险', 'adv', '秘境'],
|
|
@@ -1,9 +1,9 @@
|
|
|
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 } from "
|
|
6
|
-
import { ADV_PREFIX, getScene, stateFromSession, visibleChoices } from "
|
|
4
|
+
import { resolveGameServices } from "../../lib/runtime-store.js";
|
|
5
|
+
import { handleChoice } from "../../lib/game-flow.js";
|
|
6
|
+
import { ADV_PREFIX, getScene, stateFromSession, visibleChoices } from "../../lib/story.js";
|
|
7
7
|
/**
|
|
8
8
|
* 文本入口:按钮 payload(`adv:session:choiceId`)与数字 fallback
|
|
9
9
|
* (按当前场景可见选项编号,对应视图提示用户回复数字选分支)。
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
parseChoicePayload,
|
|
8
8
|
resolveGameTextPayload,
|
|
9
9
|
} from '@zhin.js/game-kit';
|
|
10
|
-
import { resolveGameServices } from '
|
|
11
|
-
import { handleChoice } from '
|
|
12
|
-
import { ADV_PREFIX, getScene, stateFromSession, visibleChoices } from '
|
|
10
|
+
import { resolveGameServices } from '../../src/runtime-store.js';
|
|
11
|
+
import { handleChoice } from '../../src/game-flow.js';
|
|
12
|
+
import { ADV_PREFIX, getScene, stateFromSession, visibleChoices } from '../../src/story.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* 文本入口:按钮 payload(`adv:session:choiceId`)与数字 fallback
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/plugin-text-adventure",
|
|
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
|
*/
|