@trpc/next 11.0.0-next-alpha.159 → 11.0.0-next-alpha.166
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/app-dir/client.js
CHANGED
|
@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var client = require('@trpc/client');
|
|
6
6
|
var core = require('@trpc/core');
|
|
7
|
-
var shared$1 = require('@trpc/client/shared');
|
|
8
7
|
var observable = require('@trpc/core/observable');
|
|
9
8
|
var React = require('react');
|
|
10
9
|
var shared = require('../shared-a452b80f.js');
|
|
@@ -14,7 +13,7 @@ function experimental_serverActionLink() {
|
|
|
14
13
|
return (runtime)=>({ op })=>observable.observable((observer)=>{
|
|
15
14
|
const context = op.context;
|
|
16
15
|
context._action(shared.isFormData(op.input) ? op.input : runtime.transformer.serialize(op.input)).then((data)=>{
|
|
17
|
-
const transformed =
|
|
16
|
+
const transformed = core.transformResult(data, runtime.transformer);
|
|
18
17
|
if (!transformed.ok) {
|
|
19
18
|
observer.error(client.TRPCClientError.from(transformed.error, {}));
|
|
20
19
|
return;
|
package/dist/app-dir/client.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TRPCClientError, createTRPCUntypedClient, clientCallTypeToProcedureType } from '@trpc/client';
|
|
2
|
-
import { createRecursiveProxy } from '@trpc/core';
|
|
3
|
-
import { transformResult } from '@trpc/client/shared';
|
|
2
|
+
import { transformResult, createRecursiveProxy } from '@trpc/core';
|
|
4
3
|
import { observable } from '@trpc/core/observable';
|
|
5
4
|
import { useRef, useState, useEffect, useCallback, useMemo } from 'react';
|
|
6
5
|
import { i as isFormData } from '../shared-2f1ecbeb.mjs';
|
|
@@ -10,7 +9,7 @@ function experimental_serverActionLink() {
|
|
|
10
9
|
return (runtime)=>({ op })=>observable((observer)=>{
|
|
11
10
|
const context = op.context;
|
|
12
11
|
context._action(isFormData(op.input) ? op.input : runtime.transformer.serialize(op.input)).then((data)=>{
|
|
13
|
-
const transformed = transformResult(data, runtime);
|
|
12
|
+
const transformed = transformResult(data, runtime.transformer);
|
|
14
13
|
if (!transformed.ok) {
|
|
15
14
|
observer.error(TRPCClientError.from(transformed.error, {}));
|
|
16
15
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"bundleSize":
|
|
3
|
-
"bundleOrigSize":
|
|
4
|
-
"bundleReduction": 31.
|
|
2
|
+
"bundleSize": 22154,
|
|
3
|
+
"bundleOrigSize": 32275,
|
|
4
|
+
"bundleReduction": 31.36,
|
|
5
5
|
"modules": [
|
|
6
6
|
{
|
|
7
7
|
"id": "/src/withTRPC.tsx",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"/src/createTRPCNext.tsx",
|
|
16
16
|
"/src/index.ts"
|
|
17
17
|
],
|
|
18
|
-
"percent": 36.
|
|
18
|
+
"percent": 36.15,
|
|
19
19
|
"reduction": 14.54
|
|
20
20
|
},
|
|
21
21
|
{
|
|
@@ -29,13 +29,13 @@
|
|
|
29
29
|
],
|
|
30
30
|
"removedExports": [],
|
|
31
31
|
"dependents": [],
|
|
32
|
-
"percent": 16.
|
|
32
|
+
"percent": 16.66,
|
|
33
33
|
"reduction": 24.24
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"id": "/src/app-dir/create-action-hook.tsx",
|
|
37
|
-
"size":
|
|
38
|
-
"origSize":
|
|
37
|
+
"size": 3318,
|
|
38
|
+
"origSize": 5723,
|
|
39
39
|
"renderedExports": [
|
|
40
40
|
"experimental_serverActionLink",
|
|
41
41
|
"experimental_createActionHook"
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"dependents": [
|
|
45
45
|
"/src/app-dir/client.ts"
|
|
46
46
|
],
|
|
47
|
-
"percent": 14.
|
|
48
|
-
"reduction": 42.
|
|
47
|
+
"percent": 14.98,
|
|
48
|
+
"reduction": 42.02
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"id": "/src/app-dir/links/nextCache.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
],
|
|
57
57
|
"removedExports": [],
|
|
58
58
|
"dependents": [],
|
|
59
|
-
"percent": 11.
|
|
59
|
+
"percent": 11.22,
|
|
60
60
|
"reduction": 10.16
|
|
61
61
|
},
|
|
62
62
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trpc/next",
|
|
3
|
-
"version": "11.0.0-next-alpha.
|
|
3
|
+
"version": "11.0.0-next-alpha.166+5ecfbf985",
|
|
4
4
|
"description": "The tRPC Next.js library",
|
|
5
5
|
"author": "KATT",
|
|
6
6
|
"license": "MIT",
|
|
@@ -66,20 +66,20 @@
|
|
|
66
66
|
"!**/*.test.*"
|
|
67
67
|
],
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@trpc/core": "11.0.0-next-alpha.
|
|
69
|
+
"@trpc/core": "11.0.0-next-alpha.166+5ecfbf985"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@tanstack/react-query": "^5.0.0",
|
|
73
|
-
"@trpc/client": "11.0.0-next-alpha.
|
|
74
|
-
"@trpc/react-query": "11.0.0-next-alpha.
|
|
73
|
+
"@trpc/client": "11.0.0-next-alpha.166+5ecfbf985",
|
|
74
|
+
"@trpc/react-query": "11.0.0-next-alpha.166+5ecfbf985",
|
|
75
75
|
"next": "*",
|
|
76
76
|
"react": ">=16.8.0",
|
|
77
77
|
"react-dom": ">=16.8.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@tanstack/react-query": "^5.0.0",
|
|
81
|
-
"@trpc/client": "11.0.0-next-alpha.
|
|
82
|
-
"@trpc/react-query": "11.0.0-next-alpha.
|
|
81
|
+
"@trpc/client": "11.0.0-next-alpha.166+5ecfbf985",
|
|
82
|
+
"@trpc/react-query": "11.0.0-next-alpha.166+5ecfbf985",
|
|
83
83
|
"@types/express": "^4.17.17",
|
|
84
84
|
"@types/node": "^20.10.0",
|
|
85
85
|
"@types/react": "^18.2.33",
|
|
@@ -99,5 +99,5 @@
|
|
|
99
99
|
"funding": [
|
|
100
100
|
"https://trpc.io/sponsor"
|
|
101
101
|
],
|
|
102
|
-
"gitHead": "
|
|
102
|
+
"gitHead": "5ecfbf98572f30205bdf18aa7550443d4cf0f7ec"
|
|
103
103
|
}
|
|
@@ -4,7 +4,7 @@ import type {
|
|
|
4
4
|
TRPCRequestOptions,
|
|
5
5
|
} from '@trpc/client';
|
|
6
6
|
import { createTRPCUntypedClient, TRPCClientError } from '@trpc/client';
|
|
7
|
-
import { transformResult } from '@trpc/
|
|
7
|
+
import { transformResult } from '@trpc/core';
|
|
8
8
|
import type {
|
|
9
9
|
AnyRouter,
|
|
10
10
|
MaybePromise,
|
|
@@ -81,7 +81,7 @@ export function experimental_serverActionLink<
|
|
|
81
81
|
: runtime.transformer.serialize(op.input),
|
|
82
82
|
)
|
|
83
83
|
.then((data) => {
|
|
84
|
-
const transformed = transformResult(data, runtime);
|
|
84
|
+
const transformed = transformResult(data, runtime.transformer);
|
|
85
85
|
|
|
86
86
|
if (!transformed.ok) {
|
|
87
87
|
observer.error(TRPCClientError.from(transformed.error, {}));
|