Skip to content

Commit 215f442

Browse files
committed
Update libshv
1 parent 18cc1b2 commit 215f442

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-shv",
3-
"version": "5.1.1",
3+
"version": "6.0.0",
44
"description": "Vue support for libshv-js",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -32,8 +32,8 @@
3232
},
3333
"peerDependencies": {
3434
"vue": "^3.5.22",
35-
"libshv-js-zod": "^3.0.0",
36-
"libshv-js": "^6.0.0"
35+
"libshv-js-zod": "^4.0.0",
36+
"libshv-js": "^7.0.0"
3737
},
3838
"devDependencies": {
3939
"@typescript-eslint/parser": "^8.46.1",

src/vue-shv.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {type shvMapType} from 'libshv-js/rpcvalue';
99
import {RpcValue} from 'libshv-js/rpcvalue';
1010
import {resolveString, StringGetter} from 'libshv-js/utils';
1111
import {createZodWsClient, ZodMethodHandler} from 'libshv-js-zod';
12+
import {ShvRI} from 'libshv-js';
1213

1314
type GlobalResourceOptions<ResourceType> = {
1415
shvPath: StringGetter;
@@ -393,7 +394,7 @@ export function useShv(options: VueShvOptions) {
393394
try {
394395
await refreshValue();
395396
const connection = await getConnection();
396-
await connection.subscribe(`Global-${resIdentifier}:`, shvPath, options.signalName, (_path: string, _method: string, param: RpcValue) => {
397+
await connection.subscribe(`Global-${resIdentifier}:`, ShvRI.fromPathMethodSignal(shvPath, '*', options.signalName), (_path: string, _method: string, param: RpcValue) => {
397398
options.signalHandler(param, resource, async () => refreshValue().catch((error: unknown) => {
398399
console.error(`Failed to initialize ${resIdentifier}`, error);
399400
}));

0 commit comments

Comments
 (0)