@orpc/server 2.0.0-beta.27 → 2.0.0-beta.29

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 CHANGED
@@ -4,7 +4,7 @@
4
4
  <a href="https://codecov.io/gh/middleapi/orpc">
5
5
  <img alt="codecov" src="https://codecov.io/gh/middleapi/orpc/branch/main/graph/badge.svg">
6
6
  </a>
7
- <a href="https://www.npmjs.com/package/@orpc/server">
7
+ <a href="https://npmx.dev/package/@orpc/server">
8
8
  <img alt="weekly downloads" src="https://img.shields.io/npm/dw/%40orpc%2Fserver?logo=npm" />
9
9
  </a>
10
10
  <a href="https://app.codspeed.io/middleapi/orpc?utm_source=badge">
@@ -29,69 +29,62 @@ You can read the documentation [here](https://orpc.dev).
29
29
 
30
30
  **Core**
31
31
 
32
- - [@orpc/contract](https://www.npmjs.com/package/@orpc/contract): Define API contract as the single source of truth.
33
- - [@orpc/server](https://www.npmjs.com/package/@orpc/server): Build APIs or implement contracts.
34
- - [@orpc/client](https://www.npmjs.com/package/@orpc/client): Consume APIs with end-to-end type safety.
35
- - [@orpc/openapi](https://www.npmjs.com/package/@orpc/openapi): Add OpenAPI compatibility to APIs.
32
+ - [@orpc/contract](https://npmx.dev/package/@orpc/contract): Define API contract as the single source of truth.
33
+ - [@orpc/server](https://npmx.dev/package/@orpc/server): Build APIs or implement contracts.
34
+ - [@orpc/client](https://npmx.dev/package/@orpc/client): Consume APIs with end-to-end type safety.
35
+ - [@orpc/openapi](https://npmx.dev/package/@orpc/openapi): Add OpenAPI compatibility to APIs.
36
36
 
37
37
  **Schema validation**
38
38
 
39
- - [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): Integrate with [Zod](https://zod.dev/).
40
- - [@orpc/valibot](https://www.npmjs.com/package/@orpc/valibot): Integrate with [Valibot](https://valibot.dev/).
41
- - [@orpc/arktype](https://www.npmjs.com/package/@orpc/arktype): Integrate with [ArkType](https://arktype.io/).
39
+ - [@orpc/zod](https://npmx.dev/package/@orpc/zod): Integrate with [Zod](https://zod.dev/).
40
+ - [@orpc/valibot](https://npmx.dev/package/@orpc/valibot): Integrate with [Valibot](https://valibot.dev/).
41
+ - [@orpc/arktype](https://npmx.dev/package/@orpc/arktype): Integrate with [ArkType](https://arktype.io/).
42
42
 
43
43
  **Built-in features**
44
44
 
45
- - [@orpc/publisher](https://www.npmjs.com/package/@orpc/publisher): Pub/Sub with memory, Redis, and Upstash adapters.
46
- - [@orpc/ratelimit](https://www.npmjs.com/package/@orpc/ratelimit): Rate limiting with memory, Redis, and Upstash adapters.
47
- - [@orpc/hibernation](https://www.npmjs.com/package/@orpc/hibernation): Leverage Hibernation APIs like [Cloudflare's Hibernation WebSocket](https://developers.cloudflare.com/durable-objects/best-practices/websockets/#durable-objects-hibernation-websocket-api).
48
- - [@orpc/json-schema](https://www.npmjs.com/package/@orpc/json-schema): Smart coercion for OpenAPI requests.
45
+ - [@orpc/publisher](https://npmx.dev/package/@orpc/publisher): Pub/Sub with memory, Redis, and Upstash adapters.
46
+ - [@orpc/ratelimit](https://npmx.dev/package/@orpc/ratelimit): Rate limiting with memory, Redis, and Upstash adapters.
47
+ - [@orpc/hibernation](https://npmx.dev/package/@orpc/hibernation): Leverage Hibernation APIs like [Cloudflare's Hibernation WebSocket](https://developers.cloudflare.com/durable-objects/best-practices/websockets/#durable-objects-hibernation-websocket-api).
48
+ - [@orpc/json-schema](https://npmx.dev/package/@orpc/json-schema): Smart coercion for OpenAPI requests.
49
49
 
50
50
  **Framework & ecosystem integrations**
51
51
 
52
- - [@orpc/next](https://www.npmjs.com/package/@orpc/next): Integrate with [Next.js Server Functions](https://nextjs.org/docs/app/getting-started/mutating-data).
53
- - [@orpc/ai-sdk](https://www.npmjs.com/package/@orpc/ai-sdk): Turn contracts and procedures into [AI SDK](https://ai-sdk.dev/) tools.
54
- - [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query): Integrate with [TanStack Query](https://tanstack.com/query/latest).
55
- - [@orpc/pinia-colada](https://www.npmjs.com/package/@orpc/pinia-colada): Integrate with [Pinia Colada](https://pinia-colada.esm.dev/).
56
- - [@orpc/swr](https://www.npmjs.com/package/@orpc/swr): Integrate with [SWR](https://swr.vercel.app/).
57
- - [@orpc/experimental-effect](https://www.npmjs.com/package/@orpc/experimental-effect): Integrate with [Effect](https://effect.website/).
58
- - [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Implement your contract with [NestJS](https://nestjs.com/).
59
- - [@orpc/node](https://www.npmjs.com/package/@orpc/node): [Node.js](https://nodejs.org/) plugins, helpers, like serving static files.
60
- - [@orpc/bun](https://www.npmjs.com/package/@orpc/bun): Adapters for [Bun's Redis](https://bun.sh/).
61
- - [@orpc/cloudflare](https://www.npmjs.com/package/@orpc/cloudflare): Adapters for [Cloudflare's RateLimit and Durable Objects](https://developers.cloudflare.com/workers/).
62
- - [@orpc/trpc](https://www.npmjs.com/package/@orpc/trpc): Reuse existing [tRPC](https://trpc.io/) routers within oRPC.
52
+ - [@orpc/next](https://npmx.dev/package/@orpc/next): Integrate with [Next.js Server Functions](https://nextjs.org/docs/app/getting-started/mutating-data).
53
+ - [@orpc/ai-sdk](https://npmx.dev/package/@orpc/ai-sdk): Turn contracts and procedures into [AI SDK](https://ai-sdk.dev/) tools.
54
+ - [@orpc/tanstack-query](https://npmx.dev/package/@orpc/tanstack-query): Integrate with [TanStack Query](https://tanstack.com/query/latest).
55
+ - [@orpc/pinia-colada](https://npmx.dev/package/@orpc/pinia-colada): Integrate with [Pinia Colada](https://pinia-colada.esm.dev/).
56
+ - [@orpc/swr](https://npmx.dev/package/@orpc/swr): Integrate with [SWR](https://swr.vercel.app/).
57
+ - [@orpc/experimental-effect](https://npmx.dev/package/@orpc/experimental-effect): Integrate with [Effect](https://effect.website/).
58
+ - [@orpc/nest](https://npmx.dev/package/@orpc/nest): Implement your contract with [NestJS](https://nestjs.com/).
59
+ - [@orpc/node](https://npmx.dev/package/@orpc/node): [Node.js](https://nodejs.org/) plugins for static file serving and large uploads.
60
+ - [@orpc/bun](https://npmx.dev/package/@orpc/bun): Adapters for [Bun's Redis](https://bun.sh/).
61
+ - [@orpc/cloudflare](https://npmx.dev/package/@orpc/cloudflare): Adapters for [Cloudflare's RateLimit and Durable Objects](https://developers.cloudflare.com/workers/).
62
+ - [@orpc/trpc](https://npmx.dev/package/@orpc/trpc): Reuse existing [tRPC](https://trpc.io/) routers within oRPC.
63
63
 
64
64
  **Observability**
65
65
 
66
- - [@orpc/opentelemetry](https://www.npmjs.com/package/@orpc/opentelemetry): Integrate with [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
67
- - [@orpc/pino](https://www.npmjs.com/package/@orpc/pino): Integrate with [Pino](https://getpino.io/) for logging.
68
- - [@orpc/evlog](https://www.npmjs.com/package/@orpc/evlog): Integrate with [Evlog](https://evlog.dev/) for logging.
66
+ - [@orpc/opentelemetry](https://npmx.dev/package/@orpc/opentelemetry): Integrate with [OpenTelemetry](https://opentelemetry.io/) for distributed tracing.
67
+ - [@orpc/pino](https://npmx.dev/package/@orpc/pino): Integrate with [Pino](https://getpino.io/) for logging.
68
+ - [@orpc/evlog](https://npmx.dev/package/@orpc/evlog): Integrate with [Evlog](https://evlog.dev/) for logging.
69
69
 
70
70
  ## Sponsors
71
71
 
72
72
  Like what we build over at [middleapi](https://github.com/middleapi)? You can help keep it going here: [GitHub Sponsors](https://github.com/sponsors/dinwwwh). Every bit helps! 🚀
73
73
 
74
- ### 🏆 Platinum Sponsor
75
-
76
74
  <table>
77
75
  <tr>
78
- <td align="center"><a href="https://screenshotone.com/?ref=orpc" target="_blank" rel="sponsored noopener" title="ScreenshotOne.com"><img src="https://avatars.githubusercontent.com/u/97035603?v=4" width="279" alt="ScreenshotOne.com"/><br />ScreenshotOne.com</a></td>
76
+ <td width="2000"><a href="https://screenshotone.com/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener" title="The screenshot API for developers"><img src="https://avatars.githubusercontent.com/u/97035603?v=4" width="64" align="left" hspace="12" alt="ScreenshotOne.com"/><b>ScreenshotOne.com</b></a><br /><sub>The screenshot API for developers</sub></td>
79
77
  </tr>
80
- </table>
81
-
82
- ### 🥈 Silver Sponsor
83
-
84
- <table>
85
78
  <tr>
86
- <td align="center"><a href="https://misskey.io/?ref=orpc" target="_blank" rel="sponsored noopener" title="村上さん"><img src="https://avatars.githubusercontent.com/u/37681609?u=0dd4c7e4ba937cbb52b068c55914b1d8164dc0c7&amp;v=4" width="209" alt="村上さん"/><br />村上さん</a></td>
79
+ <td width="2000"><a href="https://misskey.io/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Decentralized microblogging SNS born on Earth"><img src="https://github.com/MisskeyIO.png" width="64" align="left" hspace="12" alt="MisskeyHQ"/><b>MisskeyHQ</b></a><br /><sub>Decentralized microblogging SNS born on Earth</sub></td>
87
80
  </tr>
88
81
  </table>
89
82
 
90
- ### Generous Sponsors
83
+ ### Organization Sponsors
91
84
 
92
85
  <table>
93
86
  <tr>
94
- <td align="center"><a href="https://github.com/ln-markets?ref=orpc" target="_blank" rel="sponsored noopener" title="LN Markets"><img src="https://avatars.githubusercontent.com/u/70597625?v=4" width="167" alt="LN Markets"/><br />LN Markets</a></td>
87
+ <td align="center"><a href="https://lnmarkets.com/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="LN Markets"><img src="https://avatars.githubusercontent.com/u/70597625?v=4" width="167" alt="LN Markets"/><br />LN Markets</a></td>
95
88
  </tr>
96
89
  </table>
97
90
 
@@ -99,25 +92,26 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
99
92
 
100
93
  <table>
101
94
  <tr>
102
- <td align="center"><a href="https://github.com/hrmcdonald?ref=orpc" target="_blank" rel="sponsored noopener" title="Reece McDonald"><img src="https://avatars.githubusercontent.com/u/39349270?v=4" width="139" alt="Reece McDonald"/><br />Reece McDonald</a></td>
103
- <td align="center"><a href="https://github.com/u1-liquid?ref=orpc" target="_blank" rel="sponsored noopener" title="あわわわとーにゅ"><img src="https://avatars.githubusercontent.com/u/17376330?u=de3353804be889f009f7e0a1582daf04d0ab292d&amp;v=4" width="139" alt="あわわわとーにゅ"/><br />あわわわとーにゅ</a></td>
104
- <td align="center"><a href="https://github.com/nicognaW?ref=orpc" target="_blank" rel="sponsored noopener" title="nk"><img src="https://avatars.githubusercontent.com/u/66731869?u=4699bda3a9092d3ec34fbd959450767bcc8b8b6d&amp;v=4" width="139" alt="nk"/><br />nk</a></td>
105
- <td align="center"><a href="https://github.com/supastarter?ref=orpc" target="_blank" rel="sponsored noopener" title="supastarter"><img src="https://avatars.githubusercontent.com/u/110960143?v=4" width="139" alt="supastarter"/><br />supastarter</a></td>
106
- <td align="center"><a href="https://github.com/divmgl?ref=orpc" target="_blank" rel="sponsored noopener" title="Dexter Miguel"><img src="https://avatars.githubusercontent.com/u/5452298?u=645993204be8696c085ecf0d228c3062efe2ed65&amp;v=4" width="139" alt="Dexter Miguel"/><br />Dexter Miguel</a></td>
107
- <td align="center"><a href="https://github.com/herrfugbaum?ref=orpc" target="_blank" rel="sponsored noopener" title="herrfugbaum"><img src="https://avatars.githubusercontent.com/u/12859776?u=644dc1666d0220bc0468eb0de3c56b919f635b16&amp;v=4" width="139" alt="herrfugbaum"/><br />herrfugbaum</a></td>
95
+ <td align="center"><a href="https://github.com/hrmcdonald?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Reece McDonald"><img src="https://avatars.githubusercontent.com/u/39349270?v=4" width="139" alt="Reece McDonald"/><br />Reece McDonald</a></td>
96
+ <td align="center"><a href="https://soymilk.party/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="あわわわとーにゅ"><img src="https://avatars.githubusercontent.com/u/17376330?u=de3353804be889f009f7e0a1582daf04d0ab292d&amp;v=4" width="139" alt="あわわわとーにゅ"/><br />あわわわとーにゅ</a></td>
97
+ <td align="center"><a href="https://github.com/nicognaW?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="nk"><img src="https://avatars.githubusercontent.com/u/66731869?u=4699bda3a9092d3ec34fbd959450767bcc8b8b6d&amp;v=4" width="139" alt="nk"/><br />nk</a></td>
98
+ <td align="center"><a href="https://supastarter.dev/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="supastarter"><img src="https://avatars.githubusercontent.com/u/110960143?v=4" width="139" alt="supastarter"/><br />supastarter</a></td>
99
+ <td align="center"><a href="https://github.com/divmgl?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Dexter Miguel"><img src="https://avatars.githubusercontent.com/u/5452298?u=645993204be8696c085ecf0d228c3062efe2ed65&amp;v=4" width="139" alt="Dexter Miguel"/><br />Dexter Miguel</a></td>
100
+ <td align="center"><a href="https://github.com/herrfugbaum?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="herrfugbaum"><img src="https://avatars.githubusercontent.com/u/12859776?u=644dc1666d0220bc0468eb0de3c56b919f635b16&amp;v=4" width="139" alt="herrfugbaum"/><br />herrfugbaum</a></td>
108
101
  </tr>
109
102
  <tr>
110
- <td align="center"><a href="https://github.com/ryota-murakami?ref=orpc" target="_blank" rel="sponsored noopener" title="Ryota Murakami"><img src="https://avatars.githubusercontent.com/u/5501268?u=599389e03340734325726ca3f8f423c021d47d7f&amp;v=4" width="139" alt="Ryota Murakami"/><br />Ryota Murakami</a></td>
111
- <td align="center"><a href="https://github.com/dcramer?ref=orpc" target="_blank" rel="sponsored noopener" title="David Cramer"><img src="https://avatars.githubusercontent.com/u/23610?v=4" width="139" alt="David Cramer"/><br />David Cramer</a></td>
112
- <td align="center"><a href="https://github.com/valerii15298?ref=orpc" target="_blank" rel="sponsored noopener" title="Valerii Petryniak"><img src="https://avatars.githubusercontent.com/u/44531564?u=88ac74d9bacd20401518441907acad21063cd397&amp;v=4" width="139" alt="Valerii Petryniak"/><br />Valerii Petryniak</a></td>
113
- <td align="center"><a href="https://github.com/letstri?ref=orpc" target="_blank" rel="sponsored noopener" title="Valerii Strilets"><img src="https://avatars.githubusercontent.com/u/13253748?u=c7b10399ccc8f8081e24db94ec32cd9858e86ac3&amp;v=4" width="139" alt="Valerii Strilets"/><br />Valerii Strilets</a></td>
114
- <td align="center"><a href="https://github.com/K-Mistele?ref=orpc" target="_blank" rel="sponsored noopener" title="Kyle Mistele"><img src="https://avatars.githubusercontent.com/u/18430555?u=3afebeb81de666e35aaac3ed46f14159d7603ffb&amp;v=4" width="139" alt="Kyle Mistele"/><br />Kyle Mistele</a></td>
115
- <td align="center"><a href="https://github.com/christ12938?ref=orpc" target="_blank" rel="sponsored noopener" title="christ12938"><img src="https://avatars.githubusercontent.com/u/25758598?v=4" width="139" alt="christ12938"/><br />christ12938</a></td>
103
+ <td align="center"><a href="https://laststance.io/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Ryota Murakami"><img src="https://avatars.githubusercontent.com/u/5501268?u=599389e03340734325726ca3f8f423c021d47d7f&amp;v=4" width="139" alt="Ryota Murakami"/><br />Ryota Murakami</a></td>
104
+ <td align="center"><a href="https://cra.mr/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="David Cramer"><img src="https://avatars.githubusercontent.com/u/23610?v=4" width="139" alt="David Cramer"/><br />David Cramer</a></td>
105
+ <td align="center"><a href="https://valerii15298.github.io/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Valerii Petryniak"><img src="https://avatars.githubusercontent.com/u/44531564?u=88ac74d9bacd20401518441907acad21063cd397&amp;v=4" width="139" alt="Valerii Petryniak"/><br />Valerii Petryniak</a></td>
106
+ <td align="center"><a href="https://letstri.dev/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Valerii Strilets"><img src="https://avatars.githubusercontent.com/u/13253748?u=c7b10399ccc8f8081e24db94ec32cd9858e86ac3&amp;v=4" width="139" alt="Valerii Strilets"/><br />Valerii Strilets</a></td>
107
+ <td align="center"><a href="https://blacklight.sh/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Kyle Mistele"><img src="https://avatars.githubusercontent.com/u/18430555?u=3afebeb81de666e35aaac3ed46f14159d7603ffb&amp;v=4" width="139" alt="Kyle Mistele"/><br />Kyle Mistele</a></td>
108
+ <td align="center"><a href="https://github.com/christ12938?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="christ12938"><img src="https://avatars.githubusercontent.com/u/25758598?v=4" width="139" alt="christ12938"/><br />christ12938</a></td>
116
109
  </tr>
117
110
  <tr>
118
- <td align="center"><a href="https://github.com/Ryanjso?ref=orpc" target="_blank" rel="sponsored noopener" title="Ryan Soderberg"><img src="https://avatars.githubusercontent.com/u/39172778?u=5ed913c31d57e7221b75784abcad48c7ebddde27&amp;v=4" width="139" alt="Ryan Soderberg"/><br />Ryan Soderberg</a></td>
119
- <td align="center"><a href="https://github.com/itigoore01?ref=orpc" target="_blank" rel="sponsored noopener" title="shota"><img src="https://avatars.githubusercontent.com/u/11831107?u=c976a6dc7e055eb026304c46c99100ed22b0c8e0&amp;v=4" width="139" alt="shota"/><br />shota</a></td>
120
- <td align="center"><a href="https://github.com/ellis-driscoll?ref=orpc" target="_blank" rel="sponsored noopener" title="Ellis Driscoll"><img src="https://avatars.githubusercontent.com/u/70685966?u=c5f95bc33b5991d9744abe00052542e4a2ed3cb9&amp;v=4" width="139" alt="Ellis Driscoll"/><br />Ellis Driscoll</a></td>
111
+ <td align="center"><a href="https://github.com/Ryanjso?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Ryan Soderberg"><img src="https://avatars.githubusercontent.com/u/39172778?u=5ed913c31d57e7221b75784abcad48c7ebddde27&amp;v=4" width="139" alt="Ryan Soderberg"/><br />Ryan Soderberg</a></td>
112
+ <td align="center"><a href="https://github.com/itigoore01?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="shota"><img src="https://avatars.githubusercontent.com/u/11831107?u=c976a6dc7e055eb026304c46c99100ed22b0c8e0&amp;v=4" width="139" alt="shota"/><br />shota</a></td>
113
+ <td align="center"><a href="https://github.com/ellis-driscoll?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Ellis Driscoll"><img src="https://avatars.githubusercontent.com/u/70685966?u=c5f95bc33b5991d9744abe00052542e4a2ed3cb9&amp;v=4" width="139" alt="Ellis Driscoll"/><br />Ellis Driscoll</a></td>
114
+ <td align="center"><a href="https://github.com/hoangbn?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Hoang Nguyen"><img src="https://avatars.githubusercontent.com/u/38968280?u=c90084c6de65c56facabab7ba13a72a49ddbc3e4&amp;v=4" width="139" alt="Hoang Nguyen"/><br />Hoang Nguyen</a></td>
121
115
  </tr>
122
116
  </table>
123
117
 
@@ -125,31 +119,31 @@ Like what we build over at [middleapi](https://github.com/middleapi)? You can he
125
119
 
126
120
  <table>
127
121
  <tr>
128
- <td align="center"><a href="https://github.com/rhinodavid?ref=orpc" target="_blank" rel="sponsored noopener" title="David Walsh"><img src="https://avatars.githubusercontent.com/u/5778036?u=b5521f07d2f88c3db2a0dae62b5f2f8357214af0&amp;v=4" width="119" alt="David Walsh"/><br />David Walsh</a></td>
129
- <td align="center"><a href="https://github.com/Robbe95?ref=orpc" target="_blank" rel="sponsored noopener" title="Robbe Vaes"><img src="https://avatars.githubusercontent.com/u/44748019?u=e0232402c045ad4eac7cbd217f1f47e083103b89&amp;v=4" width="119" alt="Robbe Vaes"/><br />Robbe Vaes</a></td>
130
- <td align="center"><a href="https://github.com/aidansunbury?ref=orpc" target="_blank" rel="sponsored noopener" title="Aidan Sunbury"><img src="https://avatars.githubusercontent.com/u/64103161?v=4" width="119" alt="Aidan Sunbury"/><br />Aidan Sunbury</a></td>
131
- <td align="center"><a href="https://github.com/soonoo?ref=orpc" target="_blank" rel="sponsored noopener" title="soonoo"><img src="https://avatars.githubusercontent.com/u/5436405?u=5d0b4aa955c87e30e6bda7f0cccae5402da99528&amp;v=4" width="119" alt="soonoo"/><br />soonoo</a></td>
132
- <td align="center"><a href="https://github.com/kporten?ref=orpc" target="_blank" rel="sponsored noopener" title="Kevin Porten"><img src="https://avatars.githubusercontent.com/u/1839345?u=dc2263d5cfe0d927ce1a0be04a1d55dd6b55405c&amp;v=4" width="119" alt="Kevin Porten"/><br />Kevin Porten</a></td>
133
- <td align="center"><a href="https://github.com/pumpkinlink?ref=orpc" target="_blank" rel="sponsored noopener" title="Denis"><img src="https://avatars.githubusercontent.com/u/11864620?u=5f47bbe6c65d0f6f5cf011021490238e4b0593d0&amp;v=4" width="119" alt="Denis"/><br />Denis</a></td>
134
- <td align="center"><a href="https://github.com/christopher-kapic?ref=orpc" target="_blank" rel="sponsored noopener" title="Christopher Kapic"><img src="https://avatars.githubusercontent.com/u/59740769?u=e7ad4b72b5bf6c9eb1644c26dbf3332a8f987377&amp;v=4" width="119" alt="Christopher Kapic"/><br />Christopher Kapic</a></td>
122
+ <td align="center"><a href="https://github.com/rhinodavid?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="David Walsh"><img src="https://avatars.githubusercontent.com/u/5778036?u=b5521f07d2f88c3db2a0dae62b5f2f8357214af0&amp;v=4" width="119" alt="David Walsh"/><br />David Walsh</a></td>
123
+ <td align="center"><a href="https://robbevaes.be/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Robbe Vaes"><img src="https://avatars.githubusercontent.com/u/44748019?u=e0232402c045ad4eac7cbd217f1f47e083103b89&amp;v=4" width="119" alt="Robbe Vaes"/><br />Robbe Vaes</a></td>
124
+ <td align="center"><a href="https://github.com/aidansunbury?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Aidan Sunbury"><img src="https://avatars.githubusercontent.com/u/64103161?v=4" width="119" alt="Aidan Sunbury"/><br />Aidan Sunbury</a></td>
125
+ <td align="center"><a href="https://github.com/soonoo?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="soonoo"><img src="https://avatars.githubusercontent.com/u/5436405?u=5d0b4aa955c87e30e6bda7f0cccae5402da99528&amp;v=4" width="119" alt="soonoo"/><br />soonoo</a></td>
126
+ <td align="center"><a href="https://kevinporten.dev/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Kevin Porten"><img src="https://avatars.githubusercontent.com/u/1839345?u=dc2263d5cfe0d927ce1a0be04a1d55dd6b55405c&amp;v=4" width="119" alt="Kevin Porten"/><br />Kevin Porten</a></td>
127
+ <td align="center"><a href="https://github.com/pumpkinlink?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Denis"><img src="https://avatars.githubusercontent.com/u/11864620?u=5f47bbe6c65d0f6f5cf011021490238e4b0593d0&amp;v=4" width="119" alt="Denis"/><br />Denis</a></td>
128
+ <td align="center"><a href="https://github.com/christopher-kapic?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Christopher Kapic"><img src="https://avatars.githubusercontent.com/u/59740769?u=e7ad4b72b5bf6c9eb1644c26dbf3332a8f987377&amp;v=4" width="119" alt="Christopher Kapic"/><br />Christopher Kapic</a></td>
135
129
  </tr>
136
130
  <tr>
137
- <td align="center"><a href="https://github.com/thomasballinger?ref=orpc" target="_blank" rel="sponsored noopener" title="Tom Ballinger"><img src="https://avatars.githubusercontent.com/u/458879?u=4b045ac75d721b6ac2b42a74d7d37f61f0414031&amp;v=4" width="119" alt="Tom Ballinger"/><br />Tom Ballinger</a></td>
138
- <td align="center"><a href="https://github.com/SSam0419?ref=orpc" target="_blank" rel="sponsored noopener" title="Sam"><img src="https://avatars.githubusercontent.com/u/102863520?u=3c89611f549d5070be232eb4532f690c8f2e7a65&amp;v=4" width="119" alt="Sam"/><br />Sam</a></td>
139
- <td align="center"><a href="https://github.com/Titoine?ref=orpc" target="_blank" rel="sponsored noopener" title="Titoine"><img src="https://avatars.githubusercontent.com/u/3514286?u=1bb1e86b0c99c8a1121372e56d51a177eea12191&amp;v=4" width="119" alt="Titoine"/><br />Titoine</a></td>
140
- <td align="center"><a href="https://github.com/Mnigos?ref=orpc" target="_blank" rel="sponsored noopener" title="Igor Makowski"><img src="https://avatars.githubusercontent.com/u/56691628?u=ee8c879478f7c151b9156aef6c74243fa3e247a8&amp;v=4" width="119" alt="Igor Makowski"/><br />Igor Makowski</a></td>
141
- <td align="center"><a href="https://github.com/hanayashiki?ref=orpc" target="_blank" rel="sponsored noopener" title="hanayashiki"><img src="https://avatars.githubusercontent.com/u/26056783?u=06c3b9205a16fd41a871e82da1cc2a09306d53f5&amp;v=4" width="119" alt="hanayashiki"/><br />hanayashiki</a></td>
142
- <td align="center"><a href="https://github.com/ldub?ref=orpc" target="_blank" rel="sponsored noopener" title="Lev Dubinets"><img src="https://avatars.githubusercontent.com/u/3114081?u=f547f5d5012cab54851f1b1ad72d10e537f78fc2&amp;v=4" width="119" alt="Lev Dubinets"/><br />Lev Dubinets</a></td>
143
- <td align="center"><a href="https://github.com/mr-kelly?ref=orpc" target="_blank" rel="sponsored noopener" title="Kelly Peilin Chan"><img src="https://avatars.githubusercontent.com/u/520852?u=6b0f7105f694e7b5cacf410a3f04c7044b469dc8&amp;v=4" width="119" alt="Kelly Peilin Chan"/><br />Kelly Peilin Chan</a></td>
131
+ <td align="center"><a href="http://ballingt.com/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Tom Ballinger"><img src="https://avatars.githubusercontent.com/u/458879?u=4b045ac75d721b6ac2b42a74d7d37f61f0414031&amp;v=4" width="119" alt="Tom Ballinger"/><br />Tom Ballinger</a></td>
132
+ <td align="center"><a href="https://lee-sam.com/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Sam"><img src="https://avatars.githubusercontent.com/u/102863520?u=3c89611f549d5070be232eb4532f690c8f2e7a65&amp;v=4" width="119" alt="Sam"/><br />Sam</a></td>
133
+ <td align="center"><a href="https://github.com/Titoine?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Titoine"><img src="https://avatars.githubusercontent.com/u/3514286?u=1bb1e86b0c99c8a1121372e56d51a177eea12191&amp;v=4" width="119" alt="Titoine"/><br />Titoine</a></td>
134
+ <td align="center"><a href="https://rigtch.fm/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Igor Makowski"><img src="https://avatars.githubusercontent.com/u/56691628?u=ee8c879478f7c151b9156aef6c74243fa3e247a8&amp;v=4" width="119" alt="Igor Makowski"/><br />Igor Makowski</a></td>
135
+ <td align="center"><a href="https://blog.cwang.io/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="hanayashiki"><img src="https://avatars.githubusercontent.com/u/26056783?u=06c3b9205a16fd41a871e82da1cc2a09306d53f5&amp;v=4" width="119" alt="hanayashiki"/><br />hanayashiki</a></td>
136
+ <td align="center"><a href="https://dubinets.io/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Lev Dubinets"><img src="https://avatars.githubusercontent.com/u/3114081?u=f547f5d5012cab54851f1b1ad72d10e537f78fc2&amp;v=4" width="119" alt="Lev Dubinets"/><br />Lev Dubinets</a></td>
137
+ <td align="center"><a href="https://bika.ai/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Kelly Peilin Chan"><img src="https://avatars.githubusercontent.com/u/520852?u=6b0f7105f694e7b5cacf410a3f04c7044b469dc8&amp;v=4" width="119" alt="Kelly Peilin Chan"/><br />Kelly Peilin Chan</a></td>
144
138
  </tr>
145
139
  <tr>
146
- <td align="center"><a href="https://github.com/guyariely?ref=orpc" target="_blank" rel="sponsored noopener" title="Guy Ariely"><img src="https://avatars.githubusercontent.com/u/42813496?u=edb6b7f563bf28e160a290832e7da57c0506f8ca&amp;v=4" width="119" alt="Guy Ariely"/><br />Guy Ariely</a></td>
147
- <td align="center"><a href="https://github.com/piscis?ref=orpc" target="_blank" rel="sponsored noopener" title="Alex"><img src="https://avatars.githubusercontent.com/u/326163?u=b245f368bd940cf51d08c0b6bf55f8257f359437&amp;v=4" width="119" alt="Alex"/><br />Alex</a></td>
148
- <td align="center"><a href="https://github.com/finom?ref=orpc" target="_blank" rel="sponsored noopener" title="Andrey Gubanov"><img src="https://avatars.githubusercontent.com/u/1082083?u=c5f2daf7ebece498e85c83367bb37b4e10e2649d&amp;v=4" width="119" alt="Andrey Gubanov"/><br />Andrey Gubanov</a></td>
140
+ <td align="center"><a href="https://guyariely.com/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Guy Ariely"><img src="https://avatars.githubusercontent.com/u/42813496?u=edb6b7f563bf28e160a290832e7da57c0506f8ca&amp;v=4" width="119" alt="Guy Ariely"/><br />Guy Ariely</a></td>
141
+ <td align="center"><a href="https://piscis.dev/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Alex"><img src="https://avatars.githubusercontent.com/u/326163?u=b245f368bd940cf51d08c0b6bf55f8257f359437&amp;v=4" width="119" alt="Alex"/><br />Alex</a></td>
142
+ <td align="center"><a href="https://opensource.gubanov.eu/?ref=middleapi&amp;utm_source=middleapi&amp;utm_medium=sponsor" target="_blank" rel="noopener sponsored" title="Andrey Gubanov"><img src="https://avatars.githubusercontent.com/u/1082083?u=c5f2daf7ebece498e85c83367bb37b4e10e2649d&amp;v=4" width="119" alt="Andrey Gubanov"/><br />Andrey Gubanov</a></td>
149
143
  </tr>
150
144
  </table>
151
145
 
152
- With thanks to 37 past sponsors who helped get oRPC here.
146
+ With thanks to [37 past sponsors](https://htmlpreview.github.io/?https://github.com/middleapi/static/blob/main/sponsors.svg) who helped get oRPC here.
153
147
 
154
148
  ## References
155
149
 
@@ -1,10 +1,10 @@
1
1
  import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
2
2
  import { SendStandardResponseOptions, AnyAPIGatewayProxyEvent, HttpResponseStream } from '@standardserver/aws-lambda';
3
- import { C as Context } from '../../shared/server.CwrYlF72.mjs';
4
- import { S as StandardHandlerPlugin, b as StandardHandler, c as StandardHandlerHandleOptions, a as StandardHandlerOptions } from '../../shared/server.JbCIPL4P.mjs';
3
+ import { Context } from '../../index.mjs';
4
+ import { StandardHandlerPlugin, StandardHandler, StandardHandlerHandleOptions, StandardHandlerOptions } from '../standard/index.mjs';
5
5
  import { FriendlyStandardHandlerHandleOptions } from '../standard/index.mjs';
6
- import { R as Router } from '../../shared/server.Dm0os-OP.mjs';
7
- import { R as RPCHandlerCodecOptions } from '../../shared/server.CkNnZ5F-.mjs';
6
+ import { Router } from '../../index.mjs';
7
+ import { RPCHandlerCodecOptions } from '../standard/index.mjs';
8
8
  import '@orpc/client';
9
9
  import '@orpc/contract';
10
10
  import '@standardserver/core';
@@ -1,10 +1,10 @@
1
1
  import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
2
2
  import { SendStandardResponseOptions, AnyAPIGatewayProxyEvent, HttpResponseStream } from '@standardserver/aws-lambda';
3
- import { C as Context } from '../../shared/server.CwrYlF72.js';
4
- import { S as StandardHandlerPlugin, b as StandardHandler, c as StandardHandlerHandleOptions, a as StandardHandlerOptions } from '../../shared/server.DrN1Pj1-.js';
3
+ import { Context } from '../../index.js';
4
+ import { StandardHandlerPlugin, StandardHandler, StandardHandlerHandleOptions, StandardHandlerOptions } from '../standard/index.js';
5
5
  import { FriendlyStandardHandlerHandleOptions } from '../standard/index.js';
6
- import { R as Router } from '../../shared/server.DtfwuV6U.js';
7
- import { R as RPCHandlerCodecOptions } from '../../shared/server.C2n16pp0.js';
6
+ import { Router } from '../../index.js';
7
+ import { RPCHandlerCodecOptions } from '../standard/index.js';
8
8
  import '@orpc/client';
9
9
  import '@orpc/contract';
10
10
  import '@standardserver/core';
@@ -1,11 +1,11 @@
1
1
  import { MaybeOptionalOptions } from '@orpc/shared';
2
2
  import { EncodePeerMessageOptions, DecodePeerMessageOptions } from '@standardserver/peer';
3
3
  import { Message, Peer } from 'crossws';
4
- import { C as Context } from '../../shared/server.CwrYlF72.mjs';
5
- import { b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.JbCIPL4P.mjs';
4
+ import { Context } from '../../index.mjs';
5
+ import { StandardHandler, StandardHandlerOptions } from '../standard/index.mjs';
6
6
  import { StandardPeerRequestHandlerOptions } from '../standard-peer/index.mjs';
7
- import { R as Router } from '../../shared/server.Dm0os-OP.mjs';
8
- import { R as RPCHandlerCodecOptions } from '../../shared/server.CkNnZ5F-.mjs';
7
+ import { Router } from '../../index.mjs';
8
+ import { RPCHandlerCodecOptions } from '../standard/index.mjs';
9
9
  import '@orpc/client';
10
10
  import '@orpc/contract';
11
11
  import '@standardserver/core';
@@ -1,11 +1,11 @@
1
1
  import { MaybeOptionalOptions } from '@orpc/shared';
2
2
  import { EncodePeerMessageOptions, DecodePeerMessageOptions } from '@standardserver/peer';
3
3
  import { Message, Peer } from 'crossws';
4
- import { C as Context } from '../../shared/server.CwrYlF72.js';
5
- import { b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.DrN1Pj1-.js';
4
+ import { Context } from '../../index.js';
5
+ import { StandardHandler, StandardHandlerOptions } from '../standard/index.js';
6
6
  import { StandardPeerRequestHandlerOptions } from '../standard-peer/index.js';
7
- import { R as Router } from '../../shared/server.DtfwuV6U.js';
8
- import { R as RPCHandlerCodecOptions } from '../../shared/server.C2n16pp0.js';
7
+ import { Router } from '../../index.js';
8
+ import { RPCHandlerCodecOptions } from '../standard/index.js';
9
9
  import '@orpc/client';
10
10
  import '@orpc/contract';
11
11
  import '@standardserver/core';
@@ -1,10 +1,10 @@
1
1
  import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
2
2
  import { SendStandardResponseOptions, AnyFastifyRequest, AnyFastifyReply } from '@standardserver/fastify';
3
- import { C as Context } from '../../shared/server.CwrYlF72.mjs';
4
- import { S as StandardHandlerPlugin, c as StandardHandlerHandleOptions, b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.JbCIPL4P.mjs';
3
+ import { Context } from '../../index.mjs';
4
+ import { StandardHandlerPlugin, StandardHandlerHandleOptions, StandardHandler, StandardHandlerOptions } from '../standard/index.mjs';
5
5
  import { FriendlyStandardHandlerHandleOptions } from '../standard/index.mjs';
6
- import { R as Router } from '../../shared/server.Dm0os-OP.mjs';
7
- import { R as RPCHandlerCodecOptions } from '../../shared/server.CkNnZ5F-.mjs';
6
+ import { Router } from '../../index.mjs';
7
+ import { RPCHandlerCodecOptions } from '../standard/index.mjs';
8
8
  import '@orpc/client';
9
9
  import '@orpc/contract';
10
10
  import '@standardserver/core';
@@ -1,10 +1,10 @@
1
1
  import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
2
2
  import { SendStandardResponseOptions, AnyFastifyRequest, AnyFastifyReply } from '@standardserver/fastify';
3
- import { C as Context } from '../../shared/server.CwrYlF72.js';
4
- import { S as StandardHandlerPlugin, c as StandardHandlerHandleOptions, b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.DrN1Pj1-.js';
3
+ import { Context } from '../../index.js';
4
+ import { StandardHandlerPlugin, StandardHandlerHandleOptions, StandardHandler, StandardHandlerOptions } from '../standard/index.js';
5
5
  import { FriendlyStandardHandlerHandleOptions } from '../standard/index.js';
6
- import { R as Router } from '../../shared/server.DtfwuV6U.js';
7
- import { R as RPCHandlerCodecOptions } from '../../shared/server.C2n16pp0.js';
6
+ import { Router } from '../../index.js';
7
+ import { RPCHandlerCodecOptions } from '../standard/index.js';
8
8
  import '@orpc/client';
9
9
  import '@orpc/contract';
10
10
  import '@standardserver/core';
@@ -1,11 +1,11 @@
1
1
  export { R as BodyLimitPlugin } from '../../shared/server.D0Ipbmdv.mjs';
2
2
  import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
3
3
  import { ToFetchResponseOptions } from '@standardserver/fetch';
4
- import { C as Context } from '../../shared/server.CwrYlF72.mjs';
5
- import { S as StandardHandlerPlugin, c as StandardHandlerHandleOptions, b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.JbCIPL4P.mjs';
4
+ import { Context } from '../../index.mjs';
5
+ import { StandardHandlerPlugin, StandardHandlerHandleOptions, StandardHandler, StandardHandlerOptions } from '../standard/index.mjs';
6
6
  import { FriendlyStandardHandlerHandleOptions } from '../standard/index.mjs';
7
- import { R as Router } from '../../shared/server.Dm0os-OP.mjs';
8
- import { R as RPCHandlerCodecOptions } from '../../shared/server.CkNnZ5F-.mjs';
7
+ import { Router } from '../../index.mjs';
8
+ import { RPCHandlerCodecOptions } from '../standard/index.mjs';
9
9
  import '@orpc/client';
10
10
  import '@orpc/contract';
11
11
  import '@standardserver/core';
@@ -1,11 +1,11 @@
1
1
  export { R as BodyLimitPlugin } from '../../shared/server.BhHrioCw.js';
2
2
  import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
3
3
  import { ToFetchResponseOptions } from '@standardserver/fetch';
4
- import { C as Context } from '../../shared/server.CwrYlF72.js';
5
- import { S as StandardHandlerPlugin, c as StandardHandlerHandleOptions, b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.DrN1Pj1-.js';
4
+ import { Context } from '../../index.js';
5
+ import { StandardHandlerPlugin, StandardHandlerHandleOptions, StandardHandler, StandardHandlerOptions } from '../standard/index.js';
6
6
  import { FriendlyStandardHandlerHandleOptions } from '../standard/index.js';
7
- import { R as Router } from '../../shared/server.DtfwuV6U.js';
8
- import { R as RPCHandlerCodecOptions } from '../../shared/server.C2n16pp0.js';
7
+ import { Router } from '../../index.js';
8
+ import { RPCHandlerCodecOptions } from '../standard/index.js';
9
9
  import '@orpc/client';
10
10
  import '@orpc/contract';
11
11
  import '@standardserver/core';
@@ -1,11 +1,11 @@
1
1
  import { SupportedMessagePort } from '@orpc/client/message-port';
2
2
  import { Value, Promisable, MaybeOptionalOptions } from '@orpc/shared';
3
3
  import { ServerPeer, EncodePeerMessageOptions, DecodePeerMessageOptions } from '@standardserver/peer';
4
- import { C as Context } from '../../shared/server.CwrYlF72.mjs';
5
- import { b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.JbCIPL4P.mjs';
4
+ import { Context } from '../../index.mjs';
5
+ import { StandardHandler, StandardHandlerOptions } from '../standard/index.mjs';
6
6
  import { StandardPeerRequestHandlerOptions } from '../standard-peer/index.mjs';
7
- import { R as Router } from '../../shared/server.Dm0os-OP.mjs';
8
- import { R as RPCHandlerCodecOptions } from '../../shared/server.CkNnZ5F-.mjs';
7
+ import { Router } from '../../index.mjs';
8
+ import { RPCHandlerCodecOptions } from '../standard/index.mjs';
9
9
  import '@orpc/client';
10
10
  import '@orpc/contract';
11
11
  import '@standardserver/core';
@@ -1,11 +1,11 @@
1
1
  import { SupportedMessagePort } from '@orpc/client/message-port';
2
2
  import { Value, Promisable, MaybeOptionalOptions } from '@orpc/shared';
3
3
  import { ServerPeer, EncodePeerMessageOptions, DecodePeerMessageOptions } from '@standardserver/peer';
4
- import { C as Context } from '../../shared/server.CwrYlF72.js';
5
- import { b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.DrN1Pj1-.js';
4
+ import { Context } from '../../index.js';
5
+ import { StandardHandler, StandardHandlerOptions } from '../standard/index.js';
6
6
  import { StandardPeerRequestHandlerOptions } from '../standard-peer/index.js';
7
- import { R as Router } from '../../shared/server.DtfwuV6U.js';
8
- import { R as RPCHandlerCodecOptions } from '../../shared/server.C2n16pp0.js';
7
+ import { Router } from '../../index.js';
8
+ import { RPCHandlerCodecOptions } from '../standard/index.js';
9
9
  import '@orpc/client';
10
10
  import '@orpc/contract';
11
11
  import '@standardserver/core';
@@ -1,11 +1,11 @@
1
1
  export { R as BodyLimitPlugin } from '../../shared/server.D0Ipbmdv.mjs';
2
2
  import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
3
3
  import { SendStandardResponseOptions, NodeHttpRequest, NodeHttpResponse } from '@standardserver/node';
4
- import { C as Context } from '../../shared/server.CwrYlF72.mjs';
5
- import { S as StandardHandlerPlugin, c as StandardHandlerHandleOptions, b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.JbCIPL4P.mjs';
4
+ import { Context } from '../../index.mjs';
5
+ import { StandardHandlerPlugin, StandardHandlerHandleOptions, StandardHandler, StandardHandlerOptions } from '../standard/index.mjs';
6
6
  import { FriendlyStandardHandlerHandleOptions } from '../standard/index.mjs';
7
- import { R as Router } from '../../shared/server.Dm0os-OP.mjs';
8
- import { R as RPCHandlerCodecOptions } from '../../shared/server.CkNnZ5F-.mjs';
7
+ import { Router } from '../../index.mjs';
8
+ import { RPCHandlerCodecOptions } from '../standard/index.mjs';
9
9
  import '@orpc/client';
10
10
  import '@orpc/contract';
11
11
  import '@standardserver/core';
@@ -1,11 +1,11 @@
1
1
  export { R as BodyLimitPlugin } from '../../shared/server.BhHrioCw.js';
2
2
  import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
3
3
  import { SendStandardResponseOptions, NodeHttpRequest, NodeHttpResponse } from '@standardserver/node';
4
- import { C as Context } from '../../shared/server.CwrYlF72.js';
5
- import { S as StandardHandlerPlugin, c as StandardHandlerHandleOptions, b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.DrN1Pj1-.js';
4
+ import { Context } from '../../index.js';
5
+ import { StandardHandlerPlugin, StandardHandlerHandleOptions, StandardHandler, StandardHandlerOptions } from '../standard/index.js';
6
6
  import { FriendlyStandardHandlerHandleOptions } from '../standard/index.js';
7
- import { R as Router } from '../../shared/server.DtfwuV6U.js';
8
- import { R as RPCHandlerCodecOptions } from '../../shared/server.C2n16pp0.js';
7
+ import { Router } from '../../index.js';
8
+ import { RPCHandlerCodecOptions } from '../standard/index.js';
9
9
  import '@orpc/client';
10
10
  import '@orpc/contract';
11
11
  import '@standardserver/core';
@@ -1,7 +1,7 @@
1
1
  import { c as StandardHandlerHandleOptions } from '../../shared/server.JbCIPL4P.mjs';
2
2
  export { C as CompositeStandardHandlerPlugin, O as OtelHandlerPlugin, b as StandardHandler, d as StandardHandlerCodec, e as StandardHandlerCodecResolvedProcedure, h as StandardHandlerHandleResult, i as StandardHandlerInterceptor, g as StandardHandlerInterceptorOptions, a as StandardHandlerOptions, S as StandardHandlerPlugin, j as StandardHandlerRoutingInterceptor, f as StandardHandlerRoutingInterceptorOptions } from '../../shared/server.JbCIPL4P.mjs';
3
3
  export { a as RPCHandlerCodec, R as RPCHandlerCodecOptions, b as RPCMatcher, c as RPCMatcherOptions, d as RPC_DEFAULT_ALLOW_METHODS } from '../../shared/server.CkNnZ5F-.mjs';
4
- import { C as Context } from '../../shared/server.CwrYlF72.mjs';
4
+ import { Context } from '../../index.mjs';
5
5
  import '@orpc/client';
6
6
  import '@orpc/shared';
7
7
  import '@standardserver/core';
@@ -1,7 +1,7 @@
1
1
  import { c as StandardHandlerHandleOptions } from '../../shared/server.DrN1Pj1-.js';
2
2
  export { C as CompositeStandardHandlerPlugin, O as OtelHandlerPlugin, b as StandardHandler, d as StandardHandlerCodec, e as StandardHandlerCodecResolvedProcedure, h as StandardHandlerHandleResult, i as StandardHandlerInterceptor, g as StandardHandlerInterceptorOptions, a as StandardHandlerOptions, S as StandardHandlerPlugin, j as StandardHandlerRoutingInterceptor, f as StandardHandlerRoutingInterceptorOptions } from '../../shared/server.DrN1Pj1-.js';
3
3
  export { a as RPCHandlerCodec, R as RPCHandlerCodecOptions, b as RPCMatcher, c as RPCMatcherOptions, d as RPC_DEFAULT_ALLOW_METHODS } from '../../shared/server.C2n16pp0.js';
4
- import { C as Context } from '../../shared/server.CwrYlF72.js';
4
+ import { Context } from '../../index.js';
5
5
  import '@orpc/client';
6
6
  import '@orpc/shared';
7
7
  import '@standardserver/core';
@@ -1,7 +1,7 @@
1
1
  import { Value, Promisable } from '@orpc/shared';
2
2
  import { StandardLazyRequest, StandardResponse } from '@standardserver/core';
3
- import { C as Context } from '../../shared/server.CwrYlF72.mjs';
4
- import { c as StandardHandlerHandleOptions, b as StandardHandler } from '../../shared/server.JbCIPL4P.mjs';
3
+ import { Context } from '../../index.mjs';
4
+ import { StandardHandlerHandleOptions, StandardHandler } from '../standard/index.mjs';
5
5
  import '@orpc/client';
6
6
  import '@orpc/contract';
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { Value, Promisable } from '@orpc/shared';
2
2
  import { StandardLazyRequest, StandardResponse } from '@standardserver/core';
3
- import { C as Context } from '../../shared/server.CwrYlF72.js';
4
- import { c as StandardHandlerHandleOptions, b as StandardHandler } from '../../shared/server.DrN1Pj1-.js';
3
+ import { Context } from '../../index.js';
4
+ import { StandardHandlerHandleOptions, StandardHandler } from '../standard/index.js';
5
5
  import '@orpc/client';
6
6
  import '@orpc/contract';
7
7
 
@@ -1,10 +1,10 @@
1
1
  import { Arrayable, MaybeOptionalOptions } from '@orpc/shared';
2
2
  import { EncodePeerMessageOptions, DecodePeerMessageOptions } from '@standardserver/peer';
3
- import { C as Context } from '../../shared/server.CwrYlF72.mjs';
4
- import { b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.JbCIPL4P.mjs';
3
+ import { Context } from '../../index.mjs';
4
+ import { StandardHandler, StandardHandlerOptions } from '../standard/index.mjs';
5
5
  import { StandardPeerRequestHandlerOptions } from '../standard-peer/index.mjs';
6
- import { R as Router } from '../../shared/server.Dm0os-OP.mjs';
7
- import { R as RPCHandlerCodecOptions } from '../../shared/server.CkNnZ5F-.mjs';
6
+ import { Router } from '../../index.mjs';
7
+ import { RPCHandlerCodecOptions } from '../standard/index.mjs';
8
8
  import '@orpc/client';
9
9
  import '@orpc/contract';
10
10
  import '@standardserver/core';
@@ -1,10 +1,10 @@
1
1
  import { Arrayable, MaybeOptionalOptions } from '@orpc/shared';
2
2
  import { EncodePeerMessageOptions, DecodePeerMessageOptions } from '@standardserver/peer';
3
- import { C as Context } from '../../shared/server.CwrYlF72.js';
4
- import { b as StandardHandler, a as StandardHandlerOptions } from '../../shared/server.DrN1Pj1-.js';
3
+ import { Context } from '../../index.js';
4
+ import { StandardHandler, StandardHandlerOptions } from '../standard/index.js';
5
5
  import { StandardPeerRequestHandlerOptions } from '../standard-peer/index.js';
6
- import { R as Router } from '../../shared/server.DtfwuV6U.js';
7
- import { R as RPCHandlerCodecOptions } from '../../shared/server.C2n16pp0.js';
6
+ import { Router } from '../../index.js';
7
+ import { RPCHandlerCodecOptions } from '../standard/index.js';
8
8
  import '@orpc/client';
9
9
  import '@orpc/contract';
10
10
  import '@standardserver/core';
@@ -1,7 +1,7 @@
1
1
  import { AnyORPCError, ClientContext } from '@orpc/client';
2
2
  import { AnySchema, ErrorMap } from '@orpc/contract';
3
3
  import { MaybeOptionalOptions } from '@orpc/shared';
4
- import { C as Context, P as ProcedureClientOptions, a as Procedure, b as ProcedureClient } from '../shared/server.CwrYlF72.mjs';
4
+ import { Context, ProcedureClientOptions, Procedure, ProcedureClient } from '../index.mjs';
5
5
 
6
6
  declare module '@orpc/server' {
7
7
  interface DecoratedProcedure<TInitialContext extends Context, TInjectedContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TReturnedError extends AnyORPCError> {
@@ -1,7 +1,7 @@
1
1
  import { AnyORPCError, ClientContext } from '@orpc/client';
2
2
  import { AnySchema, ErrorMap } from '@orpc/contract';
3
3
  import { MaybeOptionalOptions } from '@orpc/shared';
4
- import { C as Context, P as ProcedureClientOptions, a as Procedure, b as ProcedureClient } from '../shared/server.CwrYlF72.js';
4
+ import { Context, ProcedureClientOptions, Procedure, ProcedureClient } from '../index.js';
5
5
 
6
6
  declare module '@orpc/server' {
7
7
  interface DecoratedProcedure<TInitialContext extends Context, TInjectedContext extends Context, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TReturnedError extends AnyORPCError> {
@@ -1,7 +1,7 @@
1
1
  import { Value, Promisable, ThrowableError } from '@orpc/shared';
2
2
  import { StandardLazyRequest, StandardHeaders, StandardMethod } from '@standardserver/core';
3
- import { C as Context } from '../shared/server.CwrYlF72.mjs';
4
- import { S as StandardHandlerPlugin, f as StandardHandlerRoutingInterceptorOptions, a as StandardHandlerOptions, g as StandardHandlerInterceptorOptions } from '../shared/server.JbCIPL4P.mjs';
3
+ import { Context } from '../index.mjs';
4
+ import { StandardHandlerPlugin, StandardHandlerRoutingInterceptorOptions, StandardHandlerOptions, StandardHandlerInterceptorOptions } from '../adapters/standard/index.mjs';
5
5
  export { R as RequestLimitHandlerPlugin, a as RequestLimitHandlerPluginOptions } from '../shared/server.D0Ipbmdv.mjs';
6
6
  import '@orpc/client';
7
7
  import '@orpc/contract';
@@ -345,5 +345,40 @@ declare class RethrowHandlerPlugin<T extends Context> implements StandardHandler
345
345
  init(options: StandardHandlerOptions<T>): StandardHandlerOptions<T>;
346
346
  }
347
347
 
348
- export { BATCH_CONTENT_TYPE, BatchHandlerPlugin, CORSHandlerPlugin, CORSHandlerPlugin as CORSPlugin, GetMethodCsrfProtectionHandlerPlugin, MethodOverrideHandlerPlugin, RequestCompressionHandlerPlugin, RequestHeadersHandlerPlugin, RequestHeadersHandlerPlugin as RequestHeadersPlugin, ResponseCompressionHandlerPlugin, ResponseHeadersHandlerPlugin, ResponseHeadersHandlerPlugin as ResponseHeadersPlugin, RethrowHandlerPlugin };
349
- export type { BatchHandlerPluginOptions, CORSHandlerPluginOptions, MethodOverrideHandlerPluginOptions, RequestHeadersHandlerPluginContext, RequestHeadersHandlerPluginContext as RequestHeadersPluginContext, ResponseCompressionHandlerPluginOptions, ResponseHeadersHandlerPluginContext, ResponseHeadersHandlerPluginContext as ResponseHeadersPluginContext, RethrowHandlerPluginOptions };
348
+ interface TimeoutHandlerPluginOptions<T extends Context> {
349
+ /**
350
+ * Timeout in milliseconds before the request signal is aborted.
351
+ * This only covers producing the response, use `streamingTimeout`
352
+ * to limit streaming response bodies.
353
+ * Use `null` or `undefined` to disable the timeout.
354
+ */
355
+ timeout: Value<number | null | undefined, [options: StandardHandlerInterceptorOptions<T>]>;
356
+ /**
357
+ * Timeout in milliseconds for the full duration of a streaming response body
358
+ * (async iterator object or readable stream), measured from when the response is produced.
359
+ * When exceeded, the request signal is aborted and the body ends
360
+ * once its producer honors the signal.
361
+ * Usually higher than `timeout`.
362
+ * Use `null` or `undefined` to disable the timeout.
363
+ *
364
+ * @default undefined (streaming responses run without limit)
365
+ */
366
+ streamingTimeout?: Value<number | null | undefined, [options: StandardHandlerInterceptorOptions<T>]>;
367
+ }
368
+ /**
369
+ * The Timeout Handler Plugin aborts the request signal with an `AbortError`
370
+ * when handling exceeds a configured timeout. It only aborts the signal,
371
+ * the procedure must honor it to stop early and produce the response.
372
+ *
373
+ * @see {@link https://orpc.dev/docs/plugins/timeout | Timeout Plugin}
374
+ */
375
+ declare class TimeoutHandlerPlugin<T extends Context> implements StandardHandlerPlugin<T> {
376
+ private readonly timeout;
377
+ private readonly streamingTimeout;
378
+ name: string;
379
+ constructor(options: NoInfer<TimeoutHandlerPluginOptions<T>>);
380
+ init(options: StandardHandlerOptions<T>): StandardHandlerOptions<T>;
381
+ }
382
+
383
+ export { BATCH_CONTENT_TYPE, BatchHandlerPlugin, CORSHandlerPlugin, CORSHandlerPlugin as CORSPlugin, GetMethodCsrfProtectionHandlerPlugin, MethodOverrideHandlerPlugin, RequestCompressionHandlerPlugin, RequestHeadersHandlerPlugin, RequestHeadersHandlerPlugin as RequestHeadersPlugin, ResponseCompressionHandlerPlugin, ResponseHeadersHandlerPlugin, ResponseHeadersHandlerPlugin as ResponseHeadersPlugin, RethrowHandlerPlugin, TimeoutHandlerPlugin };
384
+ export type { BatchHandlerPluginOptions, CORSHandlerPluginOptions, MethodOverrideHandlerPluginOptions, RequestHeadersHandlerPluginContext, RequestHeadersHandlerPluginContext as RequestHeadersPluginContext, ResponseCompressionHandlerPluginOptions, ResponseHeadersHandlerPluginContext, ResponseHeadersHandlerPluginContext as ResponseHeadersPluginContext, RethrowHandlerPluginOptions, TimeoutHandlerPluginOptions };
@@ -1,7 +1,7 @@
1
1
  import { Value, Promisable, ThrowableError } from '@orpc/shared';
2
2
  import { StandardLazyRequest, StandardHeaders, StandardMethod } from '@standardserver/core';
3
- import { C as Context } from '../shared/server.CwrYlF72.js';
4
- import { S as StandardHandlerPlugin, f as StandardHandlerRoutingInterceptorOptions, a as StandardHandlerOptions, g as StandardHandlerInterceptorOptions } from '../shared/server.DrN1Pj1-.js';
3
+ import { Context } from '../index.js';
4
+ import { StandardHandlerPlugin, StandardHandlerRoutingInterceptorOptions, StandardHandlerOptions, StandardHandlerInterceptorOptions } from '../adapters/standard/index.js';
5
5
  export { R as RequestLimitHandlerPlugin, a as RequestLimitHandlerPluginOptions } from '../shared/server.BhHrioCw.js';
6
6
  import '@orpc/client';
7
7
  import '@orpc/contract';
@@ -345,5 +345,40 @@ declare class RethrowHandlerPlugin<T extends Context> implements StandardHandler
345
345
  init(options: StandardHandlerOptions<T>): StandardHandlerOptions<T>;
346
346
  }
347
347
 
348
- export { BATCH_CONTENT_TYPE, BatchHandlerPlugin, CORSHandlerPlugin, CORSHandlerPlugin as CORSPlugin, GetMethodCsrfProtectionHandlerPlugin, MethodOverrideHandlerPlugin, RequestCompressionHandlerPlugin, RequestHeadersHandlerPlugin, RequestHeadersHandlerPlugin as RequestHeadersPlugin, ResponseCompressionHandlerPlugin, ResponseHeadersHandlerPlugin, ResponseHeadersHandlerPlugin as ResponseHeadersPlugin, RethrowHandlerPlugin };
349
- export type { BatchHandlerPluginOptions, CORSHandlerPluginOptions, MethodOverrideHandlerPluginOptions, RequestHeadersHandlerPluginContext, RequestHeadersHandlerPluginContext as RequestHeadersPluginContext, ResponseCompressionHandlerPluginOptions, ResponseHeadersHandlerPluginContext, ResponseHeadersHandlerPluginContext as ResponseHeadersPluginContext, RethrowHandlerPluginOptions };
348
+ interface TimeoutHandlerPluginOptions<T extends Context> {
349
+ /**
350
+ * Timeout in milliseconds before the request signal is aborted.
351
+ * This only covers producing the response, use `streamingTimeout`
352
+ * to limit streaming response bodies.
353
+ * Use `null` or `undefined` to disable the timeout.
354
+ */
355
+ timeout: Value<number | null | undefined, [options: StandardHandlerInterceptorOptions<T>]>;
356
+ /**
357
+ * Timeout in milliseconds for the full duration of a streaming response body
358
+ * (async iterator object or readable stream), measured from when the response is produced.
359
+ * When exceeded, the request signal is aborted and the body ends
360
+ * once its producer honors the signal.
361
+ * Usually higher than `timeout`.
362
+ * Use `null` or `undefined` to disable the timeout.
363
+ *
364
+ * @default undefined (streaming responses run without limit)
365
+ */
366
+ streamingTimeout?: Value<number | null | undefined, [options: StandardHandlerInterceptorOptions<T>]>;
367
+ }
368
+ /**
369
+ * The Timeout Handler Plugin aborts the request signal with an `AbortError`
370
+ * when handling exceeds a configured timeout. It only aborts the signal,
371
+ * the procedure must honor it to stop early and produce the response.
372
+ *
373
+ * @see {@link https://orpc.dev/docs/plugins/timeout | Timeout Plugin}
374
+ */
375
+ declare class TimeoutHandlerPlugin<T extends Context> implements StandardHandlerPlugin<T> {
376
+ private readonly timeout;
377
+ private readonly streamingTimeout;
378
+ name: string;
379
+ constructor(options: NoInfer<TimeoutHandlerPluginOptions<T>>);
380
+ init(options: StandardHandlerOptions<T>): StandardHandlerOptions<T>;
381
+ }
382
+
383
+ export { BATCH_CONTENT_TYPE, BatchHandlerPlugin, CORSHandlerPlugin, CORSHandlerPlugin as CORSPlugin, GetMethodCsrfProtectionHandlerPlugin, MethodOverrideHandlerPlugin, RequestCompressionHandlerPlugin, RequestHeadersHandlerPlugin, RequestHeadersHandlerPlugin as RequestHeadersPlugin, ResponseCompressionHandlerPlugin, ResponseHeadersHandlerPlugin, ResponseHeadersHandlerPlugin as ResponseHeadersPlugin, RethrowHandlerPlugin, TimeoutHandlerPlugin };
384
+ export type { BatchHandlerPluginOptions, CORSHandlerPluginOptions, MethodOverrideHandlerPluginOptions, RequestHeadersHandlerPluginContext, RequestHeadersHandlerPluginContext as RequestHeadersPluginContext, ResponseCompressionHandlerPluginOptions, ResponseHeadersHandlerPluginContext, ResponseHeadersHandlerPluginContext as ResponseHeadersPluginContext, RethrowHandlerPluginOptions, TimeoutHandlerPluginOptions };
@@ -1,4 +1,4 @@
1
- import { toArray, value, parseAcceptEncodingQualities, isCompressibleContentType, isAsyncIteratorObject, stringifyJSON } from '@orpc/shared';
1
+ import { toArray, value, isNoTransformCacheControl, parseAcceptEncodingQualities, isCompressibleContentType, varyByAcceptEncoding, isAsyncIteratorObject, stringifyJSON, anyAbortSignal, override, wrapAsyncIterator, wrapReadableStream, AbortError } from '@orpc/shared';
2
2
  import { flattenStandardHeader, parseStandardUrl, generateContentDisposition, mergeStandardHeaders } from '@standardserver/core';
3
3
  import { isClientPeerSendMessage, ServerPeer, encodePeerMessage } from '@standardserver/peer';
4
4
  import { toFetchHeaders, toStandardBody, toStandardHeaders } from '@standardserver/fetch';
@@ -508,7 +508,7 @@ class ResponseCompressionHandlerPlugin {
508
508
  "standard-server": "octet-stream",
509
509
  "content-length": [],
510
510
  "content-encoding": encoding,
511
- "vary": varyByAcceptEncoding(headers.vary)
511
+ "vary": varyByAcceptEncoding(flattenStandardHeader(headers.vary))
512
512
  }
513
513
  }
514
514
  };
@@ -530,7 +530,7 @@ class ResponseCompressionHandlerPlugin {
530
530
  "content-length": [],
531
531
  "content-disposition": contentDisposition,
532
532
  "content-encoding": encoding,
533
- "vary": varyByAcceptEncoding(headers.vary)
533
+ "vary": varyByAcceptEncoding(flattenStandardHeader(headers.vary))
534
534
  }
535
535
  }
536
536
  };
@@ -568,7 +568,7 @@ class ResponseCompressionHandlerPlugin {
568
568
  "content-type": res.headers.get("content-type"),
569
569
  "content-length": [],
570
570
  "content-encoding": encoding,
571
- "vary": varyByAcceptEncoding(headers.vary)
571
+ "vary": varyByAcceptEncoding(flattenStandardHeader(headers.vary))
572
572
  }
573
573
  }
574
574
  };
@@ -587,7 +587,7 @@ class ResponseCompressionHandlerPlugin {
587
587
  "content-type": "application/x-www-form-urlencoded",
588
588
  "content-length": [],
589
589
  "content-encoding": encoding,
590
- "vary": varyByAcceptEncoding(headers.vary)
590
+ "vary": varyByAcceptEncoding(flattenStandardHeader(headers.vary))
591
591
  }
592
592
  }
593
593
  };
@@ -606,7 +606,7 @@ class ResponseCompressionHandlerPlugin {
606
606
  "content-type": "application/json",
607
607
  "content-length": [],
608
608
  "content-encoding": encoding,
609
- "vary": varyByAcceptEncoding(headers.vary)
609
+ "vary": varyByAcceptEncoding(flattenStandardHeader(headers.vary))
610
610
  }
611
611
  }
612
612
  };
@@ -623,21 +623,6 @@ class ResponseCompressionHandlerPlugin {
623
623
  };
624
624
  }
625
625
  }
626
- function varyByAcceptEncoding(vary) {
627
- const current = flattenStandardHeader(vary);
628
- if (current === void 0) {
629
- return "accept-encoding";
630
- }
631
- const fields = current.split(",").map((field) => field.trim().toLowerCase());
632
- return fields.includes("accept-encoding") || fields.includes("*") ? current : `${current}, accept-encoding`;
633
- }
634
- const CACHE_CONTROL_NO_TRANSFORM_REGEX = /(?:^|,)\s*no-transform\s*(?:,|$)/i;
635
- function isNoTransformCacheControl(cacheControl) {
636
- if (cacheControl === void 0) {
637
- return false;
638
- }
639
- return CACHE_CONTROL_NO_TRANSFORM_REGEX.test(cacheControl);
640
- }
641
626
 
642
627
  class ResponseHeadersHandlerPlugin {
643
628
  name = "~response-headers";
@@ -727,4 +712,53 @@ class RethrowHandlerPlugin {
727
712
  }
728
713
  }
729
714
 
730
- export { BATCH_CONTENT_TYPE, BatchHandlerPlugin, CORSHandlerPlugin, CORSHandlerPlugin as CORSPlugin, GetMethodCsrfProtectionHandlerPlugin, MethodOverrideHandlerPlugin, RequestCompressionHandlerPlugin, RequestHeadersHandlerPlugin, RequestHeadersHandlerPlugin as RequestHeadersPlugin, ResponseCompressionHandlerPlugin, ResponseHeadersHandlerPlugin, ResponseHeadersHandlerPlugin as ResponseHeadersPlugin, RethrowHandlerPlugin };
715
+ class TimeoutHandlerPlugin {
716
+ timeout;
717
+ streamingTimeout;
718
+ name = "~timeout";
719
+ constructor(options) {
720
+ this.timeout = options.timeout;
721
+ this.streamingTimeout = options.streamingTimeout;
722
+ }
723
+ init(options) {
724
+ const interceptor = async (interceptorOptions) => {
725
+ const timeoutMs = value(this.timeout, interceptorOptions);
726
+ const streamingTimeoutMs = value(this.streamingTimeout, interceptorOptions);
727
+ const hasTimeout = timeoutMs !== null && timeoutMs !== void 0;
728
+ const hasStreamingTimeout = streamingTimeoutMs !== null && streamingTimeoutMs !== void 0;
729
+ if (!hasTimeout && !hasStreamingTimeout) {
730
+ return interceptorOptions.next();
731
+ }
732
+ const controller = new AbortController();
733
+ const abortWithTimeout = (ms) => {
734
+ controller.abort(new AbortError(`Request timed out after ${ms}ms`));
735
+ };
736
+ const timeoutId = hasTimeout ? setTimeout(abortWithTimeout, timeoutMs, timeoutMs) : void 0;
737
+ const signal = anyAbortSignal([interceptorOptions.request.signal, controller.signal]);
738
+ try {
739
+ const response = await interceptorOptions.next({
740
+ ...interceptorOptions,
741
+ request: { ...interceptorOptions.request, signal }
742
+ });
743
+ if (hasStreamingTimeout) {
744
+ const body = response.body;
745
+ const isIterator = isAsyncIteratorObject(body);
746
+ if (isIterator || body instanceof ReadableStream) {
747
+ const streamingTimeoutId = setTimeout(abortWithTimeout, streamingTimeoutMs, streamingTimeoutMs);
748
+ const onFinish = () => clearTimeout(streamingTimeoutId);
749
+ return {
750
+ ...response,
751
+ body: isIterator ? override(body, wrapAsyncIterator(body, { onFinish })) : override(body, wrapReadableStream(body, { onFinish }))
752
+ };
753
+ }
754
+ }
755
+ return response;
756
+ } finally {
757
+ clearTimeout(timeoutId);
758
+ }
759
+ };
760
+ return { ...options, interceptors: [interceptor, ...toArray(options.interceptors)] };
761
+ }
762
+ }
763
+
764
+ export { BATCH_CONTENT_TYPE, BatchHandlerPlugin, CORSHandlerPlugin, CORSHandlerPlugin as CORSPlugin, GetMethodCsrfProtectionHandlerPlugin, MethodOverrideHandlerPlugin, RequestCompressionHandlerPlugin, RequestHeadersHandlerPlugin, RequestHeadersHandlerPlugin as RequestHeadersPlugin, ResponseCompressionHandlerPlugin, ResponseHeadersHandlerPlugin, ResponseHeadersHandlerPlugin as ResponseHeadersPlugin, RethrowHandlerPlugin, TimeoutHandlerPlugin };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/server",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.27",
4
+ "version": "2.0.0-beta.29",
5
5
  "license": "MIT",
6
6
  "funding": "https://github.com/sponsors/dinwwwh",
7
7
  "homepage": "https://orpc.dev",
@@ -100,16 +100,16 @@
100
100
  }
101
101
  },
102
102
  "dependencies": {
103
- "@standardserver/aws-lambda": "^0.7.1",
104
- "@standardserver/core": "^0.7.1",
105
- "@standardserver/fastify": "^0.7.1",
106
- "@standardserver/fetch": "^0.7.1",
107
- "@standardserver/node": "^0.7.1",
108
- "@standardserver/peer": "^0.7.1",
103
+ "@standardserver/aws-lambda": "^0.8.0",
104
+ "@standardserver/core": "^0.8.0",
105
+ "@standardserver/fastify": "^0.8.0",
106
+ "@standardserver/fetch": "^0.8.0",
107
+ "@standardserver/node": "^0.8.0",
108
+ "@standardserver/peer": "^0.8.0",
109
109
  "cookie": "^2.0.1",
110
- "@orpc/client": "2.0.0-beta.27",
111
- "@orpc/contract": "2.0.0-beta.27",
112
- "@orpc/shared": "2.0.0-beta.27"
110
+ "@orpc/client": "2.0.0-beta.29",
111
+ "@orpc/shared": "2.0.0-beta.29",
112
+ "@orpc/contract": "2.0.0-beta.29"
113
113
  },
114
114
  "devDependencies": {
115
115
  "crossws": "^0.4.6",