@orpc/server 0.0.0-next.316c163 → 0.0.0-next.331b26b

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/dist/chunk-3BAPJGK6.js +302 -0
  2. package/dist/{chunk-FN62GL22.js → chunk-E7GUWVR4.js} +20 -16
  3. package/dist/chunk-WUOGVGWG.js +1 -0
  4. package/dist/fetch.js +11 -108
  5. package/dist/hono.js +30 -0
  6. package/dist/index.js +15 -12
  7. package/dist/next.js +36 -0
  8. package/dist/node.js +87 -0
  9. package/dist/src/adapters/fetch/index.d.ts +6 -0
  10. package/dist/src/adapters/fetch/orpc-handler.d.ts +20 -0
  11. package/dist/src/adapters/fetch/orpc-payload-codec.d.ts +16 -0
  12. package/dist/src/adapters/fetch/orpc-procedure-matcher.d.ts +12 -0
  13. package/dist/src/adapters/fetch/super-json.d.ts +12 -0
  14. package/dist/src/adapters/fetch/types.d.ts +21 -0
  15. package/dist/src/adapters/hono/index.d.ts +3 -0
  16. package/dist/src/adapters/hono/middleware.d.ts +12 -0
  17. package/dist/src/adapters/next/index.d.ts +3 -0
  18. package/dist/src/adapters/next/serve.d.ts +19 -0
  19. package/dist/src/adapters/node/index.d.ts +5 -0
  20. package/dist/src/adapters/node/orpc-handler.d.ts +12 -0
  21. package/dist/src/adapters/node/request-listener.d.ts +28 -0
  22. package/dist/src/adapters/node/types.d.ts +22 -0
  23. package/dist/src/builder.d.ts +2 -2
  24. package/dist/src/index.d.ts +1 -0
  25. package/dist/src/lazy-decorated.d.ts +1 -1
  26. package/dist/src/middleware.d.ts +16 -6
  27. package/dist/src/procedure-builder.d.ts +2 -2
  28. package/dist/src/procedure-client.d.ts +11 -6
  29. package/dist/src/procedure-decorated.d.ts +8 -8
  30. package/dist/src/procedure-implementer.d.ts +2 -2
  31. package/dist/src/procedure.d.ts +15 -8
  32. package/dist/src/router-client.d.ts +3 -3
  33. package/dist/src/types.d.ts +2 -0
  34. package/package.json +22 -10
  35. package/dist/src/fetch/handle-request.d.ts +0 -7
  36. package/dist/src/fetch/index.d.ts +0 -4
  37. package/dist/src/fetch/orpc-handler.d.ts +0 -3
  38. package/dist/src/fetch/types.d.ts +0 -28
@@ -1,3 +0,0 @@
1
- import type { FetchHandler } from './types';
2
- export declare function createORPCHandler(): FetchHandler;
3
- //# sourceMappingURL=orpc-handler.d.ts.map
@@ -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