trpc-nuxt-module 4.5.0 → 4.6.0
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/README.md
CHANGED
|
@@ -98,6 +98,8 @@ const { data } = await $trpc.greeting.useQuery(name);
|
|
|
98
98
|
|
|
99
99
|
A WebSocket connection calls the `trpc-nuxt-module:webSocket:open` Nitro runtime hook when it opens. It calls the `trpc-nuxt-module:webSocket:close` hook when it closes. Both hooks receive the connection's context, typed from your router.
|
|
100
100
|
|
|
101
|
+
The `keepAlive` option of `webSocket` is the handler's own ping of each connection. After `pingMs` of quiet the handler sends `PING`, and it closes a connection that sends no message within `pongWaitMs`. A tRPC client answers `PING` with `PONG`. The client's keep-alive is not set by this module: the app configures it on its own `createWSClient`.
|
|
102
|
+
|
|
101
103
|
## <a name="license">⚖️ License</a>
|
|
102
104
|
|
|
103
105
|
This project is licensed under the [Apache-2.0 license](https://github.com/Esposter/Esposter/blob/main/LICENSE).
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { MaybeRefOrGetter } from "vue";
|
|
2
2
|
import { SubscriptionResolver, TRPCResolverDef } from "@trpc/client";
|
|
3
|
-
export type UseSubscriptionOptions<TDefinition extends TRPCResolverDef> =
|
|
3
|
+
export type UseSubscriptionOptions<TDefinition extends TRPCResolverDef> = SubscriptionResolver<TDefinition> extends {
|
|
4
|
+
(input: TDefinition["input"], opts: infer TOptions): unknown;
|
|
5
|
+
(...args: never[]): unknown;
|
|
6
|
+
} ? Partial<TOptions> & {
|
|
4
7
|
enabled?: MaybeRefOrGetter<boolean>;
|
|
5
|
-
};
|
|
8
|
+
} : never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "trpc-nuxt-module",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "tRPC for Nuxt — a Nuxt module that registers your router's HTTP and WebSocket handlers, fetches through the request event during SSR, and decorates the typed client with useQuery, useMutation and useSubscription over useAsyncData.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nitro",
|
|
@@ -58,30 +58,30 @@
|
|
|
58
58
|
"typecheck": "tsrs --fast"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@esposter/shared": "4.
|
|
61
|
+
"@esposter/shared": "4.6.0",
|
|
62
62
|
"@nuxt/kit": "npm:@nuxt/kit-nightly@5x",
|
|
63
63
|
"@nuxt/schema": "npm:@nuxt/schema-nightly@5x",
|
|
64
64
|
"ohash": "^2.0.12",
|
|
65
65
|
"type-fest": "^5.10.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@esposter/configuration": "4.
|
|
69
|
-
"@esposter/shared-node": "4.
|
|
68
|
+
"@esposter/configuration": "4.6.0",
|
|
69
|
+
"@esposter/shared-node": "4.6.0",
|
|
70
70
|
"@nuxt/nitro-server": "npm:@nuxt/nitro-server-nightly@5x",
|
|
71
71
|
"@nuxt/test-utils": "^4.3.4",
|
|
72
72
|
"@types/node": "^26.6.6",
|
|
73
73
|
"happy-dom": "^21.0.4",
|
|
74
74
|
"superjson": "^2.2.6",
|
|
75
|
-
"tsdown": "^0.23.
|
|
75
|
+
"tsdown": "^0.23.7",
|
|
76
76
|
"zod": "^4.6.7"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@trpc/client": "^11.
|
|
80
|
-
"@trpc/server": "^11.
|
|
79
|
+
"@trpc/client": "^11.25.0",
|
|
80
|
+
"@trpc/server": "^11.25.0",
|
|
81
81
|
"crossws": "^0.4.17",
|
|
82
82
|
"nitro": "npm:nitro-nightly@latest",
|
|
83
83
|
"nuxt": "npm:nuxt-nightly@5x",
|
|
84
|
-
"vue": "^3.5.
|
|
84
|
+
"vue": "^3.5.45"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "0ceea3ffbe12ca69413ea5db2d3cfad197a63cba"
|
|
87
87
|
}
|