@zhin.js/plugin-dungeon-expedition 1.0.6 → 1.0.9

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.
@@ -10,7 +10,7 @@ export default defineCommand({
10
10
  const rawAction = String(params.action ?? '');
11
11
  if (normalizeDungeonAction(rawAction) === 'help')
12
12
  return DUNGEON_HELP;
13
- const service = resolveGameServices({ use, owner });
13
+ const service = resolveGameServices({ use });
14
14
  return runDungeonCommand(service, messageFromCommandInput(input), rawAction);
15
15
  },
16
16
  });
@@ -13,7 +13,7 @@ export default defineCommand({
13
13
  async execute({ params, input, use, owner }) {
14
14
  const rawAction = String(params.action ?? '');
15
15
  if (normalizeDungeonAction(rawAction) === 'help') return DUNGEON_HELP;
16
- const service = resolveGameServices({ use, owner });
16
+ const service = resolveGameServices({ use });
17
17
  return runDungeonCommand(
18
18
  service,
19
19
  messageFromCommandInput(input),
@@ -1,5 +1,6 @@
1
+ import { type Token } from '@zhin.js/plugin-runtime';
1
2
  import type { SessionService } from './session-service.js';
2
- export declare const gameServicesToken: import("@zhin.js/plugin-runtime").Token<SessionService>;
3
+ export declare const gameServicesToken: Token<SessionService>;
3
4
  export declare function resolveGameServices(context: {
4
- use<T>(token: typeof gameServicesToken): T;
5
+ use<T>(token: Token<T>): T;
5
6
  }): SessionService;
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-store.js","sourceRoot":"","sources":["../src/runtime-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAGtD,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAC1C,uCAAuC,CACxC,CAAC;AAEF,MAAM,UAAU,mBAAmB,CACjC,OAAuD;IAEvD,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAmB,CAAC;AAC1D,CAAC"}
1
+ {"version":3,"file":"runtime-store.js","sourceRoot":"","sources":["../src/runtime-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,yBAAyB,CAAC;AAGlE,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAC1C,uCAAuC,CACxC,CAAC;AAEF,MAAM,UAAU,mBAAmB,CACjC,OAAuC;IAEvC,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACxC,CAAC"}
package/lib/view.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { SendContent } from '@zhin.js/core';
1
+ import type { SendContent } from '@zhin.js/core/runtime';
2
2
  import { type ChoiceOption } from '@zhin.js/game-kit';
3
3
  import { type DungeonState } from './engine.js';
4
4
  import type { DungeonSessionRow } from './models.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/plugin-dungeon-expedition",
3
- "version": "1.0.6",
3
+ "version": "1.0.9",
4
4
  "description": "Zhin.js multiplayer deterministic dungeon expedition",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -24,11 +24,11 @@
24
24
  ],
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
- "@zhin.js/command": "1.0.7",
28
- "@zhin.js/core": "1.5.2",
29
- "@zhin.js/game-kit": "3.0.2",
30
- "@zhin.js/middleware": "1.0.6",
31
- "@zhin.js/plugin-runtime": "1.1.3"
27
+ "@zhin.js/command": "1.0.10",
28
+ "@zhin.js/core": "1.5.5",
29
+ "@zhin.js/game-kit": "3.0.5",
30
+ "@zhin.js/middleware": "1.0.8",
31
+ "@zhin.js/plugin-runtime": "1.1.5"
32
32
  },
33
33
  "devDependencies": {
34
34
  "typescript": "^6.0.3",
@@ -1,4 +1,4 @@
1
- import { createToken } from '@zhin.js/plugin-runtime';
1
+ import { createToken, type Token } from '@zhin.js/plugin-runtime';
2
2
  import type { SessionService } from './session-service.js';
3
3
 
4
4
  export const gameServicesToken = createToken<SessionService>(
@@ -6,7 +6,7 @@ export const gameServicesToken = createToken<SessionService>(
6
6
  );
7
7
 
8
8
  export function resolveGameServices(
9
- context: { use<T>(token: typeof gameServicesToken): T },
9
+ context: { use<T>(token: Token<T>): T },
10
10
  ): SessionService {
11
- return context.use(gameServicesToken) as SessionService;
11
+ return context.use(gameServicesToken);
12
12
  }
package/src/view.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { SendContent } from '@zhin.js/core';
1
+ import type { SendContent } from '@zhin.js/core/runtime';
2
2
  import {
3
3
  buildChoiceKeyboard,
4
4
  type ChoiceOption,