@trpc/next 10.0.0-proxy-beta.22 → 10.0.0-proxy-beta.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/dist/createTRPCNext.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.mjs +2 -3
- package/dist/withTRPC.d.ts +2 -2
- package/dist/withTRPC.d.ts.map +1 -1
- package/package.json +7 -7
- package/src/createTRPCNext.tsx +1 -2
- package/src/withTRPC.tsx +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTRPCNext.d.ts","sourceRoot":"","sources":["../src/createTRPCNext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EAIzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,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;
|
|
1
|
+
{"version":3,"file":"createTRPCNext.d.ts","sourceRoot":"","sources":["../src/createTRPCNext.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EAIzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,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;kBASjD,sBAAsB,OAAO,EAAE,WAAW,CAAC;;4DAqB5D"}
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ function withTRPC(opts) {
|
|
|
36
36
|
const { config: getClientConfig } = opts;
|
|
37
37
|
return (AppOrPage)=>{
|
|
38
38
|
const trpc = reactQuery.createReactQueryHooks({
|
|
39
|
-
unstable_overrides: opts.
|
|
39
|
+
unstable_overrides: opts.unstable_overrides
|
|
40
40
|
});
|
|
41
41
|
const WithTRPC = (props)=>{
|
|
42
42
|
const [prepassProps] = React.useState(()=>{
|
|
@@ -167,9 +167,8 @@ function withTRPC(opts) {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
function createTRPCNext(opts) {
|
|
170
|
-
const unstable_overrides = opts.config({}).unstable_overrides;
|
|
171
170
|
const hooks = shared.createHooksInternal({
|
|
172
|
-
unstable_overrides
|
|
171
|
+
unstable_overrides: opts.unstable_overrides
|
|
173
172
|
});
|
|
174
173
|
// TODO: maybe set TSSRContext to `never` when using `WithTRPCNoSSROptions`
|
|
175
174
|
const _withTRPC = withTRPC(opts);
|
package/dist/index.mjs
CHANGED
|
@@ -27,7 +27,7 @@ function withTRPC(opts) {
|
|
|
27
27
|
const { config: getClientConfig } = opts;
|
|
28
28
|
return (AppOrPage)=>{
|
|
29
29
|
const trpc = createReactQueryHooks({
|
|
30
|
-
unstable_overrides: opts.
|
|
30
|
+
unstable_overrides: opts.unstable_overrides
|
|
31
31
|
});
|
|
32
32
|
const WithTRPC = (props)=>{
|
|
33
33
|
const [prepassProps] = useState(()=>{
|
|
@@ -158,9 +158,8 @@ function withTRPC(opts) {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
function createTRPCNext(opts) {
|
|
161
|
-
const unstable_overrides = opts.config({}).unstable_overrides;
|
|
162
161
|
const hooks = createHooksInternal({
|
|
163
|
-
unstable_overrides
|
|
162
|
+
unstable_overrides: opts.unstable_overrides
|
|
164
163
|
});
|
|
165
164
|
// TODO: maybe set TSSRContext to `never` when using `WithTRPCNoSSROptions`
|
|
166
165
|
const _withTRPC = withTRPC(opts);
|
package/dist/withTRPC.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import type { AnyRouter, ResponseMeta } from '@trpc/server';
|
|
|
5
5
|
import { NextComponentType, NextPageContext } from 'next/dist/shared/lib/utils';
|
|
6
6
|
export declare type WithTRPCConfig<TRouter extends AnyRouter> = CreateTRPCClientOptions<TRouter> & {
|
|
7
7
|
abortOnUnmount?: boolean;
|
|
8
|
-
} & CreateTRPCReactQueryClientConfig
|
|
9
|
-
interface WithTRPCOptions<TRouter extends AnyRouter> {
|
|
8
|
+
} & CreateTRPCReactQueryClientConfig;
|
|
9
|
+
interface WithTRPCOptions<TRouter extends AnyRouter> extends CreateTRPCReactOptions<TRouter> {
|
|
10
10
|
config: (info: {
|
|
11
11
|
ctx?: NextPageContext;
|
|
12
12
|
}) => WithTRPCConfig<TRouter>;
|
package/dist/withTRPC.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withTRPC.d.ts","sourceRoot":"","sources":["../src/withTRPC.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAEL,eAAe,EAIhB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAEjC,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,SAAS,EAAe,YAAY,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EAGL,iBAAiB,EACjB,eAAe,EAChB,MAAM,4BAA4B,CAAC;AA2BpC,oBAAY,cAAc,CAAC,OAAO,SAAS,SAAS,IAClD,uBAAuB,CAAC,OAAO,CAAC,GAAG;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,GAAG,gCAAgC,
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,IAAI,EAAE,oBAAoB,CAAC,OAAO,CAAC,GAAG,kBAAkB,CAAC,OAAO,CAAC,eAU9C,kBAAkB,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,KAAG,iBAAiB,CA+KxE"}
|
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.24",
|
|
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.
|
|
39
|
+
"@trpc/client": "10.0.0-proxy-beta.24",
|
|
40
40
|
"@trpc/react-query": "^10.0.0-proxy-beta.21",
|
|
41
|
-
"@trpc/server": "10.0.0-proxy-beta.
|
|
41
|
+
"@trpc/server": "10.0.0-proxy-beta.24",
|
|
42
42
|
"next": "*",
|
|
43
43
|
"react": ">=16.8.0",
|
|
44
44
|
"react-dom": ">=16.8.0"
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@tanstack/react-query": "^4.3.8",
|
|
51
|
-
"@trpc/client": "10.0.0-proxy-beta.
|
|
52
|
-
"@trpc/react-query": "^10.0.0-proxy-beta.
|
|
53
|
-
"@trpc/server": "10.0.0-proxy-beta.
|
|
51
|
+
"@trpc/client": "10.0.0-proxy-beta.24",
|
|
52
|
+
"@trpc/react-query": "^10.0.0-proxy-beta.24",
|
|
53
|
+
"@trpc/server": "10.0.0-proxy-beta.24",
|
|
54
54
|
"@types/express": "^4.17.12",
|
|
55
55
|
"@types/node": "^18.7.20",
|
|
56
56
|
"express": "^4.17.1",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "3ebdffbd40b9bce0f993877f6d65fb89336549b8"
|
|
66
66
|
}
|
package/src/createTRPCNext.tsx
CHANGED
|
@@ -15,9 +15,8 @@ export function createTRPCNext<
|
|
|
15
15
|
TRouter extends AnyRouter,
|
|
16
16
|
TSSRContext extends NextPageContext = NextPageContext,
|
|
17
17
|
>(opts: WithTRPCNoSSROptions<TRouter> | WithTRPCSSROptions<TRouter>) {
|
|
18
|
-
const unstable_overrides = opts.config({}).unstable_overrides;
|
|
19
18
|
const hooks = createHooksInternal<TRouter, TSSRContext>({
|
|
20
|
-
unstable_overrides,
|
|
19
|
+
unstable_overrides: opts.unstable_overrides,
|
|
21
20
|
});
|
|
22
21
|
|
|
23
22
|
// TODO: maybe set TSSRContext to `never` when using `WithTRPCNoSSROptions`
|
package/src/withTRPC.tsx
CHANGED
|
@@ -58,10 +58,10 @@ function transformQueryOrMutationCacheErrors<
|
|
|
58
58
|
export type WithTRPCConfig<TRouter extends AnyRouter> =
|
|
59
59
|
CreateTRPCClientOptions<TRouter> & {
|
|
60
60
|
abortOnUnmount?: boolean;
|
|
61
|
-
} & CreateTRPCReactQueryClientConfig
|
|
62
|
-
CreateTRPCReactOptions<TRouter>;
|
|
61
|
+
} & CreateTRPCReactQueryClientConfig;
|
|
63
62
|
|
|
64
|
-
interface WithTRPCOptions<TRouter extends AnyRouter>
|
|
63
|
+
interface WithTRPCOptions<TRouter extends AnyRouter>
|
|
64
|
+
extends CreateTRPCReactOptions<TRouter> {
|
|
65
65
|
config: (info: { ctx?: NextPageContext }) => WithTRPCConfig<TRouter>;
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -93,7 +93,7 @@ export function withTRPC<
|
|
|
93
93
|
};
|
|
94
94
|
return (AppOrPage: NextComponentType<any, any, any>): NextComponentType => {
|
|
95
95
|
const trpc = createReactQueryHooks<TRouter, TSSRContext>({
|
|
96
|
-
unstable_overrides: opts.
|
|
96
|
+
unstable_overrides: opts.unstable_overrides,
|
|
97
97
|
});
|
|
98
98
|
|
|
99
99
|
const WithTRPC = (
|