@orpc/server 0.0.0-next.c0088c7 → 0.0.0-next.c0afbea
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/README.md +3 -1
- package/dist/adapters/fetch/index.d.mts +3 -3
- package/dist/adapters/fetch/index.d.ts +3 -3
- package/dist/adapters/fetch/index.mjs +3 -3
- package/dist/adapters/hono/index.d.mts +2 -2
- package/dist/adapters/hono/index.d.ts +2 -2
- package/dist/adapters/hono/index.mjs +3 -3
- package/dist/adapters/next/index.d.mts +2 -2
- package/dist/adapters/next/index.d.ts +2 -2
- package/dist/adapters/next/index.mjs +3 -3
- package/dist/adapters/node/index.d.mts +3 -3
- package/dist/adapters/node/index.d.ts +3 -3
- package/dist/adapters/node/index.mjs +2 -2
- package/dist/adapters/standard/index.d.mts +4 -4
- package/dist/adapters/standard/index.d.ts +4 -4
- package/dist/adapters/standard/index.mjs +2 -2
- package/dist/index.d.mts +120 -106
- package/dist/index.d.ts +120 -106
- package/dist/index.mjs +39 -29
- package/dist/plugins/index.d.mts +12 -12
- package/dist/plugins/index.d.ts +12 -12
- package/dist/plugins/index.mjs +1 -1
- package/dist/shared/{server.Drm1Lma3.d.ts → server.CM3tWr3C.d.mts} +12 -14
- package/dist/shared/{server.V6zT5iYQ.mjs → server.CMrS28Go.mjs} +124 -157
- package/dist/shared/server.CPteJIPP.d.mts +143 -0
- package/dist/shared/server.CPteJIPP.d.ts +143 -0
- package/dist/shared/{server.DKrKGnk2.mjs → server.CSZRzcSW.mjs} +8 -11
- package/dist/shared/{server.BHIDiY4a.mjs → server.Cq3B6PoL.mjs} +1 -1
- package/dist/shared/{server.CtBp-i4f.d.mts → server.DmW25ynm.d.ts} +12 -14
- package/package.json +7 -7
- package/dist/shared/server.ptXwNGQr.d.mts +0 -158
- package/dist/shared/server.ptXwNGQr.d.ts +0 -158
package/README.md
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
- **Contract-First Development 📜**: (Optional) Define your API contract upfront and implement it with confidence.
|
33
33
|
- **Exceptional Developer Experience ✨**: Enjoy a streamlined workflow with robust typing and clear, in-code documentation.
|
34
34
|
- **Multi-Runtime Support 🌍**: Run your code seamlessly on Cloudflare, Deno, Bun, Node.js, and more.
|
35
|
-
- **Framework Integrations 🧩**: Supports Tanstack Query (React, Vue), Pinia Colada, and more.
|
35
|
+
- **Framework Integrations 🧩**: Supports Tanstack Query (React, Vue, Solid, Svelte), Pinia Colada, and more.
|
36
36
|
- **Server Actions ⚡️**: Fully compatible with React Server Actions on Next.js, TanStack Start, and more.
|
37
37
|
- **Standard Schema Support 🗂️**: Effortlessly work with Zod, Valibot, ArkType, and others right out of the box.
|
38
38
|
- **Fast & Lightweight 💨**: Built on native APIs across all runtimes – optimized for speed and efficiency.
|
@@ -55,6 +55,8 @@ You can find the full documentation [here](https://orpc.unnoq.com).
|
|
55
55
|
- [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume your API on the client with type-safety.
|
56
56
|
- [@orpc/react-query](https://www.npmjs.com/package/@orpc/react-query): Integration with [React Query](https://tanstack.com/query/latest/docs/framework/react/overview).
|
57
57
|
- [@orpc/vue-query](https://www.npmjs.com/package/@orpc/vue-query): Integration with [Vue Query](https://tanstack.com/query/latest/docs/framework/vue/overview).
|
58
|
+
- [@orpc/solid-query](https://www.npmjs.com/package/@orpc/solid-query): Integration with [Solid Query](https://tanstack.com/query/latest/docs/framework/solid/overview).
|
59
|
+
- [@orpc/svelte-query](https://www.npmjs.com/package/@orpc/svelte-query): Integration with [Svelte Query](https://tanstack.com/query/latest/docs/framework/svelte/overview).
|
58
60
|
- [@orpc/vue-colada](https://www.npmjs.com/package/@orpc/vue-colada): Integration with [Pinia Colada](https://pinia-colada.esm.dev/).
|
59
61
|
- [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Generate OpenAPI specs and handle OpenAPI requests.
|
60
62
|
- [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): More schemas that [Zod](https://zod.dev/) doesn't support yet.
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
2
2
|
import { ToFetchResponseOptions } from '@orpc/standard-server-fetch';
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
4
|
-
import { S as StandardHandleOptions, b as StandardHandlerOptions } from '../../shared/server.
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.CPteJIPP.mjs';
|
4
|
+
import { S as StandardHandleOptions, b as StandardHandlerOptions } from '../../shared/server.CM3tWr3C.mjs';
|
5
5
|
import '@orpc/client';
|
6
6
|
import '@orpc/contract';
|
7
7
|
import '@orpc/standard-server';
|
@@ -19,7 +19,7 @@ interface FetchHandler<T extends Context> {
|
|
19
19
|
|
20
20
|
declare class RPCHandler<T extends Context> implements FetchHandler<T> {
|
21
21
|
private readonly standardHandler;
|
22
|
-
constructor(router: Router<
|
22
|
+
constructor(router: Router<any, T>, options?: NoInfer<StandardHandlerOptions<T>>);
|
23
23
|
handle(request: Request, ...[options,]: MaybeOptionalOptions<StandardHandleOptions<T> & ToFetchResponseOptions>): Promise<FetchHandleResult>;
|
24
24
|
}
|
25
25
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
2
2
|
import { ToFetchResponseOptions } from '@orpc/standard-server-fetch';
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
4
|
-
import { S as StandardHandleOptions, b as StandardHandlerOptions } from '../../shared/server.
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.CPteJIPP.js';
|
4
|
+
import { S as StandardHandleOptions, b as StandardHandlerOptions } from '../../shared/server.DmW25ynm.js';
|
5
5
|
import '@orpc/client';
|
6
6
|
import '@orpc/contract';
|
7
7
|
import '@orpc/standard-server';
|
@@ -19,7 +19,7 @@ interface FetchHandler<T extends Context> {
|
|
19
19
|
|
20
20
|
declare class RPCHandler<T extends Context> implements FetchHandler<T> {
|
21
21
|
private readonly standardHandler;
|
22
|
-
constructor(router: Router<
|
22
|
+
constructor(router: Router<any, T>, options?: NoInfer<StandardHandlerOptions<T>>);
|
23
23
|
handle(request: Request, ...[options,]: MaybeOptionalOptions<StandardHandleOptions<T> & ToFetchResponseOptions>): Promise<FetchHandleResult>;
|
24
24
|
}
|
25
25
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
export { R as RPCHandler } from '../../shared/server.
|
1
|
+
export { R as RPCHandler } from '../../shared/server.Cq3B6PoL.mjs';
|
2
2
|
import '@orpc/client/standard';
|
3
3
|
import '@orpc/standard-server-fetch';
|
4
|
-
import '../../shared/server.
|
4
|
+
import '../../shared/server.CSZRzcSW.mjs';
|
5
5
|
import '@orpc/client';
|
6
6
|
import '@orpc/shared';
|
7
7
|
import '../../shared/server.Q6ZmnTgO.mjs';
|
8
|
-
import '../../shared/server.
|
8
|
+
import '../../shared/server.CMrS28Go.mjs';
|
9
9
|
import '@orpc/contract';
|
@@ -2,8 +2,8 @@ import { FetchHandler } from '../fetch/index.mjs';
|
|
2
2
|
export { FetchHandleResult, RPCHandler } from '../fetch/index.mjs';
|
3
3
|
import { Value, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { Context as Context$1, MiddlewareHandler } from 'hono';
|
5
|
-
import { C as Context } from '../../shared/server.
|
6
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
+
import { C as Context } from '../../shared/server.CPteJIPP.mjs';
|
6
|
+
import { S as StandardHandleOptions } from '../../shared/server.CM3tWr3C.mjs';
|
7
7
|
import '@orpc/standard-server-fetch';
|
8
8
|
import '@orpc/client';
|
9
9
|
import '@orpc/contract';
|
@@ -2,8 +2,8 @@ import { FetchHandler } from '../fetch/index.js';
|
|
2
2
|
export { FetchHandleResult, RPCHandler } from '../fetch/index.js';
|
3
3
|
import { Value, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { Context as Context$1, MiddlewareHandler } from 'hono';
|
5
|
-
import { C as Context } from '../../shared/server.
|
6
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
+
import { C as Context } from '../../shared/server.CPteJIPP.js';
|
6
|
+
import { S as StandardHandleOptions } from '../../shared/server.DmW25ynm.js';
|
7
7
|
import '@orpc/standard-server-fetch';
|
8
8
|
import '@orpc/client';
|
9
9
|
import '@orpc/contract';
|
@@ -1,11 +1,11 @@
|
|
1
|
-
export { R as RPCHandler } from '../../shared/server.
|
1
|
+
export { R as RPCHandler } from '../../shared/server.Cq3B6PoL.mjs';
|
2
2
|
import { value } from '@orpc/shared';
|
3
3
|
import '@orpc/client/standard';
|
4
4
|
import '@orpc/standard-server-fetch';
|
5
|
-
import '../../shared/server.
|
5
|
+
import '../../shared/server.CSZRzcSW.mjs';
|
6
6
|
import '@orpc/client';
|
7
7
|
import '../../shared/server.Q6ZmnTgO.mjs';
|
8
|
-
import '../../shared/server.
|
8
|
+
import '../../shared/server.CMrS28Go.mjs';
|
9
9
|
import '@orpc/contract';
|
10
10
|
|
11
11
|
function createMiddleware(handler, ...[options]) {
|
@@ -2,8 +2,8 @@ import { FetchHandler } from '../fetch/index.mjs';
|
|
2
2
|
export { FetchHandleResult, RPCHandler } from '../fetch/index.mjs';
|
3
3
|
import { Value, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { NextRequest } from 'next/server';
|
5
|
-
import { C as Context } from '../../shared/server.
|
6
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
+
import { C as Context } from '../../shared/server.CPteJIPP.mjs';
|
6
|
+
import { S as StandardHandleOptions } from '../../shared/server.CM3tWr3C.mjs';
|
7
7
|
import '@orpc/standard-server-fetch';
|
8
8
|
import '@orpc/client';
|
9
9
|
import '@orpc/contract';
|
@@ -2,8 +2,8 @@ import { FetchHandler } from '../fetch/index.js';
|
|
2
2
|
export { FetchHandleResult, RPCHandler } from '../fetch/index.js';
|
3
3
|
import { Value, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { NextRequest } from 'next/server';
|
5
|
-
import { C as Context } from '../../shared/server.
|
6
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
+
import { C as Context } from '../../shared/server.CPteJIPP.js';
|
6
|
+
import { S as StandardHandleOptions } from '../../shared/server.DmW25ynm.js';
|
7
7
|
import '@orpc/standard-server-fetch';
|
8
8
|
import '@orpc/client';
|
9
9
|
import '@orpc/contract';
|
@@ -1,11 +1,11 @@
|
|
1
|
-
export { R as RPCHandler } from '../../shared/server.
|
1
|
+
export { R as RPCHandler } from '../../shared/server.Cq3B6PoL.mjs';
|
2
2
|
import { value } from '@orpc/shared';
|
3
3
|
import '@orpc/client/standard';
|
4
4
|
import '@orpc/standard-server-fetch';
|
5
|
-
import '../../shared/server.
|
5
|
+
import '../../shared/server.CSZRzcSW.mjs';
|
6
6
|
import '@orpc/client';
|
7
7
|
import '../../shared/server.Q6ZmnTgO.mjs';
|
8
|
-
import '../../shared/server.
|
8
|
+
import '../../shared/server.CMrS28Go.mjs';
|
9
9
|
import '@orpc/contract';
|
10
10
|
|
11
11
|
function serve(handler, ...[options]) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
2
2
|
import { SendStandardResponseOptions } from '@orpc/standard-server-node';
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
4
|
-
import { S as StandardHandleOptions, b as StandardHandlerOptions } from '../../shared/server.
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.CPteJIPP.mjs';
|
4
|
+
import { S as StandardHandleOptions, b as StandardHandlerOptions } from '../../shared/server.CM3tWr3C.mjs';
|
5
5
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
6
6
|
import { Http2ServerRequest, Http2ServerResponse } from 'node:http2';
|
7
7
|
import '@orpc/client';
|
@@ -27,7 +27,7 @@ interface NodeHttpHandler<T extends Context> {
|
|
27
27
|
|
28
28
|
declare class RPCHandler<T extends Context> implements NodeHttpHandler<T> {
|
29
29
|
private readonly standardHandler;
|
30
|
-
constructor(router: Router<
|
30
|
+
constructor(router: Router<any, T>, options?: NoInfer<StandardHandlerOptions<T>>);
|
31
31
|
handle(req: NodeHttpRequest, res: NodeHttpResponse, ...[options,]: MaybeOptionalOptions<StandardHandleOptions<T> & SendStandardResponseOptions>): Promise<NodeHttpHandleResult>;
|
32
32
|
}
|
33
33
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
2
2
|
import { SendStandardResponseOptions } from '@orpc/standard-server-node';
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
4
|
-
import { S as StandardHandleOptions, b as StandardHandlerOptions } from '../../shared/server.
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.CPteJIPP.js';
|
4
|
+
import { S as StandardHandleOptions, b as StandardHandlerOptions } from '../../shared/server.DmW25ynm.js';
|
5
5
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
6
6
|
import { Http2ServerRequest, Http2ServerResponse } from 'node:http2';
|
7
7
|
import '@orpc/client';
|
@@ -27,7 +27,7 @@ interface NodeHttpHandler<T extends Context> {
|
|
27
27
|
|
28
28
|
declare class RPCHandler<T extends Context> implements NodeHttpHandler<T> {
|
29
29
|
private readonly standardHandler;
|
30
|
-
constructor(router: Router<
|
30
|
+
constructor(router: Router<any, T>, options?: NoInfer<StandardHandlerOptions<T>>);
|
31
31
|
handle(req: NodeHttpRequest, res: NodeHttpResponse, ...[options,]: MaybeOptionalOptions<StandardHandleOptions<T> & SendStandardResponseOptions>): Promise<NodeHttpHandleResult>;
|
32
32
|
}
|
33
33
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { RPCSerializer } from '@orpc/client/standard';
|
2
2
|
import { toStandardLazyRequest, sendStandardResponse } from '@orpc/standard-server-node';
|
3
|
-
import { S as StandardHandler, a as RPCMatcher, R as RPCCodec } from '../../shared/server.
|
3
|
+
import { S as StandardHandler, a as RPCMatcher, R as RPCCodec } from '../../shared/server.CSZRzcSW.mjs';
|
4
4
|
import '@orpc/client';
|
5
5
|
import '@orpc/shared';
|
6
6
|
import '../../shared/server.Q6ZmnTgO.mjs';
|
7
|
-
import '../../shared/server.
|
7
|
+
import '../../shared/server.CMrS28Go.mjs';
|
8
8
|
import '@orpc/contract';
|
9
9
|
|
10
10
|
class RPCHandler {
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { c as StandardCodec, d as StandardParams, e as StandardMatcher, f as StandardMatchResult } from '../../shared/server.
|
2
|
-
export { S as StandardHandleOptions, g as StandardHandleResult, h as StandardHandler, a as StandardHandlerInterceptorOptions, b as StandardHandlerOptions
|
1
|
+
import { c as StandardCodec, d as StandardParams, e as StandardMatcher, f as StandardMatchResult } from '../../shared/server.CM3tWr3C.mjs';
|
2
|
+
export { S as StandardHandleOptions, g as StandardHandleResult, h as StandardHandler, a as StandardHandlerInterceptorOptions, b as StandardHandlerOptions } from '../../shared/server.CM3tWr3C.mjs';
|
3
3
|
import { ORPCError } from '@orpc/client';
|
4
4
|
import { RPCSerializer } from '@orpc/client/standard';
|
5
5
|
import { StandardLazyRequest, StandardResponse } from '@orpc/standard-server';
|
6
|
-
import { A as AnyProcedure, a as AnyRouter } from '../../shared/server.
|
6
|
+
import { A as AnyProcedure, a as AnyRouter } from '../../shared/server.CPteJIPP.mjs';
|
7
7
|
import { HTTPPath } from '@orpc/contract';
|
8
8
|
import '@orpc/shared';
|
9
9
|
|
@@ -18,7 +18,7 @@ declare class RPCCodec implements StandardCodec {
|
|
18
18
|
declare class RPCMatcher implements StandardMatcher {
|
19
19
|
private readonly tree;
|
20
20
|
private pendingRouters;
|
21
|
-
init(router: AnyRouter, path?: string[]): void;
|
21
|
+
init(router: AnyRouter, path?: readonly string[]): void;
|
22
22
|
match(_method: string, pathname: HTTPPath): Promise<StandardMatchResult>;
|
23
23
|
}
|
24
24
|
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { c as StandardCodec, d as StandardParams, e as StandardMatcher, f as StandardMatchResult } from '../../shared/server.
|
2
|
-
export { S as StandardHandleOptions, g as StandardHandleResult, h as StandardHandler, a as StandardHandlerInterceptorOptions, b as StandardHandlerOptions
|
1
|
+
import { c as StandardCodec, d as StandardParams, e as StandardMatcher, f as StandardMatchResult } from '../../shared/server.DmW25ynm.js';
|
2
|
+
export { S as StandardHandleOptions, g as StandardHandleResult, h as StandardHandler, a as StandardHandlerInterceptorOptions, b as StandardHandlerOptions } from '../../shared/server.DmW25ynm.js';
|
3
3
|
import { ORPCError } from '@orpc/client';
|
4
4
|
import { RPCSerializer } from '@orpc/client/standard';
|
5
5
|
import { StandardLazyRequest, StandardResponse } from '@orpc/standard-server';
|
6
|
-
import { A as AnyProcedure, a as AnyRouter } from '../../shared/server.
|
6
|
+
import { A as AnyProcedure, a as AnyRouter } from '../../shared/server.CPteJIPP.js';
|
7
7
|
import { HTTPPath } from '@orpc/contract';
|
8
8
|
import '@orpc/shared';
|
9
9
|
|
@@ -18,7 +18,7 @@ declare class RPCCodec implements StandardCodec {
|
|
18
18
|
declare class RPCMatcher implements StandardMatcher {
|
19
19
|
private readonly tree;
|
20
20
|
private pendingRouters;
|
21
|
-
init(router: AnyRouter, path?: string[]): void;
|
21
|
+
init(router: AnyRouter, path?: readonly string[]): void;
|
22
22
|
match(_method: string, pathname: HTTPPath): Promise<StandardMatchResult>;
|
23
23
|
}
|
24
24
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
export { R as RPCCodec, a as RPCMatcher, S as StandardHandler } from '../../shared/server.
|
1
|
+
export { R as RPCCodec, a as RPCMatcher, S as StandardHandler } from '../../shared/server.CSZRzcSW.mjs';
|
2
2
|
import '@orpc/client';
|
3
3
|
import '@orpc/shared';
|
4
4
|
import '../../shared/server.Q6ZmnTgO.mjs';
|
5
|
-
import '../../shared/server.
|
5
|
+
import '../../shared/server.CMrS28Go.mjs';
|
6
6
|
import '@orpc/contract';
|