@orpc/react 0.0.0-next.fa8d145 → 0.0.0-next.fb0d07c

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.
@@ -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
  }
@@ -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
  }
@@ -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
@@ -1,11 +1,12 @@
1
1
  import { AnySchema } from '@orpc/contract';
2
2
  import { Context, ErrorMap, Meta, Lazyable, Procedure, CreateProcedureClientOptions } from '@orpc/server';
3
3
  import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
4
+ export { getIssueMessage, parseFormData } from '@orpc/openapi-client/standard';
4
5
 
5
6
  interface FormAction {
6
7
  (form: FormData): Promise<void>;
7
8
  }
8
- declare const orpcErrorToNextHttpFallbackInterceptor: Interceptor<any, any, any>;
9
+ declare const orpcErrorToNextHttpFallbackInterceptor: Interceptor<any, Promise<any>>;
9
10
  /**
10
11
  * Create a server action accept a form data and deserialize with bracket notation.
11
12
  *
package/dist/index.d.ts CHANGED
@@ -1,11 +1,12 @@
1
1
  import { AnySchema } from '@orpc/contract';
2
2
  import { Context, ErrorMap, Meta, Lazyable, Procedure, CreateProcedureClientOptions } from '@orpc/server';
3
3
  import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
4
+ export { getIssueMessage, parseFormData } from '@orpc/openapi-client/standard';
4
5
 
5
6
  interface FormAction {
6
7
  (form: FormData): Promise<void>;
7
8
  }
8
- declare const orpcErrorToNextHttpFallbackInterceptor: Interceptor<any, any, any>;
9
+ declare const orpcErrorToNextHttpFallbackInterceptor: Interceptor<any, Promise<any>>;
9
10
  /**
10
11
  * Create a server action accept a form data and deserialize with bracket notation.
11
12
  *
package/dist/index.mjs CHANGED
@@ -1,5 +1,6 @@
1
1
  import { ORPCError, createORPCErrorFromJson } from '@orpc/client';
2
2
  import { StandardBracketNotationSerializer } from '@orpc/openapi-client/standard';
3
+ export { getIssueMessage, parseFormData } from '@orpc/openapi-client/standard';
3
4
  import { createProcedureClient } from '@orpc/server';
4
5
  import { onError, resolveMaybeOptionalOptions, toArray } from '@orpc/shared';
5
6
 
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.fa8d145",
4
+ "version": "0.0.0-next.fb0d07c",
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.fa8d145",
38
- "@orpc/contract": "0.0.0-next.fa8d145",
39
- "@orpc/openapi-client": "0.0.0-next.fa8d145",
40
- "@orpc/server": "0.0.0-next.fa8d145",
41
- "@orpc/shared": "0.0.0-next.fa8d145"
37
+ "@orpc/contract": "0.0.0-next.fb0d07c",
38
+ "@orpc/client": "0.0.0-next.fb0d07c",
39
+ "@orpc/openapi-client": "0.0.0-next.fb0d07c",
40
+ "@orpc/shared": "0.0.0-next.fb0d07c",
41
+ "@orpc/server": "0.0.0-next.fb0d07c"
42
42
  },
43
43
  "devDependencies": {
44
44
  "react": "^19.1.0",
45
- "zod": "3.25.0-beta.20250516T005923"
45
+ "zod": "^3.25.11"
46
46
  },
47
47
  "scripts": {
48
48
  "build": "unbuild",