@orpc/server 0.0.0-next.32f3296 → 0.0.0-next.33ca37d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/fetch/index.d.mts +3 -3
- package/dist/adapters/fetch/index.d.ts +3 -3
- package/dist/adapters/fetch/index.mjs +3 -3
- package/dist/adapters/hono/index.d.mts +3 -3
- package/dist/adapters/hono/index.d.ts +3 -3
- package/dist/adapters/hono/index.mjs +3 -3
- package/dist/adapters/next/index.d.mts +3 -3
- package/dist/adapters/next/index.d.ts +3 -3
- package/dist/adapters/next/index.mjs +3 -3
- package/dist/adapters/node/index.d.mts +3 -3
- package/dist/adapters/node/index.d.ts +3 -3
- package/dist/adapters/node/index.mjs +2 -2
- package/dist/adapters/standard/index.d.mts +4 -4
- package/dist/adapters/standard/index.d.ts +4 -4
- package/dist/adapters/standard/index.mjs +2 -2
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.mjs +3 -7
- package/dist/plugins/index.d.mts +3 -3
- package/dist/plugins/index.d.ts +3 -3
- package/dist/shared/{server.Dj89-yLZ.d.ts → server.B3Tm0IXY.d.ts} +1 -1
- package/dist/shared/{server.DnmJuN02.d.mts → server.BYTulgUc.d.mts} +1 -1
- package/dist/shared/{server.DnmJuN02.d.ts → server.BYTulgUc.d.ts} +1 -1
- package/dist/shared/{server.DpIMjOfC.d.mts → server.BeJithK4.d.mts} +1 -1
- package/dist/shared/{server.B_5ZADvP.mjs → server.BtxZnWJ9.mjs} +16 -5
- package/dist/shared/{server.DKCNBSd-.d.mts → server.Bz_xNBjz.d.mts} +2 -2
- package/dist/shared/{server.D1vPuPwc.mjs → server.DoP20NVH.mjs} +1 -1
- package/dist/shared/{server.BXfgvxK8.d.ts → server.EhgR_5_I.d.ts} +2 -2
- package/dist/shared/{server.DisswUB5.mjs → server.jG7ZuX3S.mjs} +1 -1
- package/package.json +7 -7
@@ -1,8 +1,8 @@
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
2
2
|
import { ToFetchResponseOptions } from '@orpc/standard-server-fetch';
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
4
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
-
import { S as StandardRPCHandlerOptions } from '../../shared/server.
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.BYTulgUc.mjs';
|
4
|
+
import { S as StandardHandleOptions } from '../../shared/server.BeJithK4.mjs';
|
5
|
+
import { S as StandardRPCHandlerOptions } from '../../shared/server.Bz_xNBjz.mjs';
|
6
6
|
import '@orpc/client';
|
7
7
|
import '@orpc/contract';
|
8
8
|
import '@orpc/standard-server';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
2
2
|
import { ToFetchResponseOptions } from '@orpc/standard-server-fetch';
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
4
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
-
import { S as StandardRPCHandlerOptions } from '../../shared/server.
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.BYTulgUc.js';
|
4
|
+
import { S as StandardHandleOptions } from '../../shared/server.B3Tm0IXY.js';
|
5
|
+
import { S as StandardRPCHandlerOptions } from '../../shared/server.EhgR_5_I.js';
|
6
6
|
import '@orpc/client';
|
7
7
|
import '@orpc/contract';
|
8
8
|
import '@orpc/standard-server';
|
@@ -1,9 +1,9 @@
|
|
1
|
-
export { R as RPCHandler } from '../../shared/server.
|
1
|
+
export { R as RPCHandler } from '../../shared/server.DoP20NVH.mjs';
|
2
2
|
import '@orpc/client/standard';
|
3
3
|
import '@orpc/standard-server-fetch';
|
4
|
-
import '../../shared/server.
|
4
|
+
import '../../shared/server.jG7ZuX3S.mjs';
|
5
5
|
import '@orpc/client';
|
6
6
|
import '@orpc/shared';
|
7
7
|
import '../../shared/server.Q6ZmnTgO.mjs';
|
8
|
-
import '../../shared/server.
|
8
|
+
import '../../shared/server.BtxZnWJ9.mjs';
|
9
9
|
import '@orpc/contract';
|
@@ -2,10 +2,10 @@ import { FetchHandler } from '../fetch/index.mjs';
|
|
2
2
|
export { FetchHandleResult, RPCHandler } from '../fetch/index.mjs';
|
3
3
|
import { Value, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { Context as Context$1, MiddlewareHandler } from 'hono';
|
5
|
-
import { C as Context } from '../../shared/server.
|
6
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
+
import { C as Context } from '../../shared/server.BYTulgUc.mjs';
|
6
|
+
import { S as StandardHandleOptions } from '../../shared/server.BeJithK4.mjs';
|
7
7
|
import '@orpc/standard-server-fetch';
|
8
|
-
import '../../shared/server.
|
8
|
+
import '../../shared/server.Bz_xNBjz.mjs';
|
9
9
|
import '@orpc/client/standard';
|
10
10
|
import '@orpc/client';
|
11
11
|
import '@orpc/contract';
|
@@ -2,10 +2,10 @@ import { FetchHandler } from '../fetch/index.js';
|
|
2
2
|
export { FetchHandleResult, RPCHandler } from '../fetch/index.js';
|
3
3
|
import { Value, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { Context as Context$1, MiddlewareHandler } from 'hono';
|
5
|
-
import { C as Context } from '../../shared/server.
|
6
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
+
import { C as Context } from '../../shared/server.BYTulgUc.js';
|
6
|
+
import { S as StandardHandleOptions } from '../../shared/server.B3Tm0IXY.js';
|
7
7
|
import '@orpc/standard-server-fetch';
|
8
|
-
import '../../shared/server.
|
8
|
+
import '../../shared/server.EhgR_5_I.js';
|
9
9
|
import '@orpc/client/standard';
|
10
10
|
import '@orpc/client';
|
11
11
|
import '@orpc/contract';
|
@@ -1,11 +1,11 @@
|
|
1
|
-
export { R as RPCHandler } from '../../shared/server.
|
1
|
+
export { R as RPCHandler } from '../../shared/server.DoP20NVH.mjs';
|
2
2
|
import { value } from '@orpc/shared';
|
3
3
|
import '@orpc/client/standard';
|
4
4
|
import '@orpc/standard-server-fetch';
|
5
|
-
import '../../shared/server.
|
5
|
+
import '../../shared/server.jG7ZuX3S.mjs';
|
6
6
|
import '@orpc/client';
|
7
7
|
import '../../shared/server.Q6ZmnTgO.mjs';
|
8
|
-
import '../../shared/server.
|
8
|
+
import '../../shared/server.BtxZnWJ9.mjs';
|
9
9
|
import '@orpc/contract';
|
10
10
|
|
11
11
|
function createMiddleware(handler, ...[options]) {
|
@@ -2,10 +2,10 @@ import { FetchHandler } from '../fetch/index.mjs';
|
|
2
2
|
export { FetchHandleResult, RPCHandler } from '../fetch/index.mjs';
|
3
3
|
import { Value, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { NextRequest } from 'next/server';
|
5
|
-
import { C as Context } from '../../shared/server.
|
6
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
+
import { C as Context } from '../../shared/server.BYTulgUc.mjs';
|
6
|
+
import { S as StandardHandleOptions } from '../../shared/server.BeJithK4.mjs';
|
7
7
|
import '@orpc/standard-server-fetch';
|
8
|
-
import '../../shared/server.
|
8
|
+
import '../../shared/server.Bz_xNBjz.mjs';
|
9
9
|
import '@orpc/client/standard';
|
10
10
|
import '@orpc/client';
|
11
11
|
import '@orpc/contract';
|
@@ -2,10 +2,10 @@ import { FetchHandler } from '../fetch/index.js';
|
|
2
2
|
export { FetchHandleResult, RPCHandler } from '../fetch/index.js';
|
3
3
|
import { Value, MaybeOptionalOptions } from '@orpc/shared';
|
4
4
|
import { NextRequest } from 'next/server';
|
5
|
-
import { C as Context } from '../../shared/server.
|
6
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
+
import { C as Context } from '../../shared/server.BYTulgUc.js';
|
6
|
+
import { S as StandardHandleOptions } from '../../shared/server.B3Tm0IXY.js';
|
7
7
|
import '@orpc/standard-server-fetch';
|
8
|
-
import '../../shared/server.
|
8
|
+
import '../../shared/server.EhgR_5_I.js';
|
9
9
|
import '@orpc/client/standard';
|
10
10
|
import '@orpc/client';
|
11
11
|
import '@orpc/contract';
|
@@ -1,11 +1,11 @@
|
|
1
|
-
export { R as RPCHandler } from '../../shared/server.
|
1
|
+
export { R as RPCHandler } from '../../shared/server.DoP20NVH.mjs';
|
2
2
|
import { value } from '@orpc/shared';
|
3
3
|
import '@orpc/client/standard';
|
4
4
|
import '@orpc/standard-server-fetch';
|
5
|
-
import '../../shared/server.
|
5
|
+
import '../../shared/server.jG7ZuX3S.mjs';
|
6
6
|
import '@orpc/client';
|
7
7
|
import '../../shared/server.Q6ZmnTgO.mjs';
|
8
|
-
import '../../shared/server.
|
8
|
+
import '../../shared/server.BtxZnWJ9.mjs';
|
9
9
|
import '@orpc/contract';
|
10
10
|
|
11
11
|
function serve(handler, ...[options]) {
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
2
2
|
import { SendStandardResponseOptions } from '@orpc/standard-server-node';
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
4
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
-
import { S as StandardRPCHandlerOptions } from '../../shared/server.
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.BYTulgUc.mjs';
|
4
|
+
import { S as StandardHandleOptions } from '../../shared/server.BeJithK4.mjs';
|
5
|
+
import { S as StandardRPCHandlerOptions } from '../../shared/server.Bz_xNBjz.mjs';
|
6
6
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
7
7
|
import { Http2ServerRequest, Http2ServerResponse } from 'node:http2';
|
8
8
|
import '@orpc/client';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
2
2
|
import { SendStandardResponseOptions } from '@orpc/standard-server-node';
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
4
|
-
import { S as StandardHandleOptions } from '../../shared/server.
|
5
|
-
import { S as StandardRPCHandlerOptions } from '../../shared/server.
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.BYTulgUc.js';
|
4
|
+
import { S as StandardHandleOptions } from '../../shared/server.B3Tm0IXY.js';
|
5
|
+
import { S as StandardRPCHandlerOptions } from '../../shared/server.EhgR_5_I.js';
|
6
6
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
7
7
|
import { Http2ServerRequest, Http2ServerResponse } from 'node:http2';
|
8
8
|
import '@orpc/client';
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { StandardRPCJsonSerializer, StandardRPCSerializer } from '@orpc/client/standard';
|
2
2
|
import { toStandardLazyRequest, sendStandardResponse } from '@orpc/standard-server-node';
|
3
|
-
import { S as StandardHandler, b as StandardRPCMatcher, a as StandardRPCCodec } from '../../shared/server.
|
3
|
+
import { S as StandardHandler, b as StandardRPCMatcher, a as StandardRPCCodec } from '../../shared/server.jG7ZuX3S.mjs';
|
4
4
|
import '@orpc/client';
|
5
5
|
import '@orpc/shared';
|
6
6
|
import '../../shared/server.Q6ZmnTgO.mjs';
|
7
|
-
import '../../shared/server.
|
7
|
+
import '../../shared/server.BtxZnWJ9.mjs';
|
8
8
|
import '@orpc/contract';
|
9
9
|
|
10
10
|
class RPCHandler {
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { c as StandardCodec, d as StandardParams, e as StandardMatcher, f as StandardMatchResult } from '../../shared/server.
|
2
|
-
export { S as StandardHandleOptions, g as StandardHandleResult, h as StandardHandler, b as StandardHandlerInterceptorOptions, a as StandardHandlerOptions } from '../../shared/server.
|
1
|
+
import { c as StandardCodec, d as StandardParams, e as StandardMatcher, f as StandardMatchResult } from '../../shared/server.BeJithK4.mjs';
|
2
|
+
export { S as StandardHandleOptions, g as StandardHandleResult, h as StandardHandler, b as StandardHandlerInterceptorOptions, a as StandardHandlerOptions } from '../../shared/server.BeJithK4.mjs';
|
3
3
|
import { ORPCError } from '@orpc/client';
|
4
4
|
import { StandardRPCSerializer } from '@orpc/client/standard';
|
5
5
|
import { StandardLazyRequest, StandardResponse } from '@orpc/standard-server';
|
6
|
-
import { A as AnyProcedure, a as AnyRouter } from '../../shared/server.
|
7
|
-
export { S as StandardRPCHandlerOptions } from '../../shared/server.
|
6
|
+
import { A as AnyProcedure, a as AnyRouter } from '../../shared/server.BYTulgUc.mjs';
|
7
|
+
export { S as StandardRPCHandlerOptions } from '../../shared/server.Bz_xNBjz.mjs';
|
8
8
|
import { HTTPPath } from '@orpc/contract';
|
9
9
|
import '@orpc/shared';
|
10
10
|
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { c as StandardCodec, d as StandardParams, e as StandardMatcher, f as StandardMatchResult } from '../../shared/server.
|
2
|
-
export { S as StandardHandleOptions, g as StandardHandleResult, h as StandardHandler, b as StandardHandlerInterceptorOptions, a as StandardHandlerOptions } from '../../shared/server.
|
1
|
+
import { c as StandardCodec, d as StandardParams, e as StandardMatcher, f as StandardMatchResult } from '../../shared/server.B3Tm0IXY.js';
|
2
|
+
export { S as StandardHandleOptions, g as StandardHandleResult, h as StandardHandler, b as StandardHandlerInterceptorOptions, a as StandardHandlerOptions } from '../../shared/server.B3Tm0IXY.js';
|
3
3
|
import { ORPCError } from '@orpc/client';
|
4
4
|
import { StandardRPCSerializer } from '@orpc/client/standard';
|
5
5
|
import { StandardLazyRequest, StandardResponse } from '@orpc/standard-server';
|
6
|
-
import { A as AnyProcedure, a as AnyRouter } from '../../shared/server.
|
7
|
-
export { S as StandardRPCHandlerOptions } from '../../shared/server.
|
6
|
+
import { A as AnyProcedure, a as AnyRouter } from '../../shared/server.BYTulgUc.js';
|
7
|
+
export { S as StandardRPCHandlerOptions } from '../../shared/server.EhgR_5_I.js';
|
8
8
|
import { HTTPPath } from '@orpc/contract';
|
9
9
|
import '@orpc/shared';
|
10
10
|
|
@@ -1,6 +1,6 @@
|
|
1
|
-
export { S as StandardHandler, a as StandardRPCCodec, b as StandardRPCMatcher } from '../../shared/server.
|
1
|
+
export { S as StandardHandler, a as StandardRPCCodec, b as StandardRPCMatcher } from '../../shared/server.jG7ZuX3S.mjs';
|
2
2
|
import '@orpc/client';
|
3
3
|
import '@orpc/shared';
|
4
4
|
import '../../shared/server.Q6ZmnTgO.mjs';
|
5
|
-
import '../../shared/server.
|
5
|
+
import '../../shared/server.BtxZnWJ9.mjs';
|
6
6
|
import '@orpc/contract';
|
package/dist/index.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { AnySchema, ErrorMap, Meta, MergedErrorMap, Route, InferSchemaOutput, InferSchemaInput, EnhanceRouteOptions, AnyContractRouter, AnyContractProcedure, Schema, HTTPPath, ContractRouter, ContractProcedureDef, ContractProcedure, InferContractRouterErrorMap, InferContractRouterMeta, ErrorFromErrorMap } from '@orpc/contract';
|
2
2
|
export { ContractProcedure, ContractProcedureDef, ContractRouter, ErrorMap, ErrorMapItem, HTTPMethod, HTTPPath, InferSchemaInput, InferSchemaOutput, InputStructure, Meta, OutputStructure, Route, Schema, ValidationError, eventIterator, type } from '@orpc/contract';
|
3
|
-
import { C as Context, b as Procedure, M as Middleware, O as ORPCErrorConstructorMap, c as ContextExtendsGuard, d as MergedCurrentContext, e as MergedInitialContext, f as MapInputMiddleware, g as CreateProcedureClientOptions, h as ProcedureClient, i as AnyMiddleware, L as Lazyable, a as AnyRouter, j as Lazy, A as AnyProcedure, k as ProcedureHandler, R as Router, I as InferRouterInitialContext } from './shared/server.
|
4
|
-
export { K as InferRouterCurrentContexts, J as InferRouterInitialContexts, N as InferRouterInputs, Q as InferRouterOutputs, p as LAZY_SYMBOL, q as LazyMeta, y as MiddlewareNextFn, x as MiddlewareNextFnOptions, B as MiddlewareOptions, z as MiddlewareOutputFn, w as MiddlewareResult, n as ORPCErrorConstructorMapItem, l as ORPCErrorConstructorMapItemOptions, P as ProcedureClientInterceptorOptions, F as ProcedureDef, E as ProcedureHandlerOptions, o as createORPCErrorConstructorMap, H as createProcedureClient, t as getLazyMeta, s as isLazy, G as isProcedure, r as lazy, m as mergeCurrentContext, D as middlewareOutputFn, u as unlazy, v as validateORPCError } from './shared/server.
|
3
|
+
import { C as Context, b as Procedure, M as Middleware, O as ORPCErrorConstructorMap, c as ContextExtendsGuard, d as MergedCurrentContext, e as MergedInitialContext, f as MapInputMiddleware, g as CreateProcedureClientOptions, h as ProcedureClient, i as AnyMiddleware, L as Lazyable, a as AnyRouter, j as Lazy, A as AnyProcedure, k as ProcedureHandler, R as Router, I as InferRouterInitialContext } from './shared/server.BYTulgUc.mjs';
|
4
|
+
export { K as InferRouterCurrentContexts, J as InferRouterInitialContexts, N as InferRouterInputs, Q as InferRouterOutputs, p as LAZY_SYMBOL, q as LazyMeta, y as MiddlewareNextFn, x as MiddlewareNextFnOptions, B as MiddlewareOptions, z as MiddlewareOutputFn, w as MiddlewareResult, n as ORPCErrorConstructorMapItem, l as ORPCErrorConstructorMapItemOptions, P as ProcedureClientInterceptorOptions, F as ProcedureDef, E as ProcedureHandlerOptions, o as createORPCErrorConstructorMap, H as createProcedureClient, t as getLazyMeta, s as isLazy, G as isProcedure, r as lazy, m as mergeCurrentContext, D as middlewareOutputFn, u as unlazy, v as validateORPCError } from './shared/server.BYTulgUc.mjs';
|
5
5
|
import { ClientContext, ClientRest, ClientPromiseResult } from '@orpc/client';
|
6
6
|
export { ORPCError, isDefinedError, safe } from '@orpc/client';
|
7
7
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
@@ -151,18 +151,18 @@ declare class Builder<TInitialContext extends Context, TCurrentContext extends C
|
|
151
151
|
/**
|
152
152
|
* Reset initial context
|
153
153
|
*/
|
154
|
-
$context<U extends Context>(): Builder<U, U, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
154
|
+
$context<U extends Context>(): Builder<U & Record<never, never>, U, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
155
155
|
/**
|
156
156
|
* Reset initial meta
|
157
157
|
*/
|
158
|
-
$meta<U extends Meta>(initialMeta: U): Builder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, U
|
158
|
+
$meta<U extends Meta>(initialMeta: U): Builder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, U & Record<never, never>>;
|
159
159
|
/**
|
160
160
|
* Reset initial route
|
161
161
|
*/
|
162
162
|
$route(initialRoute: Route): Builder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
163
163
|
$input<U extends AnySchema>(initialInputSchema?: U): Builder<TInitialContext, TCurrentContext, U, TOutputSchema, TErrorMap, TMeta>;
|
164
164
|
middleware<UOutContext extends Context, TInput, TOutput = any>(// = any here is important to make middleware can be used in any output by default
|
165
|
-
middleware: Middleware<
|
165
|
+
middleware: Middleware<TInitialContext, UOutContext, TInput, TOutput, ORPCErrorConstructorMap<TErrorMap>, TMeta>): DecoratedMiddleware<TInitialContext, UOutContext, TInput, TOutput, ORPCErrorConstructorMap<any>, TMeta>;
|
166
166
|
errors<U extends ErrorMap>(errors: U): Builder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta>;
|
167
167
|
use<UOutContext extends Context, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<TErrorMap>, TMeta>): ContextExtendsGuard<TCurrentContext, UInContext> & BuilderWithMiddlewares<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
168
168
|
use<UOutContext extends Context, UInput, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext, UOutContext, UInput, unknown, ORPCErrorConstructorMap<TErrorMap>, TMeta>, mapInput: MapInputMiddleware<unknown, UInput>): ContextExtendsGuard<TCurrentContext, UInContext> & BuilderWithMiddlewares<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
@@ -225,7 +225,7 @@ type ImplementerInternalWithMiddlewares<TContract extends AnyContractRouter, TIn
|
|
225
225
|
|
226
226
|
interface RouterImplementer<T extends AnyContractRouter, TInitialContext extends Context, TCurrentContext extends Context> {
|
227
227
|
middleware<UOutContext extends Context, TInput, TOutput = any>(// = any here is important to make middleware can be used in any output by default
|
228
|
-
middleware: Middleware<
|
228
|
+
middleware: Middleware<TInitialContext, UOutContext, TInput, TOutput, ORPCErrorConstructorMap<InferContractRouterErrorMap<T>>, InferContractRouterMeta<T>>): DecoratedMiddleware<TInitialContext, UOutContext, TInput, TOutput, ORPCErrorConstructorMap<any>, InferContractRouterMeta<T>>;
|
229
229
|
use<UOutContext extends Context, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<InferContractRouterErrorMap<T>>, InferContractRouterMeta<T>>): ContextExtendsGuard<TCurrentContext, UInContext> & ImplementerInternalWithMiddlewares<T, MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>>;
|
230
230
|
router<U extends Router<T, TCurrentContext>>(router: U): EnhancedRouter<U, TInitialContext, TCurrentContext, Record<never, never>>;
|
231
231
|
lazy<U extends Router<T, TCurrentContext>>(loader: () => Promise<{
|
@@ -237,10 +237,10 @@ type ImplementerInternal<TContract extends AnyContractRouter, TInitialContext ex
|
|
237
237
|
});
|
238
238
|
declare function implementerInternal<T extends AnyContractRouter, TInitialContext extends Context, TCurrentContext extends Context>(contract: T, config: BuilderConfig, middlewares: AnyMiddleware[]): ImplementerInternal<T, TInitialContext, TCurrentContext>;
|
239
239
|
type Implementer<TContract extends AnyContractRouter, TInitialContext extends Context, TCurrentContext extends Context> = {
|
240
|
-
$context<U extends Context>(): Implementer<TContract, U, U>;
|
240
|
+
$context<U extends Context>(): Implementer<TContract, U & Record<never, never>, U>;
|
241
241
|
$config(config: BuilderConfig): Implementer<TContract, TInitialContext, TCurrentContext>;
|
242
242
|
} & ImplementerInternal<TContract, TInitialContext, TCurrentContext>;
|
243
|
-
declare function implement<
|
243
|
+
declare function implement<T extends AnyContractRouter, TContext extends Context = Record<never, never>>(contract: T, config?: BuilderConfig): Implementer<T, TContext, TContext>;
|
244
244
|
|
245
245
|
declare function isStartWithMiddlewares(middlewares: readonly AnyMiddleware[], compare: readonly AnyMiddleware[]): boolean;
|
246
246
|
declare function mergeMiddlewares(first: readonly AnyMiddleware[], second: readonly AnyMiddleware[], options: {
|
package/dist/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { AnySchema, ErrorMap, Meta, MergedErrorMap, Route, InferSchemaOutput, InferSchemaInput, EnhanceRouteOptions, AnyContractRouter, AnyContractProcedure, Schema, HTTPPath, ContractRouter, ContractProcedureDef, ContractProcedure, InferContractRouterErrorMap, InferContractRouterMeta, ErrorFromErrorMap } from '@orpc/contract';
|
2
2
|
export { ContractProcedure, ContractProcedureDef, ContractRouter, ErrorMap, ErrorMapItem, HTTPMethod, HTTPPath, InferSchemaInput, InferSchemaOutput, InputStructure, Meta, OutputStructure, Route, Schema, ValidationError, eventIterator, type } from '@orpc/contract';
|
3
|
-
import { C as Context, b as Procedure, M as Middleware, O as ORPCErrorConstructorMap, c as ContextExtendsGuard, d as MergedCurrentContext, e as MergedInitialContext, f as MapInputMiddleware, g as CreateProcedureClientOptions, h as ProcedureClient, i as AnyMiddleware, L as Lazyable, a as AnyRouter, j as Lazy, A as AnyProcedure, k as ProcedureHandler, R as Router, I as InferRouterInitialContext } from './shared/server.
|
4
|
-
export { K as InferRouterCurrentContexts, J as InferRouterInitialContexts, N as InferRouterInputs, Q as InferRouterOutputs, p as LAZY_SYMBOL, q as LazyMeta, y as MiddlewareNextFn, x as MiddlewareNextFnOptions, B as MiddlewareOptions, z as MiddlewareOutputFn, w as MiddlewareResult, n as ORPCErrorConstructorMapItem, l as ORPCErrorConstructorMapItemOptions, P as ProcedureClientInterceptorOptions, F as ProcedureDef, E as ProcedureHandlerOptions, o as createORPCErrorConstructorMap, H as createProcedureClient, t as getLazyMeta, s as isLazy, G as isProcedure, r as lazy, m as mergeCurrentContext, D as middlewareOutputFn, u as unlazy, v as validateORPCError } from './shared/server.
|
3
|
+
import { C as Context, b as Procedure, M as Middleware, O as ORPCErrorConstructorMap, c as ContextExtendsGuard, d as MergedCurrentContext, e as MergedInitialContext, f as MapInputMiddleware, g as CreateProcedureClientOptions, h as ProcedureClient, i as AnyMiddleware, L as Lazyable, a as AnyRouter, j as Lazy, A as AnyProcedure, k as ProcedureHandler, R as Router, I as InferRouterInitialContext } from './shared/server.BYTulgUc.js';
|
4
|
+
export { K as InferRouterCurrentContexts, J as InferRouterInitialContexts, N as InferRouterInputs, Q as InferRouterOutputs, p as LAZY_SYMBOL, q as LazyMeta, y as MiddlewareNextFn, x as MiddlewareNextFnOptions, B as MiddlewareOptions, z as MiddlewareOutputFn, w as MiddlewareResult, n as ORPCErrorConstructorMapItem, l as ORPCErrorConstructorMapItemOptions, P as ProcedureClientInterceptorOptions, F as ProcedureDef, E as ProcedureHandlerOptions, o as createORPCErrorConstructorMap, H as createProcedureClient, t as getLazyMeta, s as isLazy, G as isProcedure, r as lazy, m as mergeCurrentContext, D as middlewareOutputFn, u as unlazy, v as validateORPCError } from './shared/server.BYTulgUc.js';
|
5
5
|
import { ClientContext, ClientRest, ClientPromiseResult } from '@orpc/client';
|
6
6
|
export { ORPCError, isDefinedError, safe } from '@orpc/client';
|
7
7
|
import { MaybeOptionalOptions } from '@orpc/shared';
|
@@ -151,18 +151,18 @@ declare class Builder<TInitialContext extends Context, TCurrentContext extends C
|
|
151
151
|
/**
|
152
152
|
* Reset initial context
|
153
153
|
*/
|
154
|
-
$context<U extends Context>(): Builder<U, U, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
154
|
+
$context<U extends Context>(): Builder<U & Record<never, never>, U, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
155
155
|
/**
|
156
156
|
* Reset initial meta
|
157
157
|
*/
|
158
|
-
$meta<U extends Meta>(initialMeta: U): Builder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, U
|
158
|
+
$meta<U extends Meta>(initialMeta: U): Builder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, U & Record<never, never>>;
|
159
159
|
/**
|
160
160
|
* Reset initial route
|
161
161
|
*/
|
162
162
|
$route(initialRoute: Route): Builder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
163
163
|
$input<U extends AnySchema>(initialInputSchema?: U): Builder<TInitialContext, TCurrentContext, U, TOutputSchema, TErrorMap, TMeta>;
|
164
164
|
middleware<UOutContext extends Context, TInput, TOutput = any>(// = any here is important to make middleware can be used in any output by default
|
165
|
-
middleware: Middleware<
|
165
|
+
middleware: Middleware<TInitialContext, UOutContext, TInput, TOutput, ORPCErrorConstructorMap<TErrorMap>, TMeta>): DecoratedMiddleware<TInitialContext, UOutContext, TInput, TOutput, ORPCErrorConstructorMap<any>, TMeta>;
|
166
166
|
errors<U extends ErrorMap>(errors: U): Builder<TInitialContext, TCurrentContext, TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U>, TMeta>;
|
167
167
|
use<UOutContext extends Context, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<TErrorMap>, TMeta>): ContextExtendsGuard<TCurrentContext, UInContext> & BuilderWithMiddlewares<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
168
168
|
use<UOutContext extends Context, UInput, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext, UOutContext, UInput, unknown, ORPCErrorConstructorMap<TErrorMap>, TMeta>, mapInput: MapInputMiddleware<unknown, UInput>): ContextExtendsGuard<TCurrentContext, UInContext> & BuilderWithMiddlewares<MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>, TInputSchema, TOutputSchema, TErrorMap, TMeta>;
|
@@ -225,7 +225,7 @@ type ImplementerInternalWithMiddlewares<TContract extends AnyContractRouter, TIn
|
|
225
225
|
|
226
226
|
interface RouterImplementer<T extends AnyContractRouter, TInitialContext extends Context, TCurrentContext extends Context> {
|
227
227
|
middleware<UOutContext extends Context, TInput, TOutput = any>(// = any here is important to make middleware can be used in any output by default
|
228
|
-
middleware: Middleware<
|
228
|
+
middleware: Middleware<TInitialContext, UOutContext, TInput, TOutput, ORPCErrorConstructorMap<InferContractRouterErrorMap<T>>, InferContractRouterMeta<T>>): DecoratedMiddleware<TInitialContext, UOutContext, TInput, TOutput, ORPCErrorConstructorMap<any>, InferContractRouterMeta<T>>;
|
229
229
|
use<UOutContext extends Context, UInContext extends Context = TCurrentContext>(middleware: Middleware<UInContext, UOutContext, unknown, unknown, ORPCErrorConstructorMap<InferContractRouterErrorMap<T>>, InferContractRouterMeta<T>>): ContextExtendsGuard<TCurrentContext, UInContext> & ImplementerInternalWithMiddlewares<T, MergedInitialContext<TInitialContext, UInContext, TCurrentContext>, MergedCurrentContext<TCurrentContext, UOutContext>>;
|
230
230
|
router<U extends Router<T, TCurrentContext>>(router: U): EnhancedRouter<U, TInitialContext, TCurrentContext, Record<never, never>>;
|
231
231
|
lazy<U extends Router<T, TCurrentContext>>(loader: () => Promise<{
|
@@ -237,10 +237,10 @@ type ImplementerInternal<TContract extends AnyContractRouter, TInitialContext ex
|
|
237
237
|
});
|
238
238
|
declare function implementerInternal<T extends AnyContractRouter, TInitialContext extends Context, TCurrentContext extends Context>(contract: T, config: BuilderConfig, middlewares: AnyMiddleware[]): ImplementerInternal<T, TInitialContext, TCurrentContext>;
|
239
239
|
type Implementer<TContract extends AnyContractRouter, TInitialContext extends Context, TCurrentContext extends Context> = {
|
240
|
-
$context<U extends Context>(): Implementer<TContract, U, U>;
|
240
|
+
$context<U extends Context>(): Implementer<TContract, U & Record<never, never>, U>;
|
241
241
|
$config(config: BuilderConfig): Implementer<TContract, TInitialContext, TCurrentContext>;
|
242
242
|
} & ImplementerInternal<TContract, TInitialContext, TCurrentContext>;
|
243
|
-
declare function implement<
|
243
|
+
declare function implement<T extends AnyContractRouter, TContext extends Context = Record<never, never>>(contract: T, config?: BuilderConfig): Implementer<T, TContext, TContext>;
|
244
244
|
|
245
245
|
declare function isStartWithMiddlewares(middlewares: readonly AnyMiddleware[], compare: readonly AnyMiddleware[]): boolean;
|
246
246
|
declare function mergeMiddlewares(first: readonly AnyMiddleware[], second: readonly AnyMiddleware[], options: {
|
package/dist/index.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { mergeErrorMap, mergeMeta, mergeRoute, mergePrefix, mergeTags, isContractProcedure, getContractRouter } from '@orpc/contract';
|
2
2
|
export { ValidationError, eventIterator, type } from '@orpc/contract';
|
3
|
-
import { P as Procedure, d as addMiddleware, c as createProcedureClient, e as enhanceRouter, l as lazy, s as setHiddenRouterContract, i as isProcedure, f as isLazy, h as createAssertedLazyProcedure, g as getRouter } from './shared/server.
|
4
|
-
export { L as LAZY_SYMBOL,
|
3
|
+
import { P as Procedure, d as addMiddleware, c as createProcedureClient, e as enhanceRouter, l as lazy, s as setHiddenRouterContract, i as isProcedure, f as isLazy, h as createAssertedLazyProcedure, g as getRouter } from './shared/server.BtxZnWJ9.mjs';
|
4
|
+
export { L as LAZY_SYMBOL, q as call, w as createAccessibleLazyRouter, b as createContractedProcedure, j as createORPCErrorConstructorMap, r as getHiddenRouterContract, k as getLazyMeta, o as isStartWithMiddlewares, m as mergeCurrentContext, p as mergeMiddlewares, n as middlewareOutputFn, x as resolveContractProcedures, a as toHttpPath, t as traverseContractProcedures, u as unlazy, y as unlazyRouter, v as validateORPCError } from './shared/server.BtxZnWJ9.mjs';
|
5
5
|
export { ORPCError, isDefinedError, safe } from '@orpc/client';
|
6
6
|
export { onError, onFinish, onStart, onSuccess } from '@orpc/shared';
|
7
7
|
export { getEventMeta, withEventMeta } from '@orpc/standard-server';
|
@@ -223,10 +223,6 @@ const os = new Builder({
|
|
223
223
|
dedupeLeadingMiddlewares: true
|
224
224
|
});
|
225
225
|
|
226
|
-
function mergeCurrentContext(context, other) {
|
227
|
-
return { ...context, ...other };
|
228
|
-
}
|
229
|
-
|
230
226
|
function implementerInternal(contract, config, middlewares) {
|
231
227
|
if (isContractProcedure(contract)) {
|
232
228
|
const impl2 = new Builder({
|
@@ -343,4 +339,4 @@ function createRouterClient(router, ...[options]) {
|
|
343
339
|
return recursive;
|
344
340
|
}
|
345
341
|
|
346
|
-
export { Builder, DecoratedProcedure, Procedure, addMiddleware, createAssertedLazyProcedure, createProcedureClient, createRouterClient, decorateMiddleware, enhanceRouter, fallbackConfig, getRouter, implement, implementerInternal, isLazy, isProcedure, lazy,
|
342
|
+
export { Builder, DecoratedProcedure, Procedure, addMiddleware, createAssertedLazyProcedure, createProcedureClient, createRouterClient, decorateMiddleware, enhanceRouter, fallbackConfig, getRouter, implement, implementerInternal, isLazy, isProcedure, lazy, os, setHiddenRouterContract };
|
package/dist/plugins/index.d.mts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { b as StandardHandlerInterceptorOptions, H as HandlerPlugin, a as StandardHandlerOptions } from '../shared/server.
|
2
|
-
export { C as CompositePlugin } from '../shared/server.
|
1
|
+
import { b as StandardHandlerInterceptorOptions, H as HandlerPlugin, a as StandardHandlerOptions } from '../shared/server.BeJithK4.mjs';
|
2
|
+
export { C as CompositePlugin } from '../shared/server.BeJithK4.mjs';
|
3
3
|
import { Value } from '@orpc/shared';
|
4
|
-
import { C as Context } from '../shared/server.
|
4
|
+
import { C as Context } from '../shared/server.BYTulgUc.mjs';
|
5
5
|
import '@orpc/contract';
|
6
6
|
import '@orpc/standard-server';
|
7
7
|
import '@orpc/client';
|
package/dist/plugins/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { b as StandardHandlerInterceptorOptions, H as HandlerPlugin, a as StandardHandlerOptions } from '../shared/server.
|
2
|
-
export { C as CompositePlugin } from '../shared/server.
|
1
|
+
import { b as StandardHandlerInterceptorOptions, H as HandlerPlugin, a as StandardHandlerOptions } from '../shared/server.B3Tm0IXY.js';
|
2
|
+
export { C as CompositePlugin } from '../shared/server.B3Tm0IXY.js';
|
3
3
|
import { Value } from '@orpc/shared';
|
4
|
-
import { C as Context } from '../shared/server.
|
4
|
+
import { C as Context } from '../shared/server.BYTulgUc.js';
|
5
5
|
import '@orpc/contract';
|
6
6
|
import '@orpc/standard-server';
|
7
7
|
import '@orpc/client';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { HTTPPath, AnySchema, Meta, InferSchemaOutput, ErrorFromErrorMap } from '@orpc/contract';
|
2
2
|
import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
|
3
3
|
import { StandardResponse, StandardLazyRequest } from '@orpc/standard-server';
|
4
|
-
import { a as AnyRouter, A as AnyProcedure, C as Context, P as ProcedureClientInterceptorOptions, R as Router } from './server.
|
4
|
+
import { a as AnyRouter, A as AnyProcedure, C as Context, P as ProcedureClientInterceptorOptions, R as Router } from './server.BYTulgUc.js';
|
5
5
|
import { ORPCError } from '@orpc/client';
|
6
6
|
|
7
7
|
type StandardParams = Record<string, string>;
|
@@ -6,7 +6,7 @@ type Context = Record<string, any>;
|
|
6
6
|
type MergedInitialContext<TInitial extends Context, TAdditional extends Context, TCurrent extends Context> = TInitial & Omit<TAdditional, keyof TCurrent>;
|
7
7
|
type MergedCurrentContext<T extends Context, U extends Context> = Omit<T, keyof U> & U;
|
8
8
|
declare function mergeCurrentContext<T extends Context, U extends Context>(context: T, other: U): MergedCurrentContext<T, U>;
|
9
|
-
type ContextExtendsGuard<T extends Context, U extends Context> = T extends
|
9
|
+
type ContextExtendsGuard<T extends Context, U extends Context> = T extends U ? unknown : never;
|
10
10
|
|
11
11
|
type ORPCErrorConstructorMapItemOptions<TData> = Omit<ORPCErrorOptions<TData>, 'defined' | 'status'>;
|
12
12
|
type ORPCErrorConstructorMapItem<TCode extends ORPCErrorCode, TInData> = (...rest: MaybeOptionalOptions<ORPCErrorConstructorMapItemOptions<TInData>>) => ORPCError<TCode, TInData>;
|
@@ -6,7 +6,7 @@ type Context = Record<string, any>;
|
|
6
6
|
type MergedInitialContext<TInitial extends Context, TAdditional extends Context, TCurrent extends Context> = TInitial & Omit<TAdditional, keyof TCurrent>;
|
7
7
|
type MergedCurrentContext<T extends Context, U extends Context> = Omit<T, keyof U> & U;
|
8
8
|
declare function mergeCurrentContext<T extends Context, U extends Context>(context: T, other: U): MergedCurrentContext<T, U>;
|
9
|
-
type ContextExtendsGuard<T extends Context, U extends Context> = T extends
|
9
|
+
type ContextExtendsGuard<T extends Context, U extends Context> = T extends U ? unknown : never;
|
10
10
|
|
11
11
|
type ORPCErrorConstructorMapItemOptions<TData> = Omit<ORPCErrorOptions<TData>, 'defined' | 'status'>;
|
12
12
|
type ORPCErrorConstructorMapItem<TCode extends ORPCErrorCode, TInData> = (...rest: MaybeOptionalOptions<ORPCErrorConstructorMapItemOptions<TInData>>) => ORPCError<TCode, TInData>;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { HTTPPath, AnySchema, Meta, InferSchemaOutput, ErrorFromErrorMap } from '@orpc/contract';
|
2
2
|
import { Interceptor, MaybeOptionalOptions } from '@orpc/shared';
|
3
3
|
import { StandardResponse, StandardLazyRequest } from '@orpc/standard-server';
|
4
|
-
import { a as AnyRouter, A as AnyProcedure, C as Context, P as ProcedureClientInterceptorOptions, R as Router } from './server.
|
4
|
+
import { a as AnyRouter, A as AnyProcedure, C as Context, P as ProcedureClientInterceptorOptions, R as Router } from './server.BYTulgUc.mjs';
|
5
5
|
import { ORPCError } from '@orpc/client';
|
6
6
|
|
7
7
|
type StandardParams = Record<string, string>;
|
@@ -58,6 +58,10 @@ function isProcedure(item) {
|
|
58
58
|
return isContractProcedure(item) && "middlewares" in item["~orpc"] && "inputValidationIndex" in item["~orpc"] && "outputValidationIndex" in item["~orpc"] && "handler" in item["~orpc"];
|
59
59
|
}
|
60
60
|
|
61
|
+
function mergeCurrentContext(context, other) {
|
62
|
+
return { ...context, ...other };
|
63
|
+
}
|
64
|
+
|
61
65
|
function createORPCErrorConstructorMap(errors) {
|
62
66
|
const proxy = new Proxy(errors, {
|
63
67
|
get(target, code) {
|
@@ -170,23 +174,30 @@ async function executeProcedureInternal(procedure, options) {
|
|
170
174
|
let currentInput = options.input;
|
171
175
|
const next = async (...[nextOptions]) => {
|
172
176
|
const index = currentIndex;
|
177
|
+
const midContext = nextOptions?.context ?? {};
|
173
178
|
currentIndex += 1;
|
174
|
-
currentContext =
|
179
|
+
currentContext = mergeCurrentContext(currentContext, midContext);
|
175
180
|
if (index === inputValidationIndex) {
|
176
181
|
currentInput = await validateInput(procedure, currentInput);
|
177
182
|
}
|
178
183
|
const mid = middlewares[index];
|
179
|
-
const result = mid ?
|
184
|
+
const result = mid ? {
|
185
|
+
context: midContext,
|
186
|
+
output: (await mid({ ...options, context: currentContext, next }, currentInput, middlewareOutputFn)).output
|
187
|
+
} : {
|
188
|
+
context: midContext,
|
189
|
+
output: await procedure["~orpc"].handler({ ...options, context: currentContext, input: currentInput })
|
190
|
+
};
|
180
191
|
if (index === outputValidationIndex) {
|
181
192
|
const validatedOutput = await validateOutput(procedure, result.output);
|
182
193
|
return {
|
183
|
-
|
194
|
+
context: result.context,
|
184
195
|
output: validatedOutput
|
185
196
|
};
|
186
197
|
}
|
187
198
|
return result;
|
188
199
|
};
|
189
|
-
return (await next(
|
200
|
+
return (await next()).output;
|
190
201
|
}
|
191
202
|
|
192
203
|
const HIDDEN_ROUTER_CONTRACT_SYMBOL = Symbol("ORPC_HIDDEN_ROUTER_CONTRACT");
|
@@ -360,4 +371,4 @@ function toHttpPath(path) {
|
|
360
371
|
return `/${path.map(encodeURIComponent).join("/")}`;
|
361
372
|
}
|
362
373
|
|
363
|
-
export { LAZY_SYMBOL as L, Procedure as P, toHttpPath as a, createContractedProcedure as b, createProcedureClient as c, addMiddleware as d, enhanceRouter as e, isLazy as f, getRouter as g, createAssertedLazyProcedure as h, isProcedure as i, createORPCErrorConstructorMap as j, getLazyMeta as k, lazy as l,
|
374
|
+
export { LAZY_SYMBOL as L, Procedure as P, toHttpPath as a, createContractedProcedure as b, createProcedureClient as c, addMiddleware as d, enhanceRouter as e, isLazy as f, getRouter as g, createAssertedLazyProcedure as h, isProcedure as i, createORPCErrorConstructorMap as j, getLazyMeta as k, lazy as l, mergeCurrentContext as m, middlewareOutputFn as n, isStartWithMiddlewares as o, mergeMiddlewares as p, call as q, getHiddenRouterContract as r, setHiddenRouterContract as s, traverseContractProcedures as t, unlazy as u, validateORPCError as v, createAccessibleLazyRouter as w, resolveContractProcedures as x, unlazyRouter as y };
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { StandardRPCJsonSerializerOptions } from '@orpc/client/standard';
|
2
|
-
import { C as Context } from './server.
|
3
|
-
import { a as StandardHandlerOptions } from './server.
|
2
|
+
import { C as Context } from './server.BYTulgUc.mjs';
|
3
|
+
import { a as StandardHandlerOptions } from './server.BeJithK4.mjs';
|
4
4
|
|
5
5
|
interface StandardRPCHandlerOptions<T extends Context> extends StandardHandlerOptions<T>, StandardRPCJsonSerializerOptions {
|
6
6
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { StandardRPCJsonSerializer, StandardRPCSerializer } from '@orpc/client/standard';
|
2
2
|
import { toStandardLazyRequest, toFetchResponse } from '@orpc/standard-server-fetch';
|
3
|
-
import { S as StandardHandler, b as StandardRPCMatcher, a as StandardRPCCodec } from './server.
|
3
|
+
import { S as StandardHandler, b as StandardRPCMatcher, a as StandardRPCCodec } from './server.jG7ZuX3S.mjs';
|
4
4
|
|
5
5
|
class RPCHandler {
|
6
6
|
standardHandler;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { StandardRPCJsonSerializerOptions } from '@orpc/client/standard';
|
2
|
-
import { C as Context } from './server.
|
3
|
-
import { a as StandardHandlerOptions } from './server.
|
2
|
+
import { C as Context } from './server.BYTulgUc.js';
|
3
|
+
import { a as StandardHandlerOptions } from './server.B3Tm0IXY.js';
|
4
4
|
|
5
5
|
interface StandardRPCHandlerOptions<T extends Context> extends StandardHandlerOptions<T>, StandardRPCJsonSerializerOptions {
|
6
6
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ORPCError, toORPCError } from '@orpc/client';
|
2
2
|
import { intercept, trim, parseEmptyableJSON } from '@orpc/shared';
|
3
3
|
import { C as CompositePlugin } from './server.Q6ZmnTgO.mjs';
|
4
|
-
import { c as createProcedureClient, t as traverseContractProcedures, a as toHttpPath, i as isProcedure, u as unlazy, g as getRouter, b as createContractedProcedure } from './server.
|
4
|
+
import { c as createProcedureClient, t as traverseContractProcedures, a as toHttpPath, i as isProcedure, u as unlazy, g as getRouter, b as createContractedProcedure } from './server.BtxZnWJ9.mjs';
|
5
5
|
|
6
6
|
class StandardHandler {
|
7
7
|
constructor(router, matcher, codec, options) {
|
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.33ca37d",
|
5
5
|
"license": "MIT",
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
7
7
|
"repository": {
|
@@ -58,12 +58,12 @@
|
|
58
58
|
"next": ">=14.0.0"
|
59
59
|
},
|
60
60
|
"dependencies": {
|
61
|
-
"@orpc/
|
62
|
-
"@orpc/
|
63
|
-
"@orpc/shared": "0.0.0-next.
|
64
|
-
"@orpc/standard-server": "0.0.0-next.
|
65
|
-
"@orpc/standard-server-fetch": "0.0.0-next.
|
66
|
-
"@orpc/standard-server-node": "0.0.0-next.
|
61
|
+
"@orpc/contract": "0.0.0-next.33ca37d",
|
62
|
+
"@orpc/client": "0.0.0-next.33ca37d",
|
63
|
+
"@orpc/shared": "0.0.0-next.33ca37d",
|
64
|
+
"@orpc/standard-server": "0.0.0-next.33ca37d",
|
65
|
+
"@orpc/standard-server-fetch": "0.0.0-next.33ca37d",
|
66
|
+
"@orpc/standard-server-node": "0.0.0-next.33ca37d"
|
67
67
|
},
|
68
68
|
"devDependencies": {
|
69
69
|
"light-my-request": "^6.5.1"
|