@orpc/server 0.0.0-next.dd914a8 → 0.0.0-next.de2bec7
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 +11 -7
- package/dist/adapters/aws-lambda/index.d.mts +1 -1
- package/dist/adapters/aws-lambda/index.d.ts +1 -1
- package/dist/adapters/aws-lambda/index.mjs +4 -6
- package/dist/adapters/bun-ws/index.mjs +5 -5
- package/dist/adapters/crossws/index.mjs +5 -5
- package/dist/adapters/fastify/index.d.mts +1 -1
- package/dist/adapters/fastify/index.d.ts +1 -1
- package/dist/adapters/fastify/index.mjs +4 -6
- package/dist/adapters/fetch/index.d.mts +1 -1
- package/dist/adapters/fetch/index.d.ts +1 -1
- package/dist/adapters/fetch/index.mjs +4 -5
- package/dist/adapters/message-port/index.mjs +5 -5
- package/dist/adapters/node/index.d.mts +1 -1
- package/dist/adapters/node/index.d.ts +1 -1
- package/dist/adapters/node/index.mjs +4 -6
- package/dist/adapters/standard/index.mjs +2 -2
- package/dist/adapters/standard-peer/index.d.mts +1 -1
- package/dist/adapters/standard-peer/index.d.ts +1 -1
- package/dist/adapters/standard-peer/index.mjs +21 -7
- package/dist/adapters/websocket/index.d.mts +2 -2
- package/dist/adapters/websocket/index.d.ts +2 -2
- package/dist/adapters/websocket/index.mjs +5 -5
- package/dist/adapters/ws/index.mjs +5 -5
- package/dist/hibernation/index.d.mts +2 -2
- package/dist/hibernation/index.d.ts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/plugins/index.d.mts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/shared/{server.Ds4HPpvH.mjs → server.DEBcqOjg.mjs} +12 -3
- package/dist/shared/{server.Bxx6tqNe.mjs → server.ZxHCEN1h.mjs} +8 -1
- package/package.json +13 -12
- package/dist/shared/server.UVMTOWrk.mjs +0 -26
package/README.md
CHANGED
|
@@ -135,7 +135,6 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
135
135
|
<table>
|
|
136
136
|
<tr>
|
|
137
137
|
<td align="center"><a href="https://misskey.io/?ref=orpc" target="_blank" rel="noopener" title="村上さん"><img src="https://avatars.githubusercontent.com/u/37681609?u=0dd4c7e4ba937cbb52b068c55914b1d8164dc0c7&v=4" width="209" alt="村上さん"/><br />村上さん</a></td>
|
|
138
|
-
<td align="center"><a href="https://github.com/christ12938?ref=orpc" target="_blank" rel="noopener" title="christ12938"><img src="https://avatars.githubusercontent.com/u/25758598?v=4" width="209" alt="christ12938"/><br />christ12938</a></td>
|
|
139
138
|
</tr>
|
|
140
139
|
</table>
|
|
141
140
|
|
|
@@ -152,23 +151,22 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
152
151
|
<table>
|
|
153
152
|
<tr>
|
|
154
153
|
<td align="center"><a href="https://github.com/hrmcdonald?ref=orpc" target="_blank" rel="noopener" title="Reece McDonald"><img src="https://avatars.githubusercontent.com/u/39349270?v=4" width="139" alt="Reece McDonald"/><br />Reece McDonald</a></td>
|
|
155
|
-
<td align="center"><a href="https://github.com/u1-liquid?ref=orpc" target="_blank" rel="noopener" title="あわわわとーにゅ"><img src="https://avatars.githubusercontent.com/u/17376330?u=de3353804be889f009f7e0a1582daf04d0ab292d&v=4" width="139" alt="あわわわとーにゅ"/><br />あわわわとーにゅ</a></td>
|
|
156
154
|
<td align="center"><a href="https://github.com/nicognaW?ref=orpc" target="_blank" rel="noopener" title="nk"><img src="https://avatars.githubusercontent.com/u/66731869?u=4699bda3a9092d3ec34fbd959450767bcc8b8b6d&v=4" width="139" alt="nk"/><br />nk</a></td>
|
|
157
155
|
<td align="center"><a href="https://github.com/supastarter?ref=orpc" target="_blank" rel="noopener" title="supastarter"><img src="https://avatars.githubusercontent.com/u/110960143?v=4" width="139" alt="supastarter"/><br />supastarter</a></td>
|
|
158
156
|
<td align="center"><a href="https://github.com/divmgl?ref=orpc" target="_blank" rel="noopener" title="Dexter Miguel"><img src="https://avatars.githubusercontent.com/u/5452298?u=645993204be8696c085ecf0d228c3062efe2ed65&v=4" width="139" alt="Dexter Miguel"/><br />Dexter Miguel</a></td>
|
|
159
157
|
<td align="center"><a href="https://github.com/herrfugbaum?ref=orpc" target="_blank" rel="noopener" title="herrfugbaum"><img src="https://avatars.githubusercontent.com/u/12859776?u=644dc1666d0220bc0468eb0de3c56b919f635b16&v=4" width="139" alt="herrfugbaum"/><br />herrfugbaum</a></td>
|
|
158
|
+
<td align="center"><a href="https://github.com/ryota-murakami?ref=orpc" target="_blank" rel="noopener" title="Ryota Murakami"><img src="https://avatars.githubusercontent.com/u/5501268?u=599389e03340734325726ca3f8f423c021d47d7f&v=4" width="139" alt="Ryota Murakami"/><br />Ryota Murakami</a></td>
|
|
160
159
|
</tr>
|
|
161
160
|
<tr>
|
|
162
|
-
<td align="center"><a href="https://github.com/ryota-murakami?ref=orpc" target="_blank" rel="noopener" title="Ryota Murakami"><img src="https://avatars.githubusercontent.com/u/5501268?u=599389e03340734325726ca3f8f423c021d47d7f&v=4" width="139" alt="Ryota Murakami"/><br />Ryota Murakami</a></td>
|
|
163
161
|
<td align="center"><a href="https://github.com/dcramer?ref=orpc" target="_blank" rel="noopener" title="David Cramer"><img src="https://avatars.githubusercontent.com/u/23610?v=4" width="139" alt="David Cramer"/><br />David Cramer</a></td>
|
|
164
162
|
<td align="center"><a href="https://github.com/valerii15298?ref=orpc" target="_blank" rel="noopener" title="Valerii Petryniak"><img src="https://avatars.githubusercontent.com/u/44531564?u=88ac74d9bacd20401518441907acad21063cd397&v=4" width="139" alt="Valerii Petryniak"/><br />Valerii Petryniak</a></td>
|
|
165
|
-
<td align="center"><a href="https://github.com/happyboy2022?ref=orpc" target="_blank" rel="noopener" title="happyboy"><img src="https://avatars.githubusercontent.com/u/103669586?u=65b49c4b893ed3703909fbb3a7a22313f3f9c121&v=4" width="139" alt="happyboy"/><br />happyboy</a></td>
|
|
166
163
|
<td align="center"><a href="https://github.com/letstri?ref=orpc" target="_blank" rel="noopener" title="Valerii Strilets"><img src="https://avatars.githubusercontent.com/u/13253748?u=c7b10399ccc8f8081e24db94ec32cd9858e86ac3&v=4" width="139" alt="Valerii Strilets"/><br />Valerii Strilets</a></td>
|
|
167
164
|
<td align="center"><a href="https://github.com/K-Mistele?ref=orpc" target="_blank" rel="noopener" title="Kyle Mistele"><img src="https://avatars.githubusercontent.com/u/18430555?u=3afebeb81de666e35aaac3ed46f14159d7603ffb&v=4" width="139" alt="Kyle Mistele"/><br />Kyle Mistele</a></td>
|
|
168
|
-
</tr>
|
|
169
|
-
<tr>
|
|
170
165
|
<td align="center"><a href="https://github.com/andrewpeters9?ref=orpc" target="_blank" rel="noopener" title="Andrew Peters"><img src="https://avatars.githubusercontent.com/u/36251325?v=4" width="139" alt="Andrew Peters"/><br />Andrew Peters</a></td>
|
|
171
166
|
<td align="center"><a href="https://github.com/R44VC0RP?ref=orpc" target="_blank" rel="noopener" title="Ryan Vogel"><img src="https://avatars.githubusercontent.com/u/89211796?u=1857347b9787d8d8a7ea5bfc333f96be92d5a683&v=4" width="139" alt="Ryan Vogel"/><br />Ryan Vogel</a></td>
|
|
167
|
+
</tr>
|
|
168
|
+
<tr>
|
|
169
|
+
<td align="center"><a href="https://github.com/christ12938?ref=orpc" target="_blank" rel="noopener" title="christ12938"><img src="https://avatars.githubusercontent.com/u/25758598?v=4" width="139" alt="christ12938"/><br />christ12938</a></td>
|
|
172
170
|
<td align="center"><a href="https://github.com/peter-adam-dy?ref=orpc" target="_blank" rel="noopener" title="Peter Adam"><img src="https://avatars.githubusercontent.com/u/132129459?u=4f3dbbb3b443990b56acb7d6a5d11ed2c555f6db&v=4" width="139" alt="Peter Adam"/><br />Peter Adam</a></td>
|
|
173
171
|
<td align="center"><a href="https://github.com/yukimotochern?ref=orpc" target="_blank" rel="noopener" title="Chen, Zhi-Yuan"><img src="https://avatars.githubusercontent.com/u/20896173?u=945c33fc21725e4d566a0d02afc54b136ca1d67a&v=4" width="139" alt="Chen, Zhi-Yuan"/><br />Chen, Zhi-Yuan</a></td>
|
|
174
172
|
<td align="center"><a href="https://github.com/Ryanjso?ref=orpc" target="_blank" rel="noopener" title="Ryan Soderberg"><img src="https://avatars.githubusercontent.com/u/39172778?u=5ed913c31d57e7221b75784abcad48c7ebddde27&v=4" width="139" alt="Ryan Soderberg"/><br />Ryan Soderberg</a></td>
|
|
@@ -193,8 +191,12 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
193
191
|
<td align="center"><a href="https://github.com/Titoine?ref=orpc" target="_blank" rel="noopener" title="Titoine"><img src="https://avatars.githubusercontent.com/u/3514286?u=1bb1e86b0c99c8a1121372e56d51a177eea12191&v=4" width="119" alt="Titoine"/><br />Titoine</a></td>
|
|
194
192
|
<td align="center"><a href="https://github.com/Mnigos?ref=orpc" target="_blank" rel="noopener" title="Igor Makowski"><img src="https://avatars.githubusercontent.com/u/56691628?u=ee8c879478f7c151b9156aef6c74243fa3e247a8&v=4" width="119" alt="Igor Makowski"/><br />Igor Makowski</a></td>
|
|
195
193
|
<td align="center"><a href="https://github.com/steelbrain?ref=orpc" target="_blank" rel="noopener" title="Anees Iqbal"><img src="https://avatars.githubusercontent.com/u/4278113?u=22b80b5399eed68ac76cd58b02961b0481f1db11&v=4" width="119" alt="Anees Iqbal"/><br />Anees Iqbal</a></td>
|
|
194
|
+
<td align="center"><a href="https://github.com/hanayashiki?ref=orpc" target="_blank" rel="noopener" title="wang chenyu"><img src="https://avatars.githubusercontent.com/u/26056783?u=06c3b9205a16fd41a871e82da1cc2a09306d53f5&v=4" width="119" alt="wang chenyu"/><br />wang chenyu</a></td>
|
|
196
195
|
<td align="center"><a href="https://github.com/piscis?ref=orpc" target="_blank" rel="noopener" title="Alex"><img src="https://avatars.githubusercontent.com/u/326163?u=b245f368bd940cf51d08c0b6bf55f8257f359437&v=4" width="119" alt="Alex"/><br />Alex</a></td>
|
|
197
196
|
</tr>
|
|
197
|
+
<tr>
|
|
198
|
+
<td align="center"><a href="https://github.com/nattstack?ref=orpc" target="_blank" rel="noopener" title="nattstack"><img src="https://avatars.githubusercontent.com/u/31426677?u=fa9dbb8b3e66eb0ea3c88db5dc07f31c8c5418fe&v=4" width="119" alt="nattstack"/><br />nattstack</a></td>
|
|
199
|
+
</tr>
|
|
198
200
|
</table>
|
|
199
201
|
|
|
200
202
|
### Past Sponsors
|
|
@@ -202,6 +204,7 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
202
204
|
<p>
|
|
203
205
|
<a href="https://github.com/MrMaxie?ref=orpc" target="_blank" rel="noopener" title="Maxie"><img src="https://avatars.githubusercontent.com/u/3857836?u=5e6b57973d4385d655663ffdd836e487856f2984&v=4" width="32" height="32" alt="Maxie" /></a>
|
|
204
206
|
<a href="https://github.com/Stijn-Timmer?ref=orpc" target="_blank" rel="noopener" title="Stijn Timmer"><img src="https://avatars.githubusercontent.com/u/100147665?u=106b2c18e9c98a61861b4ee7fc100f5b9906a6c9&v=4" width="32" height="32" alt="Stijn Timmer" /></a>
|
|
207
|
+
<a href="https://github.com/u1-liquid?ref=orpc" target="_blank" rel="noopener" title="あわわわとーにゅ"><img src="https://avatars.githubusercontent.com/u/17376330?u=de3353804be889f009f7e0a1582daf04d0ab292d&v=4" width="32" height="32" alt="あわわわとーにゅ" /></a>
|
|
205
208
|
<a href="https://github.com/zuplo?ref=orpc" target="_blank" rel="noopener" title="Zuplo"><img src="https://avatars.githubusercontent.com/u/85497839?v=4" width="32" height="32" alt="Zuplo" /></a>
|
|
206
209
|
<a href="https://github.com/motopods?ref=orpc" target="_blank" rel="noopener" title="motopods"><img src="https://avatars.githubusercontent.com/u/58200641?u=18833983d65b481ae90a4adec2373064ec58bcf3&v=4" width="32" height="32" alt="motopods" /></a>
|
|
207
210
|
<a href="https://github.com/franciscohermida?ref=orpc" target="_blank" rel="noopener" title="Francisco Hermida"><img src="https://avatars.githubusercontent.com/u/483242?u=bbcbc80eb9d8781ff401f7dafc3b59cd7bea0561&v=4" width="32" height="32" alt="Francisco Hermida" /></a>
|
|
@@ -210,13 +213,14 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
210
213
|
<a href="https://github.com/shr-ink?ref=orpc" target="_blank" rel="noopener" title="shr.ink oü"><img src="https://avatars.githubusercontent.com/u/139700438?v=4" width="32" height="32" alt="shr.ink oü" /></a>
|
|
211
214
|
<a href="https://github.com/johngerome?ref=orpc" target="_blank" rel="noopener" title="0x4e32"><img src="https://avatars.githubusercontent.com/u/2002000?u=24e8dd943cfc862aa284d858a023532c75071ade&v=4" width="32" height="32" alt="0x4e32" /></a>
|
|
212
215
|
<a href="https://github.com/yzuyr?ref=orpc" target="_blank" rel="noopener" title="Ryuz"><img src="https://avatars.githubusercontent.com/u/196539378?u=d38374588d219b6748b16406982f6559411466d4&v=4" width="32" height="32" alt="Ryuz" /></a>
|
|
216
|
+
<a href="https://github.com/happyboy2022?ref=orpc" target="_blank" rel="noopener" title="happyboy"><img src="https://avatars.githubusercontent.com/u/103669586?u=65b49c4b893ed3703909fbb3a7a22313f3f9c121&v=4" width="32" height="32" alt="happyboy" /></a>
|
|
213
217
|
<a href="https://github.com/YiCChi?ref=orpc" target="_blank" rel="noopener" title="yicchi"><img src="https://avatars.githubusercontent.com/u/86967274?u=6c2756f09fe15dd94d572f560e979cd157982852&v=4" width="32" height="32" alt="yicchi" /></a>
|
|
214
218
|
<a href="https://github.com/cloudycotton?ref=orpc" target="_blank" rel="noopener" title="Saksham"><img src="https://avatars.githubusercontent.com/u/168998965?u=9b9634a5aed66a51c1b880663272725b00b92b14&v=4" width="32" height="32" alt="Saksham" /></a>
|
|
215
219
|
<a href="https://github.com/hrynevychroman?ref=orpc" target="_blank" rel="noopener" title="Roman Hrynevych"><img src="https://avatars.githubusercontent.com/u/82209198?u=1a1d111ab3d589855b9cc8a7fefb1b5c6a4fbbaf&v=4" width="32" height="32" alt="Roman Hrynevych" /></a>
|
|
216
220
|
<a href="https://github.com/rokitgg?ref=orpc" target="_blank" rel="noopener" title="rokitg"><img src="https://avatars.githubusercontent.com/u/125133357?u=06c74aefaa2236b06a2e5fba5a5c612339f45912&v=4" width="32" height="32" alt="rokitg" /></a>
|
|
217
221
|
<a href="https://github.com/omarkhatibgg?ref=orpc" target="_blank" rel="noopener" title="Omar Khatib"><img src="https://avatars.githubusercontent.com/u/9054278?u=afbba7331b85c51b8eee4130f5fd31b1017dc919&v=4" width="32" height="32" alt="Omar Khatib" /></a>
|
|
218
222
|
<a href="https://github.com/YuSabo90002?ref=orpc" target="_blank" rel="noopener" title="Yu-Sabo"><img src="https://avatars.githubusercontent.com/u/13120582?v=4" width="32" height="32" alt="Yu-Sabo" /></a>
|
|
219
|
-
<a href="https://github.com/bapspatil?ref=orpc" target="_blank" rel="noopener" title="Bapusaheb Patil"><img src="https://avatars.githubusercontent.com/u/16699418?v=4" width="32" height="32" alt="Bapusaheb Patil" /></a>
|
|
223
|
+
<a href="https://github.com/bapspatil?ref=orpc" target="_blank" rel="noopener" title="Bapusaheb Patil"><img src="https://avatars.githubusercontent.com/u/16699418?u=6d9d8e0a64a6f91ca1c4d559c72d931172bdcbbd&v=4" width="32" height="32" alt="Bapusaheb Patil" /></a>
|
|
220
224
|
<a href="https://github.com/ripgrim?ref=orpc" target="_blank" rel="noopener" title="grim"><img src="https://avatars.githubusercontent.com/u/75869731?u=b17c42ec2309552fdb822a86b25a2f99146a4d72&v=4" width="32" height="32" alt="grim" /></a>
|
|
221
225
|
<a href="https://github.com/nelsonlaidev?ref=orpc" target="_blank" rel="noopener" title="Nelson Lai"><img src="https://avatars.githubusercontent.com/u/75498339?u=2fc0e0b95dd184c5ffb744df977cb15a18b60672&v=4" width="32" height="32" alt="Nelson Lai" /></a>
|
|
222
226
|
<a href="https://github.com/nguyenlc1993?ref=orpc" target="_blank" rel="noopener" title="Lê Cao Nguyên"><img src="https://avatars.githubusercontent.com/u/13871971?u=83c8b69d9e35b589c4e1f066cc113b1d9461386f&v=4" width="32" height="32" alt="Lê Cao Nguyên" /></a>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { SendStandardResponseOptions, APIGatewayProxyEventV2, ResponseStream } from '@orpc/standard-server-aws-lambda';
|
|
3
3
|
import { C as Context, R as Router } from '../../shared/server.qKsRrdxW.mjs';
|
|
4
|
-
import { f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
5
4
|
import { F as FriendlyStandardHandleOptions } from '../../shared/server.B8gYOD5g.mjs';
|
|
5
|
+
import { f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
6
6
|
import { S as StandardRPCHandlerOptions } from '../../shared/server.ChUyt5-i.mjs';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/contract';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { SendStandardResponseOptions, APIGatewayProxyEventV2, ResponseStream } from '@orpc/standard-server-aws-lambda';
|
|
3
3
|
import { C as Context, R as Router } from '../../shared/server.qKsRrdxW.js';
|
|
4
|
-
import { f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
5
4
|
import { F as FriendlyStandardHandleOptions } from '../../shared/server.EfTOZ2Q7.js';
|
|
5
|
+
import { f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
6
6
|
import { S as StandardRPCHandlerOptions } from '../../shared/server.yoEB3Fx4.js';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/contract';
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { toStandardLazyRequest, sendStandardResponse } from '@orpc/standard-server-aws-lambda';
|
|
3
3
|
import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.DZ5BIITo.mjs';
|
|
4
|
-
import '@orpc/standard-server';
|
|
5
|
-
import '@orpc/standard-server/batch';
|
|
6
|
-
import '@orpc/standard-server-fetch';
|
|
7
|
-
import '@orpc/client';
|
|
8
4
|
import { S as StrictGetMethodPlugin } from '../../shared/server.TEVCLCFC.mjs';
|
|
5
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
9
6
|
import '@orpc/contract';
|
|
10
|
-
import { b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
11
7
|
import '@orpc/client/standard';
|
|
12
|
-
import '
|
|
8
|
+
import '@orpc/client';
|
|
9
|
+
import '@orpc/standard-server';
|
|
10
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
13
11
|
|
|
14
12
|
class AwsLambdaHandler {
|
|
15
13
|
constructor(standardHandler, options = {}) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { ServerPeer } from '@orpc/standard-server-peer';
|
|
3
|
-
import {
|
|
3
|
+
import { createServerPeerHandleRequestFn } from '../standard-peer/index.mjs';
|
|
4
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
5
|
+
import '../../shared/server.DZ5BIITo.mjs';
|
|
6
|
+
import '@orpc/client/standard';
|
|
4
7
|
import '@orpc/client';
|
|
5
8
|
import '@orpc/standard-server';
|
|
9
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
6
10
|
import '@orpc/contract';
|
|
7
|
-
import { b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
8
|
-
import '@orpc/client/standard';
|
|
9
|
-
import '../../shared/server.DZ5BIITo.mjs';
|
|
10
|
-
import '../../shared/server.Ds4HPpvH.mjs';
|
|
11
11
|
|
|
12
12
|
class BunWsHandler {
|
|
13
13
|
constructor(standardHandler) {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { ServerPeer } from '@orpc/standard-server-peer';
|
|
3
|
-
import {
|
|
3
|
+
import { createServerPeerHandleRequestFn } from '../standard-peer/index.mjs';
|
|
4
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
5
|
+
import '../../shared/server.DZ5BIITo.mjs';
|
|
6
|
+
import '@orpc/client/standard';
|
|
4
7
|
import '@orpc/client';
|
|
5
8
|
import '@orpc/standard-server';
|
|
9
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
6
10
|
import '@orpc/contract';
|
|
7
|
-
import { b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
8
|
-
import '@orpc/client/standard';
|
|
9
|
-
import '../../shared/server.DZ5BIITo.mjs';
|
|
10
|
-
import '../../shared/server.Ds4HPpvH.mjs';
|
|
11
11
|
|
|
12
12
|
class experimental_CrosswsHandler {
|
|
13
13
|
constructor(standardHandler) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { FastifyRequest, FastifyReply, SendStandardResponseOptions } from '@orpc/standard-server-fastify';
|
|
3
3
|
import { C as Context, R as Router } from '../../shared/server.qKsRrdxW.mjs';
|
|
4
|
-
import { b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
5
4
|
import { F as FriendlyStandardHandleOptions } from '../../shared/server.B8gYOD5g.mjs';
|
|
5
|
+
import { b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
6
6
|
import { S as StandardRPCHandlerOptions } from '../../shared/server.ChUyt5-i.mjs';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/contract';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { FastifyRequest, FastifyReply, SendStandardResponseOptions } from '@orpc/standard-server-fastify';
|
|
3
3
|
import { C as Context, R as Router } from '../../shared/server.qKsRrdxW.js';
|
|
4
|
-
import { b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
5
4
|
import { F as FriendlyStandardHandleOptions } from '../../shared/server.EfTOZ2Q7.js';
|
|
5
|
+
import { b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
6
6
|
import { S as StandardRPCHandlerOptions } from '../../shared/server.yoEB3Fx4.js';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/contract';
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import { toArray, intercept, resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { toStandardLazyRequest, sendStandardResponse } from '@orpc/standard-server-fastify';
|
|
3
3
|
import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.DZ5BIITo.mjs';
|
|
4
|
-
import '@orpc/standard-server';
|
|
5
|
-
import '@orpc/standard-server/batch';
|
|
6
|
-
import '@orpc/standard-server-fetch';
|
|
7
|
-
import '@orpc/client';
|
|
8
4
|
import { S as StrictGetMethodPlugin } from '../../shared/server.TEVCLCFC.mjs';
|
|
5
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
9
6
|
import '@orpc/contract';
|
|
10
|
-
import { b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
11
7
|
import '@orpc/client/standard';
|
|
12
|
-
import '
|
|
8
|
+
import '@orpc/client';
|
|
9
|
+
import '@orpc/standard-server';
|
|
10
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
13
11
|
|
|
14
12
|
class FastifyHandler {
|
|
15
13
|
constructor(standardHandler, options = {}) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as Context, R as Router } from '../../shared/server.qKsRrdxW.mjs';
|
|
2
2
|
import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
|
|
3
3
|
import { ToFetchResponseOptions } from '@orpc/standard-server-fetch';
|
|
4
|
-
import { g as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
5
4
|
import { F as FriendlyStandardHandleOptions } from '../../shared/server.B8gYOD5g.mjs';
|
|
5
|
+
import { g as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
6
6
|
import { S as StandardRPCHandlerOptions } from '../../shared/server.ChUyt5-i.mjs';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/contract';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as Context, R as Router } from '../../shared/server.qKsRrdxW.js';
|
|
2
2
|
import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
|
|
3
3
|
import { ToFetchResponseOptions } from '@orpc/standard-server-fetch';
|
|
4
|
-
import { g as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
5
4
|
import { F as FriendlyStandardHandleOptions } from '../../shared/server.EfTOZ2Q7.js';
|
|
5
|
+
import { g as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
6
6
|
import { S as StandardRPCHandlerOptions } from '../../shared/server.yoEB3Fx4.js';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/contract';
|
|
@@ -2,13 +2,12 @@ import { ORPCError } from '@orpc/client';
|
|
|
2
2
|
import { toArray, intercept, resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
3
3
|
import { toStandardLazyRequest, toFetchResponse } from '@orpc/standard-server-fetch';
|
|
4
4
|
import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.DZ5BIITo.mjs';
|
|
5
|
+
import { C as CompositeStandardHandlerPlugin, b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
6
|
+
import { S as StrictGetMethodPlugin } from '../../shared/server.TEVCLCFC.mjs';
|
|
7
|
+
import '@orpc/client/standard';
|
|
5
8
|
import '@orpc/standard-server';
|
|
9
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
6
10
|
import '@orpc/contract';
|
|
7
|
-
import { C as CompositeStandardHandlerPlugin, b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
8
|
-
import '@orpc/client/standard';
|
|
9
|
-
import '@orpc/standard-server/batch';
|
|
10
|
-
import { S as StrictGetMethodPlugin } from '../../shared/server.TEVCLCFC.mjs';
|
|
11
|
-
import '../../shared/server.Ds4HPpvH.mjs';
|
|
12
11
|
|
|
13
12
|
class BodyLimitPlugin {
|
|
14
13
|
maxBodySize;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { postMessagePortMessage, onMessagePortMessage, onMessagePortClose } from '@orpc/client/message-port';
|
|
2
2
|
import { value, resolveMaybeOptionalOptions, isObject } from '@orpc/shared';
|
|
3
3
|
import { experimental_ServerPeerWithoutCodec, serializeResponseMessage, encodeResponseMessage, deserializeRequestMessage, decodeRequestMessage } from '@orpc/standard-server-peer';
|
|
4
|
-
import {
|
|
4
|
+
import { createServerPeerHandleRequestFn } from '../standard-peer/index.mjs';
|
|
5
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
6
|
+
import '../../shared/server.DZ5BIITo.mjs';
|
|
7
|
+
import '@orpc/client/standard';
|
|
5
8
|
import '@orpc/client';
|
|
6
9
|
import '@orpc/standard-server';
|
|
10
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
7
11
|
import '@orpc/contract';
|
|
8
|
-
import { b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
9
|
-
import '@orpc/client/standard';
|
|
10
|
-
import '../../shared/server.DZ5BIITo.mjs';
|
|
11
|
-
import '../../shared/server.Ds4HPpvH.mjs';
|
|
12
12
|
|
|
13
13
|
class MessagePortHandler {
|
|
14
14
|
constructor(standardHandler, options = {}) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as Context, R as Router } from '../../shared/server.qKsRrdxW.mjs';
|
|
2
2
|
import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
|
|
3
3
|
import { SendStandardResponseOptions, NodeHttpRequest, NodeHttpResponse } from '@orpc/standard-server-node';
|
|
4
|
-
import { g as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
5
4
|
import { F as FriendlyStandardHandleOptions } from '../../shared/server.B8gYOD5g.mjs';
|
|
5
|
+
import { g as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
6
6
|
import compression from '@orpc/interop/compression';
|
|
7
7
|
import { S as StandardRPCHandlerOptions } from '../../shared/server.ChUyt5-i.mjs';
|
|
8
8
|
import '@orpc/client';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { C as Context, R as Router } from '../../shared/server.qKsRrdxW.js';
|
|
2
2
|
import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
|
|
3
3
|
import { SendStandardResponseOptions, NodeHttpRequest, NodeHttpResponse } from '@orpc/standard-server-node';
|
|
4
|
-
import { g as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
5
4
|
import { F as FriendlyStandardHandleOptions } from '../../shared/server.EfTOZ2Q7.js';
|
|
5
|
+
import { g as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandleOptions, f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
6
6
|
import compression from '@orpc/interop/compression';
|
|
7
7
|
import { S as StandardRPCHandlerOptions } from '../../shared/server.yoEB3Fx4.js';
|
|
8
8
|
import '@orpc/client';
|
|
@@ -3,14 +3,12 @@ import { once, toArray, intercept, resolveMaybeOptionalOptions } from '@orpc/sha
|
|
|
3
3
|
import compression from '@orpc/interop/compression';
|
|
4
4
|
import { toStandardLazyRequest, sendStandardResponse } from '@orpc/standard-server-node';
|
|
5
5
|
import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.DZ5BIITo.mjs';
|
|
6
|
+
import { C as CompositeStandardHandlerPlugin, b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
7
|
+
import { S as StrictGetMethodPlugin } from '../../shared/server.TEVCLCFC.mjs';
|
|
8
|
+
import '@orpc/client/standard';
|
|
6
9
|
import '@orpc/standard-server';
|
|
10
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
7
11
|
import '@orpc/contract';
|
|
8
|
-
import { C as CompositeStandardHandlerPlugin, b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
9
|
-
import '@orpc/client/standard';
|
|
10
|
-
import '@orpc/standard-server/batch';
|
|
11
|
-
import '@orpc/standard-server-fetch';
|
|
12
|
-
import { S as StrictGetMethodPlugin } from '../../shared/server.TEVCLCFC.mjs';
|
|
13
|
-
import '../../shared/server.Ds4HPpvH.mjs';
|
|
14
12
|
|
|
15
13
|
class BodyLimitPlugin {
|
|
16
14
|
maxBodySize;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { C as CompositeStandardHandlerPlugin, S as StandardHandler, a as StandardRPCCodec, b as StandardRPCHandler, c as StandardRPCMatcher } from '../../shared/server.
|
|
1
|
+
export { C as CompositeStandardHandlerPlugin, S as StandardHandler, a as StandardRPCCodec, b as StandardRPCHandler, c as StandardRPCMatcher } from '../../shared/server.ZxHCEN1h.mjs';
|
|
2
2
|
export { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.DZ5BIITo.mjs';
|
|
3
3
|
import '@orpc/client/standard';
|
|
4
4
|
import '@orpc/client';
|
|
5
5
|
import '@orpc/shared';
|
|
6
6
|
import '@orpc/standard-server';
|
|
7
|
-
import '../../shared/server.
|
|
7
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
8
8
|
import '@orpc/contract';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerPeer, EncodedMessage, ServerPeerHandleRequestFn } from '@orpc/standard-server-peer';
|
|
2
2
|
import { C as Context } from '../../shared/server.qKsRrdxW.mjs';
|
|
3
|
-
import { f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
4
3
|
import { F as FriendlyStandardHandleOptions } from '../../shared/server.B8gYOD5g.mjs';
|
|
4
|
+
import { f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
5
5
|
import '@orpc/client';
|
|
6
6
|
import '@orpc/contract';
|
|
7
7
|
import '@orpc/shared';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ServerPeer, EncodedMessage, ServerPeerHandleRequestFn } from '@orpc/standard-server-peer';
|
|
2
2
|
import { C as Context } from '../../shared/server.qKsRrdxW.js';
|
|
3
|
-
import { f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
4
3
|
import { F as FriendlyStandardHandleOptions } from '../../shared/server.EfTOZ2Q7.js';
|
|
4
|
+
import { f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
5
5
|
import '@orpc/client';
|
|
6
6
|
import '@orpc/contract';
|
|
7
7
|
import '@orpc/shared';
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { r as resolveFriendlyStandardHandleOptions } from '../../shared/server.DZ5BIITo.mjs';
|
|
2
|
+
|
|
3
|
+
async function handleStandardServerPeerMessage(handler, peer, message, options) {
|
|
4
|
+
const [id, request] = await peer.message(message);
|
|
5
|
+
if (!request) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const handle = createServerPeerHandleRequestFn(handler, options);
|
|
9
|
+
await peer.response(id, await handle(request));
|
|
10
|
+
}
|
|
11
|
+
function createServerPeerHandleRequestFn(handler, options) {
|
|
12
|
+
return async (request) => {
|
|
13
|
+
const { response } = await handler.handle(
|
|
14
|
+
{ ...request, body: () => Promise.resolve(request.body) },
|
|
15
|
+
resolveFriendlyStandardHandleOptions(options)
|
|
16
|
+
);
|
|
17
|
+
return response ?? { status: 404, headers: {}, body: "No procedure matched" };
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { createServerPeerHandleRequestFn, handleStandardServerPeerMessage };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { C as Context, R as Router } from '../../shared/server.qKsRrdxW.mjs';
|
|
3
|
-
import { f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
4
3
|
import { HandleStandardServerPeerMessageOptions } from '../standard-peer/index.mjs';
|
|
4
|
+
import { f as StandardHandler } from '../../shared/server.BqadksTP.mjs';
|
|
5
5
|
import { S as StandardRPCHandlerOptions } from '../../shared/server.ChUyt5-i.mjs';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@orpc/contract';
|
|
8
|
-
import '@orpc/standard-server';
|
|
9
8
|
import '@orpc/standard-server-peer';
|
|
10
9
|
import '../../shared/server.B8gYOD5g.mjs';
|
|
10
|
+
import '@orpc/standard-server';
|
|
11
11
|
import '@orpc/client/standard';
|
|
12
12
|
import '../../shared/server.C8_sRzQB.mjs';
|
|
13
13
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { C as Context, R as Router } from '../../shared/server.qKsRrdxW.js';
|
|
3
|
-
import { f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
4
3
|
import { HandleStandardServerPeerMessageOptions } from '../standard-peer/index.js';
|
|
4
|
+
import { f as StandardHandler } from '../../shared/server.7cEtMB30.js';
|
|
5
5
|
import { S as StandardRPCHandlerOptions } from '../../shared/server.yoEB3Fx4.js';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@orpc/contract';
|
|
8
|
-
import '@orpc/standard-server';
|
|
9
8
|
import '@orpc/standard-server-peer';
|
|
10
9
|
import '../../shared/server.EfTOZ2Q7.js';
|
|
10
|
+
import '@orpc/standard-server';
|
|
11
11
|
import '@orpc/client/standard';
|
|
12
12
|
import '../../shared/server.ChyoA9XY.js';
|
|
13
13
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { readAsBuffer, resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { ServerPeer } from '@orpc/standard-server-peer';
|
|
3
|
-
import {
|
|
3
|
+
import { createServerPeerHandleRequestFn } from '../standard-peer/index.mjs';
|
|
4
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
5
|
+
import '../../shared/server.DZ5BIITo.mjs';
|
|
6
|
+
import '@orpc/client/standard';
|
|
4
7
|
import '@orpc/client';
|
|
5
8
|
import '@orpc/standard-server';
|
|
9
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
6
10
|
import '@orpc/contract';
|
|
7
|
-
import { b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
8
|
-
import '@orpc/client/standard';
|
|
9
|
-
import '../../shared/server.DZ5BIITo.mjs';
|
|
10
|
-
import '../../shared/server.Ds4HPpvH.mjs';
|
|
11
11
|
|
|
12
12
|
class WebsocketHandler {
|
|
13
13
|
#peers = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { readAsBuffer, resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { ServerPeer } from '@orpc/standard-server-peer';
|
|
3
|
-
import {
|
|
3
|
+
import { createServerPeerHandleRequestFn } from '../standard-peer/index.mjs';
|
|
4
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
5
|
+
import '../../shared/server.DZ5BIITo.mjs';
|
|
6
|
+
import '@orpc/client/standard';
|
|
4
7
|
import '@orpc/client';
|
|
5
8
|
import '@orpc/standard-server';
|
|
9
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
6
10
|
import '@orpc/contract';
|
|
7
|
-
import { b as StandardRPCHandler } from '../../shared/server.Bxx6tqNe.mjs';
|
|
8
|
-
import '@orpc/client/standard';
|
|
9
|
-
import '../../shared/server.DZ5BIITo.mjs';
|
|
10
|
-
import '../../shared/server.Ds4HPpvH.mjs';
|
|
11
11
|
|
|
12
12
|
class WsHandler {
|
|
13
13
|
constructor(standardHandler) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StandardRPCJsonSerializerOptions } from '@orpc/client/standard';
|
|
2
|
-
import {
|
|
2
|
+
import { C as Context, R as Router } from '../shared/server.qKsRrdxW.mjs';
|
|
3
3
|
import { HibernationEventIterator } from '@orpc/standard-server';
|
|
4
4
|
export { HibernationEventIterator, HibernationEventIteratorCallback } from '@orpc/standard-server';
|
|
5
|
-
import {
|
|
5
|
+
import { g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.BqadksTP.mjs';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@orpc/contract';
|
|
8
8
|
import '@orpc/shared';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StandardRPCJsonSerializerOptions } from '@orpc/client/standard';
|
|
2
|
-
import {
|
|
2
|
+
import { C as Context, R as Router } from '../shared/server.qKsRrdxW.js';
|
|
3
3
|
import { HibernationEventIterator } from '@orpc/standard-server';
|
|
4
4
|
export { HibernationEventIterator, HibernationEventIteratorCallback } from '@orpc/standard-server';
|
|
5
|
-
import {
|
|
5
|
+
import { g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.7cEtMB30.js';
|
|
6
6
|
import '@orpc/client';
|
|
7
7
|
import '@orpc/contract';
|
|
8
8
|
import '@orpc/shared';
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeErrorMap, mergeMeta, mergeRoute, mergePrefix, mergeTags, isContractProcedure, getContractRouter, fallbackContractConfig } from '@orpc/contract';
|
|
2
2
|
export { ValidationError, eventIterator, type, validateORPCError } from '@orpc/contract';
|
|
3
|
-
import { P as Procedure, b as addMiddleware, c as createProcedureClient, e as enhanceRouter, l as lazy, s as setHiddenRouterContract, u as unlazy, g as getRouter, i as isProcedure, d as isLazy, f as createAssertedLazyProcedure } from './shared/server.
|
|
4
|
-
export { L as LAZY_SYMBOL, p as call, r as createAccessibleLazyRouter, a as createContractedProcedure, h as createORPCErrorConstructorMap, q as getHiddenRouterContract, j as getLazyMeta, n as isStartWithMiddlewares, m as mergeCurrentContext, o as mergeMiddlewares, k as middlewareOutputFn, v as resolveContractProcedures, t as traverseContractProcedures, w as unlazyRouter } from './shared/server.
|
|
3
|
+
import { P as Procedure, b as addMiddleware, c as createProcedureClient, e as enhanceRouter, l as lazy, s as setHiddenRouterContract, u as unlazy, g as getRouter, i as isProcedure, d as isLazy, f as createAssertedLazyProcedure } from './shared/server.DEBcqOjg.mjs';
|
|
4
|
+
export { L as LAZY_SYMBOL, p as call, r as createAccessibleLazyRouter, a as createContractedProcedure, h as createORPCErrorConstructorMap, q as getHiddenRouterContract, j as getLazyMeta, n as isStartWithMiddlewares, m as mergeCurrentContext, o as mergeMiddlewares, k as middlewareOutputFn, v as resolveContractProcedures, t as traverseContractProcedures, w as unlazyRouter } from './shared/server.DEBcqOjg.mjs';
|
|
5
5
|
import { toORPCError } from '@orpc/client';
|
|
6
6
|
export { ORPCError, isDefinedError, safe } from '@orpc/client';
|
|
7
7
|
import { isObject, resolveMaybeOptionalOptions } from '@orpc/shared';
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Value, Promisable, ThrowableError } from '@orpc/shared';
|
|
2
2
|
import { StandardRequest, StandardHeaders } from '@orpc/standard-server';
|
|
3
3
|
import { BatchResponseBodyItem } from '@orpc/standard-server/batch';
|
|
4
|
-
import { d as StandardHandlerInterceptorOptions, g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.BqadksTP.mjs';
|
|
5
4
|
import { C as Context, d as ProcedureClientInterceptorOptions } from '../shared/server.qKsRrdxW.mjs';
|
|
5
|
+
import { d as StandardHandlerInterceptorOptions, g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.BqadksTP.mjs';
|
|
6
6
|
import { Meta, ORPCError as ORPCError$1 } from '@orpc/contract';
|
|
7
7
|
import { ORPCError } from '@orpc/client';
|
|
8
8
|
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Value, Promisable, ThrowableError } from '@orpc/shared';
|
|
2
2
|
import { StandardRequest, StandardHeaders } from '@orpc/standard-server';
|
|
3
3
|
import { BatchResponseBodyItem } from '@orpc/standard-server/batch';
|
|
4
|
-
import { d as StandardHandlerInterceptorOptions, g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.7cEtMB30.js';
|
|
5
4
|
import { C as Context, d as ProcedureClientInterceptorOptions } from '../shared/server.qKsRrdxW.js';
|
|
5
|
+
import { d as StandardHandlerInterceptorOptions, g as StandardHandlerPlugin, e as StandardHandlerOptions } from '../shared/server.7cEtMB30.js';
|
|
6
6
|
import { Meta, ORPCError as ORPCError$1 } from '@orpc/contract';
|
|
7
7
|
import { ORPCError } from '@orpc/client';
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isContractProcedure, validateORPCError, ValidationError, mergePrefix, mergeErrorMap, enhanceRoute } from '@orpc/contract';
|
|
2
|
-
import { resolveMaybeOptionalOptions, toArray, value, runWithSpan, intercept, isAsyncIteratorObject, overlayProxy, asyncIteratorWithSpan } from '@orpc/shared';
|
|
2
|
+
import { resolveMaybeOptionalOptions, toArray, value, runWithSpan, intercept, isAsyncIteratorObject, overlayProxy, asyncIteratorWithSpan, isTypescriptObject } from '@orpc/shared';
|
|
3
3
|
import { ORPCError, mapEventIterator } from '@orpc/client';
|
|
4
4
|
import { HibernationEventIterator } from '@orpc/standard-server';
|
|
5
5
|
|
|
@@ -263,6 +263,9 @@ function getRouter(router, path) {
|
|
|
263
263
|
if (isProcedure(current)) {
|
|
264
264
|
return void 0;
|
|
265
265
|
}
|
|
266
|
+
if (!isTypescriptObject(current)) {
|
|
267
|
+
return void 0;
|
|
268
|
+
}
|
|
266
269
|
if (!isLazy(current)) {
|
|
267
270
|
current = current[segment];
|
|
268
271
|
continue;
|
|
@@ -317,6 +320,9 @@ function enhanceRouter(router, options) {
|
|
|
317
320
|
});
|
|
318
321
|
return enhanced2;
|
|
319
322
|
}
|
|
323
|
+
if (typeof router !== "object" || router === null) {
|
|
324
|
+
return router;
|
|
325
|
+
}
|
|
320
326
|
const enhanced = {};
|
|
321
327
|
for (const key in router) {
|
|
322
328
|
enhanced[key] = enhanceRouter(router[key], options);
|
|
@@ -325,7 +331,7 @@ function enhanceRouter(router, options) {
|
|
|
325
331
|
}
|
|
326
332
|
function traverseContractProcedures(options, callback, lazyOptions = []) {
|
|
327
333
|
let currentRouter = options.router;
|
|
328
|
-
const hiddenContract = getHiddenRouterContract(options.router);
|
|
334
|
+
const hiddenContract = isTypescriptObject(options.router) ? getHiddenRouterContract(options.router) : void 0;
|
|
329
335
|
if (hiddenContract !== void 0) {
|
|
330
336
|
currentRouter = hiddenContract;
|
|
331
337
|
}
|
|
@@ -339,7 +345,7 @@ function traverseContractProcedures(options, callback, lazyOptions = []) {
|
|
|
339
345
|
contract: currentRouter,
|
|
340
346
|
path: options.path
|
|
341
347
|
});
|
|
342
|
-
} else {
|
|
348
|
+
} else if (typeof currentRouter === "object" && currentRouter !== null) {
|
|
343
349
|
for (const key in currentRouter) {
|
|
344
350
|
traverseContractProcedures(
|
|
345
351
|
{
|
|
@@ -370,6 +376,9 @@ async function unlazyRouter(router) {
|
|
|
370
376
|
if (isProcedure(router)) {
|
|
371
377
|
return router;
|
|
372
378
|
}
|
|
379
|
+
if (typeof router !== "object" || router === null) {
|
|
380
|
+
return router;
|
|
381
|
+
}
|
|
373
382
|
const unlazied = {};
|
|
374
383
|
for (const key in router) {
|
|
375
384
|
const item = router[key];
|
|
@@ -2,7 +2,7 @@ import { toHttpPath, StandardRPCJsonSerializer, StandardRPCSerializer } from '@o
|
|
|
2
2
|
import { ORPCError, toORPCError } from '@orpc/client';
|
|
3
3
|
import { toArray, intercept, runWithSpan, ORPC_NAME, isAsyncIteratorObject, asyncIteratorWithSpan, setSpanError, parseEmptyableJSON, NullProtoObj, value } from '@orpc/shared';
|
|
4
4
|
import { flattenHeader } from '@orpc/standard-server';
|
|
5
|
-
import { c as createProcedureClient, t as traverseContractProcedures, i as isProcedure, u as unlazy, g as getRouter, a as createContractedProcedure } from './server.
|
|
5
|
+
import { c as createProcedureClient, t as traverseContractProcedures, i as isProcedure, u as unlazy, g as getRouter, a as createContractedProcedure } from './server.DEBcqOjg.mjs';
|
|
6
6
|
|
|
7
7
|
class CompositeStandardHandlerPlugin {
|
|
8
8
|
plugins;
|
|
@@ -121,6 +121,13 @@ class StandardRPCCodec {
|
|
|
121
121
|
return this.serializer.deserialize(serialized);
|
|
122
122
|
}
|
|
123
123
|
encode(output, _procedure) {
|
|
124
|
+
if (output instanceof ReadableStream) {
|
|
125
|
+
return {
|
|
126
|
+
status: 200,
|
|
127
|
+
headers: {},
|
|
128
|
+
body: output
|
|
129
|
+
};
|
|
130
|
+
}
|
|
124
131
|
return {
|
|
125
132
|
status: 200,
|
|
126
133
|
headers: {},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.de2bec7",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"keywords": [
|
|
13
13
|
"orpc"
|
|
14
14
|
],
|
|
15
|
+
"sideEffects": false,
|
|
15
16
|
"exports": {
|
|
16
17
|
".": {
|
|
17
18
|
"types": "./dist/index.d.mts",
|
|
@@ -106,23 +107,23 @@
|
|
|
106
107
|
},
|
|
107
108
|
"dependencies": {
|
|
108
109
|
"cookie": "^1.1.1",
|
|
109
|
-
"@orpc/
|
|
110
|
-
"@orpc/
|
|
111
|
-
"@orpc/
|
|
112
|
-
"@orpc/
|
|
113
|
-
"@orpc/
|
|
114
|
-
"@orpc/standard-server
|
|
115
|
-
"@orpc/standard-server-fastify": "0.0.0-next.
|
|
116
|
-
"@orpc/standard-server-
|
|
117
|
-
"@orpc/standard-server-
|
|
118
|
-
"@orpc/standard-server-peer": "0.0.0-next.
|
|
110
|
+
"@orpc/contract": "0.0.0-next.de2bec7",
|
|
111
|
+
"@orpc/shared": "0.0.0-next.de2bec7",
|
|
112
|
+
"@orpc/interop": "0.0.0-next.de2bec7",
|
|
113
|
+
"@orpc/client": "0.0.0-next.de2bec7",
|
|
114
|
+
"@orpc/standard-server-aws-lambda": "0.0.0-next.de2bec7",
|
|
115
|
+
"@orpc/standard-server": "0.0.0-next.de2bec7",
|
|
116
|
+
"@orpc/standard-server-fastify": "0.0.0-next.de2bec7",
|
|
117
|
+
"@orpc/standard-server-node": "0.0.0-next.de2bec7",
|
|
118
|
+
"@orpc/standard-server-fetch": "0.0.0-next.de2bec7",
|
|
119
|
+
"@orpc/standard-server-peer": "0.0.0-next.de2bec7"
|
|
119
120
|
},
|
|
120
121
|
"devDependencies": {
|
|
121
122
|
"@tanstack/router-core": "^1.166.7",
|
|
122
123
|
"@types/ws": "^8.18.1",
|
|
123
124
|
"crossws": "^0.4.4",
|
|
124
125
|
"fastify": "^5.8.3",
|
|
125
|
-
"next": "^16.
|
|
126
|
+
"next": "^16.2.3",
|
|
126
127
|
"supertest": "^7.1.4",
|
|
127
128
|
"ws": "^8.18.3",
|
|
128
129
|
"zod": "^4.3.6"
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import '@orpc/client';
|
|
2
|
-
import '@orpc/shared';
|
|
3
|
-
import '@orpc/standard-server';
|
|
4
|
-
import '@orpc/contract';
|
|
5
|
-
import '@orpc/client/standard';
|
|
6
|
-
import { r as resolveFriendlyStandardHandleOptions } from './server.DZ5BIITo.mjs';
|
|
7
|
-
|
|
8
|
-
async function handleStandardServerPeerMessage(handler, peer, message, options) {
|
|
9
|
-
const [id, request] = await peer.message(message);
|
|
10
|
-
if (!request) {
|
|
11
|
-
return;
|
|
12
|
-
}
|
|
13
|
-
const handle = createServerPeerHandleRequestFn(handler, options);
|
|
14
|
-
await peer.response(id, await handle(request));
|
|
15
|
-
}
|
|
16
|
-
function createServerPeerHandleRequestFn(handler, options) {
|
|
17
|
-
return async (request) => {
|
|
18
|
-
const { response } = await handler.handle(
|
|
19
|
-
{ ...request, body: () => Promise.resolve(request.body) },
|
|
20
|
-
resolveFriendlyStandardHandleOptions(options)
|
|
21
|
-
);
|
|
22
|
-
return response ?? { status: 404, headers: {}, body: "No procedure matched" };
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { createServerPeerHandleRequestFn as c, handleStandardServerPeerMessage as h };
|