@orpc/server 1.14.2 → 1.14.3
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 +1 -1
- package/dist/adapters/aws-lambda/index.mjs +2 -2
- package/dist/adapters/bun-ws/index.mjs +2 -2
- package/dist/adapters/crossws/index.mjs +2 -2
- package/dist/adapters/fastify/index.mjs +2 -2
- package/dist/adapters/fetch/index.mjs +2 -2
- package/dist/adapters/message-port/index.mjs +2 -2
- package/dist/adapters/node/index.mjs +2 -2
- package/dist/adapters/standard/index.mjs +2 -2
- package/dist/adapters/websocket/index.mjs +2 -2
- package/dist/adapters/ws/index.mjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/shared/{server.BOmqcs4W.mjs → server.DEBcqOjg.mjs} +3 -6
- package/dist/shared/{server.Dz5G6M6M.mjs → server.ZxHCEN1h.mjs} +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -220,7 +220,7 @@ If you find oRPC valuable and would like to support its development, you can do
|
|
|
220
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>
|
|
221
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>
|
|
222
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>
|
|
223
|
-
<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>
|
|
224
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>
|
|
225
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>
|
|
226
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>
|
|
@@ -2,12 +2,12 @@ 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
4
|
import { S as StrictGetMethodPlugin } from '../../shared/server.TEVCLCFC.mjs';
|
|
5
|
-
import { b as StandardRPCHandler } from '../../shared/server.
|
|
5
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
6
6
|
import '@orpc/contract';
|
|
7
7
|
import '@orpc/client/standard';
|
|
8
8
|
import '@orpc/client';
|
|
9
9
|
import '@orpc/standard-server';
|
|
10
|
-
import '../../shared/server.
|
|
10
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
11
11
|
|
|
12
12
|
class AwsLambdaHandler {
|
|
13
13
|
constructor(standardHandler, options = {}) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { ServerPeer } from '@orpc/standard-server-peer';
|
|
3
3
|
import { createServerPeerHandleRequestFn } from '../standard-peer/index.mjs';
|
|
4
|
-
import { b as StandardRPCHandler } from '../../shared/server.
|
|
4
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
5
5
|
import '../../shared/server.DZ5BIITo.mjs';
|
|
6
6
|
import '@orpc/client/standard';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/standard-server';
|
|
9
|
-
import '../../shared/server.
|
|
9
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
10
10
|
import '@orpc/contract';
|
|
11
11
|
|
|
12
12
|
class BunWsHandler {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { ServerPeer } from '@orpc/standard-server-peer';
|
|
3
3
|
import { createServerPeerHandleRequestFn } from '../standard-peer/index.mjs';
|
|
4
|
-
import { b as StandardRPCHandler } from '../../shared/server.
|
|
4
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
5
5
|
import '../../shared/server.DZ5BIITo.mjs';
|
|
6
6
|
import '@orpc/client/standard';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/standard-server';
|
|
9
|
-
import '../../shared/server.
|
|
9
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
10
10
|
import '@orpc/contract';
|
|
11
11
|
|
|
12
12
|
class experimental_CrosswsHandler {
|
|
@@ -2,12 +2,12 @@ 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
4
|
import { S as StrictGetMethodPlugin } from '../../shared/server.TEVCLCFC.mjs';
|
|
5
|
-
import { b as StandardRPCHandler } from '../../shared/server.
|
|
5
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
6
6
|
import '@orpc/contract';
|
|
7
7
|
import '@orpc/client/standard';
|
|
8
8
|
import '@orpc/client';
|
|
9
9
|
import '@orpc/standard-server';
|
|
10
|
-
import '../../shared/server.
|
|
10
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
11
11
|
|
|
12
12
|
class FastifyHandler {
|
|
13
13
|
constructor(standardHandler, options = {}) {
|
|
@@ -2,11 +2,11 @@ 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.
|
|
5
|
+
import { C as CompositeStandardHandlerPlugin, b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
6
6
|
import { S as StrictGetMethodPlugin } from '../../shared/server.TEVCLCFC.mjs';
|
|
7
7
|
import '@orpc/client/standard';
|
|
8
8
|
import '@orpc/standard-server';
|
|
9
|
-
import '../../shared/server.
|
|
9
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
10
10
|
import '@orpc/contract';
|
|
11
11
|
|
|
12
12
|
class BodyLimitPlugin {
|
|
@@ -2,12 +2,12 @@ import { postMessagePortMessage, onMessagePortMessage, onMessagePortClose } from
|
|
|
2
2
|
import { value, resolveMaybeOptionalOptions, isObject } from '@orpc/shared';
|
|
3
3
|
import { experimental_ServerPeerWithoutCodec, serializeResponseMessage, encodeResponseMessage, deserializeRequestMessage, decodeRequestMessage } from '@orpc/standard-server-peer';
|
|
4
4
|
import { createServerPeerHandleRequestFn } from '../standard-peer/index.mjs';
|
|
5
|
-
import { b as StandardRPCHandler } from '../../shared/server.
|
|
5
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
6
6
|
import '../../shared/server.DZ5BIITo.mjs';
|
|
7
7
|
import '@orpc/client/standard';
|
|
8
8
|
import '@orpc/client';
|
|
9
9
|
import '@orpc/standard-server';
|
|
10
|
-
import '../../shared/server.
|
|
10
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
11
11
|
import '@orpc/contract';
|
|
12
12
|
|
|
13
13
|
class MessagePortHandler {
|
|
@@ -3,11 +3,11 @@ 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.
|
|
6
|
+
import { C as CompositeStandardHandlerPlugin, b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
7
7
|
import { S as StrictGetMethodPlugin } from '../../shared/server.TEVCLCFC.mjs';
|
|
8
8
|
import '@orpc/client/standard';
|
|
9
9
|
import '@orpc/standard-server';
|
|
10
|
-
import '../../shared/server.
|
|
10
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
11
11
|
import '@orpc/contract';
|
|
12
12
|
|
|
13
13
|
class BodyLimitPlugin {
|
|
@@ -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,12 +1,12 @@
|
|
|
1
1
|
import { readAsBuffer, resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { ServerPeer } from '@orpc/standard-server-peer';
|
|
3
3
|
import { createServerPeerHandleRequestFn } from '../standard-peer/index.mjs';
|
|
4
|
-
import { b as StandardRPCHandler } from '../../shared/server.
|
|
4
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
5
5
|
import '../../shared/server.DZ5BIITo.mjs';
|
|
6
6
|
import '@orpc/client/standard';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/standard-server';
|
|
9
|
-
import '../../shared/server.
|
|
9
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
10
10
|
import '@orpc/contract';
|
|
11
11
|
|
|
12
12
|
class WebsocketHandler {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { readAsBuffer, resolveMaybeOptionalOptions } from '@orpc/shared';
|
|
2
2
|
import { ServerPeer } from '@orpc/standard-server-peer';
|
|
3
3
|
import { createServerPeerHandleRequestFn } from '../standard-peer/index.mjs';
|
|
4
|
-
import { b as StandardRPCHandler } from '../../shared/server.
|
|
4
|
+
import { b as StandardRPCHandler } from '../../shared/server.ZxHCEN1h.mjs';
|
|
5
5
|
import '../../shared/server.DZ5BIITo.mjs';
|
|
6
6
|
import '@orpc/client/standard';
|
|
7
7
|
import '@orpc/client';
|
|
8
8
|
import '@orpc/standard-server';
|
|
9
|
-
import '../../shared/server.
|
|
9
|
+
import '../../shared/server.DEBcqOjg.mjs';
|
|
10
10
|
import '@orpc/contract';
|
|
11
11
|
|
|
12
12
|
class WsHandler {
|
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';
|
|
@@ -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,7 +263,7 @@ function getRouter(router, path) {
|
|
|
263
263
|
if (isProcedure(current)) {
|
|
264
264
|
return void 0;
|
|
265
265
|
}
|
|
266
|
-
if (
|
|
266
|
+
if (!isTypescriptObject(current)) {
|
|
267
267
|
return void 0;
|
|
268
268
|
}
|
|
269
269
|
if (!isLazy(current)) {
|
|
@@ -330,11 +330,8 @@ function enhanceRouter(router, options) {
|
|
|
330
330
|
return enhanced;
|
|
331
331
|
}
|
|
332
332
|
function traverseContractProcedures(options, callback, lazyOptions = []) {
|
|
333
|
-
if (typeof options.router !== "object" || options.router === null) {
|
|
334
|
-
return lazyOptions;
|
|
335
|
-
}
|
|
336
333
|
let currentRouter = options.router;
|
|
337
|
-
const hiddenContract = getHiddenRouterContract(options.router);
|
|
334
|
+
const hiddenContract = isTypescriptObject(options.router) ? getHiddenRouterContract(options.router) : void 0;
|
|
338
335
|
if (hiddenContract !== void 0) {
|
|
339
336
|
currentRouter = hiddenContract;
|
|
340
337
|
}
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.14.
|
|
4
|
+
"version": "1.14.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
@@ -107,16 +107,16 @@
|
|
|
107
107
|
},
|
|
108
108
|
"dependencies": {
|
|
109
109
|
"cookie": "^1.1.1",
|
|
110
|
-
"@orpc/
|
|
111
|
-
"@orpc/
|
|
112
|
-
"@orpc/
|
|
113
|
-
"@orpc/shared": "1.14.
|
|
114
|
-
"@orpc/
|
|
115
|
-
"@orpc/standard-server
|
|
116
|
-
"@orpc/standard-server-fastify": "1.14.
|
|
117
|
-
"@orpc/standard-server-
|
|
118
|
-
"@orpc/standard-server-
|
|
119
|
-
"@orpc/standard-server-
|
|
110
|
+
"@orpc/interop": "1.14.3",
|
|
111
|
+
"@orpc/client": "1.14.3",
|
|
112
|
+
"@orpc/standard-server-aws-lambda": "1.14.3",
|
|
113
|
+
"@orpc/shared": "1.14.3",
|
|
114
|
+
"@orpc/contract": "1.14.3",
|
|
115
|
+
"@orpc/standard-server": "1.14.3",
|
|
116
|
+
"@orpc/standard-server-fastify": "1.14.3",
|
|
117
|
+
"@orpc/standard-server-peer": "1.14.3",
|
|
118
|
+
"@orpc/standard-server-fetch": "1.14.3",
|
|
119
|
+
"@orpc/standard-server-node": "1.14.3"
|
|
120
120
|
},
|
|
121
121
|
"devDependencies": {
|
|
122
122
|
"@tanstack/router-core": "^1.166.7",
|