@zhin.js/plugin-dungeon-expedition 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,6 +1,7 @@
|
|
|
1
1
|
import { type Token } from 'zhin.js';
|
|
2
2
|
import type { SessionService } from './session-service.js';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const gameServicesStore: import("zhin.js").PluginStore<SessionService, unknown>;
|
|
4
|
+
export declare const gameServicesToken: import("zhin.js").PluginStore<SessionService, unknown>;
|
|
4
5
|
export declare function resolveGameServices(context: {
|
|
5
6
|
use<T>(token: Token<T>): T;
|
|
6
7
|
}): SessionService;
|
package/lib/runtime-store.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export const
|
|
1
|
+
import { definePluginStore } from 'zhin.js';
|
|
2
|
+
export const gameServicesStore = definePluginStore('zhin.game.dungeon-expedition.services');
|
|
3
|
+
export const gameServicesToken = gameServicesStore;
|
|
3
4
|
export function resolveGameServices(context) {
|
|
4
|
-
return
|
|
5
|
+
return gameServicesStore.use(context);
|
|
5
6
|
}
|
|
6
7
|
//# 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,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAChD,uCAAuC,CACxC,CAAC;AACF,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAEnD,MAAM,UAAU,mBAAmB,CACjC,OAAuC;IAEvC,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-dungeon-expedition",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.24",
|
|
4
4
|
"description": "Zhin.js multiplayer deterministic dungeon expedition",
|
|
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,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { definePluginStore, type Token } from 'zhin.js';
|
|
2
2
|
import type { SessionService } from './session-service.js';
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const gameServicesStore = definePluginStore<SessionService>(
|
|
5
5
|
'zhin.game.dungeon-expedition.services',
|
|
6
6
|
);
|
|
7
|
+
export const gameServicesToken = gameServicesStore;
|
|
7
8
|
|
|
8
9
|
export function resolveGameServices(
|
|
9
10
|
context: { use<T>(token: Token<T>): T },
|
|
10
11
|
): SessionService {
|
|
11
|
-
return
|
|
12
|
+
return gameServicesStore.use(context);
|
|
12
13
|
}
|