@trpc/next 10.0.0-proxy-beta.9 → 10.0.0-proxy-beta.11
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/dist/createTRPCNext.d.ts +2 -2
- package/dist/createTRPCNext.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +8 -8
- package/src/createTRPCNext.tsx +5 -2
package/dist/createTRPCNext.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CreateReactUtilsProxy, DecoratedProcedureRecord } from '@trpc/react/shared';
|
|
2
2
|
import { AnyRouter } from '@trpc/server';
|
|
3
3
|
import { NextPageContext } from 'next/types';
|
|
4
4
|
import { WithTRPCNoSSROptions, WithTRPCSSROptions } from './withTRPC';
|
|
5
5
|
export declare function createTRPCNext<TRouter extends AnyRouter, TSSRContext extends NextPageContext = NextPageContext>(opts: WithTRPCNoSSROptions<TRouter> | WithTRPCSSROptions<TRouter>): {
|
|
6
|
-
useContext():
|
|
6
|
+
useContext(): CreateReactUtilsProxy<TRouter, TSSRContext>;
|
|
7
7
|
withTRPC: (AppOrPage: import("next/types").NextComponentType<any, any, any>) => import("next/types").NextComponentType<NextPageContext, {}, {}>;
|
|
8
8
|
} & DecoratedProcedureRecord<TRouter["_def"]["record"], "">;
|
|
9
9
|
//# sourceMappingURL=createTRPCNext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTRPCNext.d.ts","sourceRoot":"","sources":["../src/createTRPCNext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"createTRPCNext.d.ts","sourceRoot":"","sources":["../src/createTRPCNext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EAIzB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAE7C,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAY,MAAM,YAAY,CAAC;AAEhF,wBAAgB,cAAc,CAC5B,OAAO,SAAS,SAAS,EACzB,WAAW,SAAS,eAAe,GAAG,eAAe,EACrD,IAAI,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAAG,kBAAkB,CAAC,OAAO,CAAC;kBAuCjD,sBAAsB,OAAO,EAAE,WAAW,CAAC;;4DAG5D"}
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/next",
|
|
3
|
-
"version": "10.0.0-proxy-beta.
|
|
3
|
+
"version": "10.0.0-proxy-beta.11",
|
|
4
4
|
"description": "tRPC Next lib",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@tanstack/react-query": "^4.3.8",
|
|
39
|
-
"@trpc/client": "10.0.0-proxy-beta.
|
|
40
|
-
"@trpc/react": "10.0.0-proxy-beta.
|
|
41
|
-
"@trpc/server": "10.0.0-proxy-beta.
|
|
39
|
+
"@trpc/client": "10.0.0-proxy-beta.11",
|
|
40
|
+
"@trpc/react": "10.0.0-proxy-beta.11",
|
|
41
|
+
"@trpc/server": "10.0.0-proxy-beta.11",
|
|
42
42
|
"next": "*",
|
|
43
43
|
"react": ">=16.8.0",
|
|
44
44
|
"react-dom": ">=16.8.0"
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@tanstack/react-query": "^4.3.8",
|
|
52
|
-
"@trpc/client": "10.0.0-proxy-beta.
|
|
53
|
-
"@trpc/react": "10.0.0-proxy-beta.
|
|
54
|
-
"@trpc/server": "10.0.0-proxy-beta.
|
|
52
|
+
"@trpc/client": "10.0.0-proxy-beta.11",
|
|
53
|
+
"@trpc/react": "10.0.0-proxy-beta.11",
|
|
54
|
+
"@trpc/server": "10.0.0-proxy-beta.11",
|
|
55
55
|
"@types/express": "^4.17.12",
|
|
56
56
|
"@types/node": "^18.7.20",
|
|
57
57
|
"express": "^4.17.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "d6196218c3ed0857a2f8624f150c6be187176665"
|
|
67
67
|
}
|
package/src/createTRPCNext.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CreateReactUtilsProxy,
|
|
2
3
|
DecoratedProcedureRecord,
|
|
3
|
-
DecoratedProcedureUtilsRecord,
|
|
4
4
|
createHooksInternal,
|
|
5
5
|
createReactProxyDecoration,
|
|
6
6
|
createReactQueryUtilsProxy,
|
|
@@ -25,6 +25,9 @@ export function createTRPCNext<
|
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
get(_obj, name) {
|
|
28
|
+
if (name === 'then') {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
28
31
|
if (name === 'useContext') {
|
|
29
32
|
return () => {
|
|
30
33
|
const context = hooks.useContext();
|
|
@@ -49,7 +52,7 @@ export function createTRPCNext<
|
|
|
49
52
|
);
|
|
50
53
|
|
|
51
54
|
return proxy as {
|
|
52
|
-
useContext():
|
|
55
|
+
useContext(): CreateReactUtilsProxy<TRouter, TSSRContext>;
|
|
53
56
|
withTRPC: typeof _withTRPC;
|
|
54
57
|
} & DecoratedProcedureRecord<TRouter['_def']['record']>;
|
|
55
58
|
}
|