@orpc/react 0.0.0-next.fd13879 → 0.0.0-next.fd6982a
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/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/package.json +7 -7
package/dist/hooks/index.d.mts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { SafeResult, ORPCErrorJSON } from '@orpc/client';
|
2
2
|
import { ActionableClient, UnactionableError } from '@orpc/server';
|
3
|
-
import { Interceptor } from '@orpc/shared';
|
3
|
+
import { Interceptor, PromiseWithError } from '@orpc/shared';
|
4
4
|
|
5
5
|
interface UseServerActionOptions<TInput, TOutput, TError> {
|
6
6
|
interceptors?: Interceptor<{
|
7
7
|
input: TInput;
|
8
|
-
}, TOutput, TError
|
8
|
+
}, PromiseWithError<TOutput, TError>>[];
|
9
9
|
}
|
10
10
|
interface UseServerActionExecuteOptions<TInput, TOutput, TError> extends Pick<UseServerActionOptions<TInput, TOutput, TError>, 'interceptors'> {
|
11
11
|
}
|
package/dist/hooks/index.d.ts
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { SafeResult, ORPCErrorJSON } from '@orpc/client';
|
2
2
|
import { ActionableClient, UnactionableError } from '@orpc/server';
|
3
|
-
import { Interceptor } from '@orpc/shared';
|
3
|
+
import { Interceptor, PromiseWithError } from '@orpc/shared';
|
4
4
|
|
5
5
|
interface UseServerActionOptions<TInput, TOutput, TError> {
|
6
6
|
interceptors?: Interceptor<{
|
7
7
|
input: TInput;
|
8
|
-
}, TOutput, TError
|
8
|
+
}, PromiseWithError<TOutput, TError>>[];
|
9
9
|
}
|
10
10
|
interface UseServerActionExecuteOptions<TInput, TOutput, TError> extends Pick<UseServerActionOptions<TInput, TOutput, TError>, 'interceptors'> {
|
11
11
|
}
|
package/dist/hooks/index.mjs
CHANGED
@@ -39,7 +39,7 @@ function useServerAction(action, options = {}) {
|
|
39
39
|
const result2 = await safe(intercept(
|
40
40
|
[...toArray(options.interceptors), ...toArray(executeOptions.interceptors)],
|
41
41
|
{ input: input2 },
|
42
|
-
({ input: input3 }) => action(input3).then(([error, data]) => {
|
42
|
+
async ({ input: input3 }) => action(input3).then(([error, data]) => {
|
43
43
|
if (error) {
|
44
44
|
throw createORPCErrorFromJson(error);
|
45
45
|
}
|
package/dist/index.d.mts
CHANGED
@@ -6,7 +6,7 @@ export { getIssueMessage, parseFormData } from '@orpc/openapi-client/standard';
|
|
6
6
|
interface FormAction {
|
7
7
|
(form: FormData): Promise<void>;
|
8
8
|
}
|
9
|
-
declare const orpcErrorToNextHttpFallbackInterceptor: Interceptor<any, any
|
9
|
+
declare const orpcErrorToNextHttpFallbackInterceptor: Interceptor<any, Promise<any>>;
|
10
10
|
/**
|
11
11
|
* Create a server action accept a form data and deserialize with bracket notation.
|
12
12
|
*
|
package/dist/index.d.ts
CHANGED
@@ -6,7 +6,7 @@ export { getIssueMessage, parseFormData } from '@orpc/openapi-client/standard';
|
|
6
6
|
interface FormAction {
|
7
7
|
(form: FormData): Promise<void>;
|
8
8
|
}
|
9
|
-
declare const orpcErrorToNextHttpFallbackInterceptor: Interceptor<any, any
|
9
|
+
declare const orpcErrorToNextHttpFallbackInterceptor: Interceptor<any, Promise<any>>;
|
10
10
|
/**
|
11
11
|
* Create a server action accept a form data and deserialize with bracket notation.
|
12
12
|
*
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@orpc/react",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.0.0-next.
|
4
|
+
"version": "0.0.0-next.fd6982a",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -34,15 +34,15 @@
|
|
34
34
|
"react": ">=18.0.0"
|
35
35
|
},
|
36
36
|
"dependencies": {
|
37
|
-
"@orpc/client": "0.0.0-next.
|
38
|
-
"@orpc/
|
39
|
-
"@orpc/
|
40
|
-
"@orpc/
|
41
|
-
"@orpc/
|
37
|
+
"@orpc/client": "0.0.0-next.fd6982a",
|
38
|
+
"@orpc/openapi-client": "0.0.0-next.fd6982a",
|
39
|
+
"@orpc/server": "0.0.0-next.fd6982a",
|
40
|
+
"@orpc/shared": "0.0.0-next.fd6982a",
|
41
|
+
"@orpc/contract": "0.0.0-next.fd6982a"
|
42
42
|
},
|
43
43
|
"devDependencies": {
|
44
44
|
"react": "^19.1.0",
|
45
|
-
"zod": "3.25.
|
45
|
+
"zod": "^3.25.11"
|
46
46
|
},
|
47
47
|
"scripts": {
|
48
48
|
"build": "unbuild",
|