@orpc/server 2.0.0-beta.2 → 2.0.0-beta.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.
|
@@ -53,9 +53,9 @@ interface FetchHandlerFetchInterceptorOptions<T extends Context> extends Standar
|
|
|
53
53
|
type FetchHandlerFetchInterceptor<T extends Context> = Interceptor<FetchHandlerFetchInterceptorOptions<T>, Promise<FetchHandlerHandleResult>>;
|
|
54
54
|
interface FetchHandlerOptions<T extends Context> {
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Options for how to convert the Fetch Response to a Standard Response, like event iterator options, etc.
|
|
57
57
|
*/
|
|
58
|
-
toFetchResponse?: ToFetchResponseOptions;
|
|
58
|
+
toFetchResponse?: undefined | ToFetchResponseOptions;
|
|
59
59
|
/**
|
|
60
60
|
* Interceptors that run before the mapping between the Standard API and Fetch API,
|
|
61
61
|
* useful for customizing the mapping behavior (e.g. extending the body parser).
|
|
@@ -53,9 +53,9 @@ interface FetchHandlerFetchInterceptorOptions<T extends Context> extends Standar
|
|
|
53
53
|
type FetchHandlerFetchInterceptor<T extends Context> = Interceptor<FetchHandlerFetchInterceptorOptions<T>, Promise<FetchHandlerHandleResult>>;
|
|
54
54
|
interface FetchHandlerOptions<T extends Context> {
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Options for how to convert the Fetch Response to a Standard Response, like event iterator options, etc.
|
|
57
57
|
*/
|
|
58
|
-
toFetchResponse?: ToFetchResponseOptions;
|
|
58
|
+
toFetchResponse?: undefined | ToFetchResponseOptions;
|
|
59
59
|
/**
|
|
60
60
|
* Interceptors that run before the mapping between the Standard API and Fetch API,
|
|
61
61
|
* useful for customizing the mapping behavior (e.g. extending the body parser).
|
|
@@ -2,9 +2,9 @@ import { b as StandardHandlerHandleOptions } from '../../shared/server.BB_Ik9Ph.
|
|
|
2
2
|
export { C as CompositeStandardHandlerPlugin, O as OtelHandlerPlugin, S as StandardHandler, c as StandardHandlerCodec, d as StandardHandlerCodecResolvedProcedure, g as StandardHandlerHandleResult, h as StandardHandlerInterceptor, i as StandardHandlerInterceptorOptions, a as StandardHandlerOptions, e as StandardHandlerPlugin, j as StandardHandlerRoutingInterceptor, f as StandardHandlerRoutingInterceptorOptions } from '../../shared/server.BB_Ik9Ph.mjs';
|
|
3
3
|
export { a as RPCHandlerCodec, R as RPCHandlerCodecOptions, b as RPCMatcher, c as RPCMatcherOptions } from '../../shared/server.B_U9y00a.mjs';
|
|
4
4
|
import { C as Context } from '../../shared/server.BL22TloH.mjs';
|
|
5
|
+
export { StandardBody, StandardBodyHint, StandardHeaders, StandardLazyRequest, StandardLazyResponse, StandardMethod, StandardRequest, StandardResponse, StandardUrl } from '@standardserver/core';
|
|
5
6
|
import '@orpc/client';
|
|
6
7
|
import '@orpc/shared';
|
|
7
|
-
import '@standardserver/core';
|
|
8
8
|
import '@orpc/contract';
|
|
9
9
|
import '../../shared/server.BsNNjG5J.mjs';
|
|
10
10
|
|
|
@@ -2,9 +2,9 @@ import { b as StandardHandlerHandleOptions } from '../../shared/server.EOHJ3NJr.
|
|
|
2
2
|
export { C as CompositeStandardHandlerPlugin, O as OtelHandlerPlugin, S as StandardHandler, c as StandardHandlerCodec, d as StandardHandlerCodecResolvedProcedure, g as StandardHandlerHandleResult, h as StandardHandlerInterceptor, i as StandardHandlerInterceptorOptions, a as StandardHandlerOptions, e as StandardHandlerPlugin, j as StandardHandlerRoutingInterceptor, f as StandardHandlerRoutingInterceptorOptions } from '../../shared/server.EOHJ3NJr.js';
|
|
3
3
|
export { a as RPCHandlerCodec, R as RPCHandlerCodecOptions, b as RPCMatcher, c as RPCMatcherOptions } from '../../shared/server.T9F3bzZx.js';
|
|
4
4
|
import { C as Context } from '../../shared/server.BL22TloH.js';
|
|
5
|
+
export { StandardBody, StandardBodyHint, StandardHeaders, StandardLazyRequest, StandardLazyResponse, StandardMethod, StandardRequest, StandardResponse, StandardUrl } from '@standardserver/core';
|
|
5
6
|
import '@orpc/client';
|
|
6
7
|
import '@orpc/shared';
|
|
7
|
-
import '@standardserver/core';
|
|
8
8
|
import '@orpc/contract';
|
|
9
9
|
import '../../shared/server.Pa0F03f_.js';
|
|
10
10
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { AnyORPCError, ClientOptions, ClientContext } from '@orpc/client';
|
|
2
|
-
export { AnyORPCError, AnyORPCErrorJSON, COMMON_ERROR_STATUS_MAP, ORPCError, ORPCErrorCode, ORPCErrorJSON, ORPCErrorOptions, RPCJsonSerialization, RPCJsonSerializationMeta, RPCJsonSerializer, RPCJsonSerializerHandler, RPCJsonSerializerOptions, RPCSerializer, RPCSerializerOptions, RPCSerializerSerializeOptions, cloneORPCError, isDefinedError, isInferableError, safe, toORPCError } from '@orpc/client';
|
|
2
|
+
export { AnyORPCError, AnyORPCErrorJSON, COMMON_ERROR_STATUS_MAP, Client, ClientContext, ClientOptions, ClientRest, FriendlyClientOptions, ORPCError, ORPCErrorCode, ORPCErrorJSON, ORPCErrorOptions, RPCJsonSerialization, RPCJsonSerializationMeta, RPCJsonSerializer, RPCJsonSerializerHandler, RPCJsonSerializerOptions, RPCSerializer, RPCSerializerOptions, RPCSerializerSerializeOptions, SafeResult, cloneORPCError, isDefinedError, isInferableError, safe, toORPCError } from '@orpc/client';
|
|
3
3
|
import { ErrorMap, MergedErrorMap, AnySchema, MetaPlugin, InferSchemaOutput, InferSchemaInput, AugmentContractRouterOptions, RouterContract, AnyProcedureContract, InitialInputSchema, InitialOutputSchema, MergedSchema, Schema, ProcedureContractDefinition, ProcedureContract, InferRouterContractErrorMap, ORPCErrorFromErrorMap } from '@orpc/contract';
|
|
4
4
|
export { AnyMetaPlugin, AnySchema, ErrorMap, ErrorMapItem, InferSchemaInput, InferSchemaOutput, MergedErrorMap, Meta, MetaPlugin, MetaPluginDefinition, ORPCErrorFromErrorMap, ProcedureContract, ProcedureContractDefinition, RouterContract, Schema, ValidationError, defineMeta, eventIterator, reconcileORPCError, type } from '@orpc/contract';
|
|
5
5
|
import { IntersectPick, Promisable, Public, PromiseWithError, ThrowableError, MaybeOptionalOptions } from '@orpc/shared';
|
|
6
|
-
export { AsyncCleanupFn, AsyncIteratorClass, AsyncIteratorClassNextFn, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
6
|
+
export { AsyncCleanupFn, AsyncIteratorClass, AsyncIteratorClassNextFn, MaybeOptionalOptions, PromiseWithError, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
7
7
|
import { C as Context, d as Middleware, M as MergedContext, e as MergedInitialContext, a as Procedure, f as AnyMiddleware, g as Lazy, A as AnyProcedure, L as Lazyable, h as ProcedureHandler, O as ORPCErrorConstructorMap, i as OrderedMiddleware, P as ProcedureClientOptions, b as ProcedureClient } from './shared/server.BL22TloH.mjs';
|
|
8
8
|
export { j as LazyDefinition, k as MiddlewareDefinition, l as MiddlewareDone, m as MiddlewareDoneOptions, n as MiddlewareNext, o as MiddlewareNextOptions, p as MiddlewareOptions, q as MiddlewareResult, r as ORPCErrorConstructorMapItem, s as ORPCErrorConstructorMapItemOptions, c as ProcedureClientInterceptor, t as ProcedureClientInterceptorOptions, u as ProcedureDefinition, v as ProcedureHandlerOptions, w as createORPCErrorConstructorMap, x as createProcedureClient, y as unlazy } from './shared/server.BL22TloH.mjs';
|
|
9
9
|
import { A as AnyRouter, R as Router, C as ContractedRouter, I as InferRouterInitialContext } from './shared/server.BsNNjG5J.mjs';
|
|
10
10
|
export { a as InferRouterError, b as InferRouterErrors, c as InferRouterFinalContexts, d as InferRouterInitialContexts, e as InferRouterInputs, f as InferRouterOutputs } from './shared/server.BsNNjG5J.mjs';
|
|
11
|
-
export { ErrorEvent, getEventMeta, unwrapEvent, withEventMeta } from '@standardserver/core';
|
|
11
|
+
export { ErrorEvent, EventMeta, getEventMeta, unwrapEvent, withEventMeta } from '@standardserver/core';
|
|
12
12
|
|
|
13
13
|
interface DecoratedMiddleware<TInContext extends Context, TOutContext extends Context, TInput, TOutput, TErrorMap extends ErrorMap> extends Middleware<TInContext, TOutContext, TInput, TOutput, TErrorMap> {
|
|
14
14
|
adaptInput<T>(adapt: (input: T) => TInput): DecoratedMiddleware<TInContext, TOutContext, T, TOutput, TErrorMap>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { AnyORPCError, ClientOptions, ClientContext } from '@orpc/client';
|
|
2
|
-
export { AnyORPCError, AnyORPCErrorJSON, COMMON_ERROR_STATUS_MAP, ORPCError, ORPCErrorCode, ORPCErrorJSON, ORPCErrorOptions, RPCJsonSerialization, RPCJsonSerializationMeta, RPCJsonSerializer, RPCJsonSerializerHandler, RPCJsonSerializerOptions, RPCSerializer, RPCSerializerOptions, RPCSerializerSerializeOptions, cloneORPCError, isDefinedError, isInferableError, safe, toORPCError } from '@orpc/client';
|
|
2
|
+
export { AnyORPCError, AnyORPCErrorJSON, COMMON_ERROR_STATUS_MAP, Client, ClientContext, ClientOptions, ClientRest, FriendlyClientOptions, ORPCError, ORPCErrorCode, ORPCErrorJSON, ORPCErrorOptions, RPCJsonSerialization, RPCJsonSerializationMeta, RPCJsonSerializer, RPCJsonSerializerHandler, RPCJsonSerializerOptions, RPCSerializer, RPCSerializerOptions, RPCSerializerSerializeOptions, SafeResult, cloneORPCError, isDefinedError, isInferableError, safe, toORPCError } from '@orpc/client';
|
|
3
3
|
import { ErrorMap, MergedErrorMap, AnySchema, MetaPlugin, InferSchemaOutput, InferSchemaInput, AugmentContractRouterOptions, RouterContract, AnyProcedureContract, InitialInputSchema, InitialOutputSchema, MergedSchema, Schema, ProcedureContractDefinition, ProcedureContract, InferRouterContractErrorMap, ORPCErrorFromErrorMap } from '@orpc/contract';
|
|
4
4
|
export { AnyMetaPlugin, AnySchema, ErrorMap, ErrorMapItem, InferSchemaInput, InferSchemaOutput, MergedErrorMap, Meta, MetaPlugin, MetaPluginDefinition, ORPCErrorFromErrorMap, ProcedureContract, ProcedureContractDefinition, RouterContract, Schema, ValidationError, defineMeta, eventIterator, reconcileORPCError, type } from '@orpc/contract';
|
|
5
5
|
import { IntersectPick, Promisable, Public, PromiseWithError, ThrowableError, MaybeOptionalOptions } from '@orpc/shared';
|
|
6
|
-
export { AsyncCleanupFn, AsyncIteratorClass, AsyncIteratorClassNextFn, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
6
|
+
export { AsyncCleanupFn, AsyncIteratorClass, AsyncIteratorClassNextFn, MaybeOptionalOptions, PromiseWithError, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, asyncIteratorToUnproxiedDataStream as eventIteratorToUnproxiedDataStream, onError, onFinish, onStart, onSuccess, streamToAsyncIteratorClass as streamToEventIterator } from '@orpc/shared';
|
|
7
7
|
import { C as Context, d as Middleware, M as MergedContext, e as MergedInitialContext, a as Procedure, f as AnyMiddleware, g as Lazy, A as AnyProcedure, L as Lazyable, h as ProcedureHandler, O as ORPCErrorConstructorMap, i as OrderedMiddleware, P as ProcedureClientOptions, b as ProcedureClient } from './shared/server.BL22TloH.js';
|
|
8
8
|
export { j as LazyDefinition, k as MiddlewareDefinition, l as MiddlewareDone, m as MiddlewareDoneOptions, n as MiddlewareNext, o as MiddlewareNextOptions, p as MiddlewareOptions, q as MiddlewareResult, r as ORPCErrorConstructorMapItem, s as ORPCErrorConstructorMapItemOptions, c as ProcedureClientInterceptor, t as ProcedureClientInterceptorOptions, u as ProcedureDefinition, v as ProcedureHandlerOptions, w as createORPCErrorConstructorMap, x as createProcedureClient, y as unlazy } from './shared/server.BL22TloH.js';
|
|
9
9
|
import { A as AnyRouter, R as Router, C as ContractedRouter, I as InferRouterInitialContext } from './shared/server.Pa0F03f_.js';
|
|
10
10
|
export { a as InferRouterError, b as InferRouterErrors, c as InferRouterFinalContexts, d as InferRouterInitialContexts, e as InferRouterInputs, f as InferRouterOutputs } from './shared/server.Pa0F03f_.js';
|
|
11
|
-
export { ErrorEvent, getEventMeta, unwrapEvent, withEventMeta } from '@standardserver/core';
|
|
11
|
+
export { ErrorEvent, EventMeta, getEventMeta, unwrapEvent, withEventMeta } from '@standardserver/core';
|
|
12
12
|
|
|
13
13
|
interface DecoratedMiddleware<TInContext extends Context, TOutContext extends Context, TInput, TOutput, TErrorMap extends ErrorMap> extends Middleware<TInContext, TOutContext, TInput, TOutput, TErrorMap> {
|
|
14
14
|
adaptInput<T>(adapt: (input: T) => TInput): DecoratedMiddleware<TInContext, TOutContext, T, TOutput, TErrorMap>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0.0-beta.
|
|
4
|
+
"version": "2.0.0-beta.3",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.dev",
|
|
7
7
|
"repository": {
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
"@standardserver/node": "^0.0.25",
|
|
91
91
|
"@standardserver/peer": "^0.0.25",
|
|
92
92
|
"cookie": "^1.1.1",
|
|
93
|
-
"@orpc/
|
|
94
|
-
"@orpc/
|
|
95
|
-
"@orpc/
|
|
96
|
-
"@orpc/client": "2.0.0-beta.
|
|
93
|
+
"@orpc/contract": "2.0.0-beta.3",
|
|
94
|
+
"@orpc/interop": "2.0.0-beta.3",
|
|
95
|
+
"@orpc/shared": "2.0.0-beta.3",
|
|
96
|
+
"@orpc/client": "2.0.0-beta.3"
|
|
97
97
|
},
|
|
98
98
|
"devDependencies": {
|
|
99
99
|
"crossws": "^0.4.6",
|