@orpc/server 0.0.0-next.316c163 → 0.0.0-next.331b26b
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/chunk-3BAPJGK6.js +302 -0
- package/dist/{chunk-FN62GL22.js → chunk-E7GUWVR4.js} +20 -16
- package/dist/chunk-WUOGVGWG.js +1 -0
- package/dist/fetch.js +11 -108
- package/dist/hono.js +30 -0
- package/dist/index.js +15 -12
- package/dist/next.js +36 -0
- package/dist/node.js +87 -0
- package/dist/src/adapters/fetch/index.d.ts +6 -0
- package/dist/src/adapters/fetch/orpc-handler.d.ts +20 -0
- package/dist/src/adapters/fetch/orpc-payload-codec.d.ts +16 -0
- package/dist/src/adapters/fetch/orpc-procedure-matcher.d.ts +12 -0
- package/dist/src/adapters/fetch/super-json.d.ts +12 -0
- package/dist/src/adapters/fetch/types.d.ts +21 -0
- package/dist/src/adapters/hono/index.d.ts +3 -0
- package/dist/src/adapters/hono/middleware.d.ts +12 -0
- package/dist/src/adapters/next/index.d.ts +3 -0
- package/dist/src/adapters/next/serve.d.ts +19 -0
- package/dist/src/adapters/node/index.d.ts +5 -0
- package/dist/src/adapters/node/orpc-handler.d.ts +12 -0
- package/dist/src/adapters/node/request-listener.d.ts +28 -0
- package/dist/src/adapters/node/types.d.ts +22 -0
- package/dist/src/builder.d.ts +2 -2
- package/dist/src/index.d.ts +1 -0
- package/dist/src/lazy-decorated.d.ts +1 -1
- package/dist/src/middleware.d.ts +16 -6
- package/dist/src/procedure-builder.d.ts +2 -2
- package/dist/src/procedure-client.d.ts +11 -6
- package/dist/src/procedure-decorated.d.ts +8 -8
- package/dist/src/procedure-implementer.d.ts +2 -2
- package/dist/src/procedure.d.ts +15 -8
- package/dist/src/router-client.d.ts +3 -3
- package/dist/src/types.d.ts +2 -0
- package/package.json +22 -10
- package/dist/src/fetch/handle-request.d.ts +0 -7
- package/dist/src/fetch/index.d.ts +0 -4
- package/dist/src/fetch/orpc-handler.d.ts +0 -3
- package/dist/src/fetch/types.d.ts +0 -28
@@ -1,28 +0,0 @@
|
|
1
|
-
import type { HTTPPath } from '@orpc/contract';
|
2
|
-
import type { Hooks, Value } from '@orpc/shared';
|
3
|
-
import type { Router } from '../router';
|
4
|
-
import type { Context, WithSignal } from '../types';
|
5
|
-
export type FetchHandlerOptions<T extends Context> = {
|
6
|
-
/**
|
7
|
-
* The `router` used for handling the request and routing,
|
8
|
-
*
|
9
|
-
*/
|
10
|
-
router: Router<T, any>;
|
11
|
-
/**
|
12
|
-
* The request need to be handled.
|
13
|
-
*/
|
14
|
-
request: Request;
|
15
|
-
/**
|
16
|
-
* Remove the prefix from the request path.
|
17
|
-
*
|
18
|
-
* @example /orpc
|
19
|
-
* @example /api
|
20
|
-
*/
|
21
|
-
prefix?: HTTPPath;
|
22
|
-
} & NoInfer<(undefined extends T ? {
|
23
|
-
context?: Value<T>;
|
24
|
-
} : {
|
25
|
-
context: Value<T>;
|
26
|
-
})> & WithSignal & Hooks<Request, Response, T, WithSignal>;
|
27
|
-
export type FetchHandler = <T extends Context>(options: FetchHandlerOptions<T>) => Promise<Response | undefined>;
|
28
|
-
//# sourceMappingURL=types.d.ts.map
|