@zhin.js/plugin-blackjack 1.1.21 → 1.1.23

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,7 +1,8 @@
1
1
  import { type Token } from 'zhin.js';
2
2
  import type { SessionService } from './session-service.js';
3
3
  /** Owner-scoped service consumed by discovered commands and middleware. */
4
- export declare const gameServicesToken: Token<SessionService>;
4
+ export declare const gameServicesStore: import("zhin.js").PluginStore<SessionService, unknown>;
5
+ export declare const gameServicesToken: import("zhin.js").PluginStore<SessionService, unknown>;
5
6
  export declare function resolveGameServices(context: {
6
7
  use<T>(token: Token<T>): T;
7
8
  }): SessionService;
@@ -1,7 +1,8 @@
1
- import { createToken } from 'zhin.js';
1
+ import { definePluginStore } from 'zhin.js';
2
2
  /** Owner-scoped service consumed by discovered commands and middleware. */
3
- export const gameServicesToken = createToken('zhin.game.blackjack.services');
3
+ export const gameServicesStore = definePluginStore('zhin.game.blackjack.services');
4
+ export const gameServicesToken = gameServicesStore;
4
5
  export function resolveGameServices(context) {
5
- return context.use(gameServicesToken);
6
+ return gameServicesStore.use(context);
6
7
  }
7
8
  //# sourceMappingURL=runtime-store.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-store.js","sourceRoot":"","sources":["../src/runtime-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,SAAS,CAAC;AAGlD,2EAA2E;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,WAAW,CAAiB,8BAA8B,CAAC,CAAC;AAE7F,MAAM,UAAU,mBAAmB,CAAC,OAAuC;IACzE,OAAO,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AACxC,CAAC"}
1
+ {"version":3,"file":"runtime-store.js","sourceRoot":"","sources":["../src/runtime-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAc,MAAM,SAAS,CAAC;AAGxD,2EAA2E;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAiB,8BAA8B,CAAC,CAAC;AACnG,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD,MAAM,UAAU,mBAAmB,CAAC,OAAuC;IACzE,OAAO,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/plugin-blackjack",
3
- "version": "1.1.21",
3
+ "version": "1.1.23",
4
4
  "description": "Zhin.js 21 点(Blackjack)(Plugin Runtime)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -23,13 +23,13 @@
23
23
  ],
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
- "@zhin.js/core": "1.1.56",
27
- "@zhin.js/game-kit": "1.1.21"
26
+ "@zhin.js/core": "1.1.58",
27
+ "@zhin.js/game-kit": "1.1.23"
28
28
  },
29
29
  "devDependencies": {
30
30
  "typescript": "^6.0.3",
31
31
  "vitest": "^4.1.10",
32
- "zhin.js": "1.1.21"
32
+ "zhin.js": "1.1.23"
33
33
  },
34
34
  "repository": {
35
35
  "type": "git",
@@ -66,9 +66,9 @@
66
66
  "plugins": []
67
67
  },
68
68
  "peerDependencies": {
69
- "@zhin.js/command": "^1.1.14",
70
- "@zhin.js/middleware": "^1.1.13",
71
- "zhin.js": "^1.1.21"
69
+ "@zhin.js/command": "^1.1.16",
70
+ "@zhin.js/middleware": "^1.1.15",
71
+ "zhin.js": "^1.1.23"
72
72
  },
73
73
  "peerDependenciesMeta": {
74
74
  "@zhin.js/command": {
@@ -1,9 +1,10 @@
1
- import { createToken, type Token } from 'zhin.js';
1
+ import { definePluginStore, type Token } from 'zhin.js';
2
2
  import type { SessionService } from './session-service.js';
3
3
 
4
4
  /** Owner-scoped service consumed by discovered commands and middleware. */
5
- export const gameServicesToken = createToken<SessionService>('zhin.game.blackjack.services');
5
+ export const gameServicesStore = definePluginStore<SessionService>('zhin.game.blackjack.services');
6
+ export const gameServicesToken = gameServicesStore;
6
7
 
7
8
  export function resolveGameServices(context: { use<T>(token: Token<T>): T }): SessionService {
8
- return context.use(gameServicesToken);
9
+ return gameServicesStore.use(context);
9
10
  }