@zhin.js/plugin-blackjack 1.1.22 → 1.1.24
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/lib/runtime-store.d.ts
CHANGED
|
@@ -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
|
|
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;
|
package/lib/runtime-store.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { definePluginStore } from 'zhin.js';
|
|
2
2
|
/** Owner-scoped service consumed by discovered commands and middleware. */
|
|
3
|
-
export const
|
|
3
|
+
export const gameServicesStore = definePluginStore('zhin.game.blackjack.services');
|
|
4
|
+
export const gameServicesToken = gameServicesStore;
|
|
4
5
|
export function resolveGameServices(context) {
|
|
5
|
-
return
|
|
6
|
+
return gameServicesStore.use(context);
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=runtime-store.js.map
|
package/lib/runtime-store.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-store.js","sourceRoot":"","sources":["../src/runtime-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
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.
|
|
3
|
+
"version": "1.1.24",
|
|
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.
|
|
27
|
-
"@zhin.js/game-kit": "1.1.
|
|
26
|
+
"@zhin.js/core": "1.1.59",
|
|
27
|
+
"@zhin.js/game-kit": "1.1.24"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"typescript": "^6.0.3",
|
|
31
31
|
"vitest": "^4.1.10",
|
|
32
|
-
"zhin.js": "1.1.
|
|
32
|
+
"zhin.js": "1.1.24"
|
|
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.
|
|
70
|
-
"@zhin.js/middleware": "^1.1.
|
|
71
|
-
"zhin.js": "^1.1.
|
|
69
|
+
"@zhin.js/command": "^1.1.17",
|
|
70
|
+
"@zhin.js/middleware": "^1.1.16",
|
|
71
|
+
"zhin.js": "^1.1.24"
|
|
72
72
|
},
|
|
73
73
|
"peerDependenciesMeta": {
|
|
74
74
|
"@zhin.js/command": {
|
package/src/runtime-store.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
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
|
|
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
|
|
9
|
+
return gameServicesStore.use(context);
|
|
9
10
|
}
|