@temporary-name/server 1.9.3-alpha.6a70825f6d8c3dc99b87e4e5b778aea0fa007417 → 1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2
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/aws-lambda/index.d.mts +3 -3
- package/dist/adapters/aws-lambda/index.d.ts +3 -3
- package/dist/adapters/aws-lambda/index.mjs +1 -2
- package/dist/adapters/fetch/index.d.mts +3 -3
- package/dist/adapters/fetch/index.d.ts +3 -3
- package/dist/adapters/fetch/index.mjs +1 -2
- package/dist/adapters/node/index.d.mts +3 -3
- package/dist/adapters/node/index.d.ts +3 -3
- package/dist/adapters/node/index.mjs +1 -2
- package/dist/adapters/standard/index.d.mts +3 -3
- package/dist/adapters/standard/index.d.ts +3 -3
- package/dist/adapters/standard/index.mjs +1 -2
- package/dist/index.d.mts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.mjs +6 -15
- package/dist/openapi/index.mjs +1 -2
- package/dist/plugins/index.d.mts +2 -2
- package/dist/plugins/index.d.ts +2 -2
- package/dist/shared/{server.BCcLYvdF.d.mts → server.BSJugGGA.d.mts} +1 -1
- package/dist/shared/{server.Da-qLzdU.d.ts → server.Bs8EZATl.d.ts} +2 -2
- package/dist/shared/{server.DecvGKtb.d.mts → server.CWWP8ypC.d.mts} +5 -8
- package/dist/shared/{server.DecvGKtb.d.ts → server.CWWP8ypC.d.ts} +5 -8
- package/dist/shared/{server.DWwaAM-a.mjs → server.Cn7WsRHl.mjs} +1 -2
- package/dist/shared/{server.DHezmW6C.d.mts → server.DrMgIiBr.d.mts} +2 -2
- package/dist/shared/{server.CdeqmULw.d.ts → server.EKwDe0d2.d.ts} +1 -1
- package/package.json +10 -10
- package/dist/shared/server.DN9mVGfv.mjs +0 -11
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MaybeOptionalOptions } from '@temporary-name/shared';
|
|
2
2
|
import { SendStandardResponseOptions, APIGatewayProxyEventV2, ResponseStream } from '@temporary-name/standard-server-aws-lambda';
|
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
|
4
|
-
import { b as StandardHandlerOptions } from '../../shared/server.
|
|
5
|
-
import { F as FriendlyStandardHandleOptions } from '../../shared/server.
|
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.CWWP8ypC.mjs';
|
|
4
|
+
import { b as StandardHandlerOptions } from '../../shared/server.BSJugGGA.mjs';
|
|
5
|
+
import { F as FriendlyStandardHandleOptions } from '../../shared/server.DrMgIiBr.mjs';
|
|
6
6
|
import '@temporary-name/contract';
|
|
7
7
|
import '@temporary-name/standard-server';
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MaybeOptionalOptions } from '@temporary-name/shared';
|
|
2
2
|
import { SendStandardResponseOptions, APIGatewayProxyEventV2, ResponseStream } from '@temporary-name/standard-server-aws-lambda';
|
|
3
|
-
import { C as Context, R as Router } from '../../shared/server.
|
|
4
|
-
import { b as StandardHandlerOptions } from '../../shared/server.
|
|
5
|
-
import { F as FriendlyStandardHandleOptions } from '../../shared/server.
|
|
3
|
+
import { C as Context, R as Router } from '../../shared/server.CWWP8ypC.js';
|
|
4
|
+
import { b as StandardHandlerOptions } from '../../shared/server.EKwDe0d2.js';
|
|
5
|
+
import { F as FriendlyStandardHandleOptions } from '../../shared/server.Bs8EZATl.js';
|
|
6
6
|
import '@temporary-name/contract';
|
|
7
7
|
import '@temporary-name/standard-server';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resolveMaybeOptionalOptions } from '@temporary-name/shared';
|
|
2
2
|
import { toStandardLazyRequest, sendStandardResponse } from '@temporary-name/standard-server-aws-lambda';
|
|
3
|
-
import { S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.
|
|
3
|
+
import { S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.Cn7WsRHl.mjs';
|
|
4
4
|
import '@temporary-name/contract';
|
|
5
5
|
import '@temporary-name/standard-server';
|
|
6
6
|
import '@temporary-name/server';
|
|
@@ -8,7 +8,6 @@ import 'rou3';
|
|
|
8
8
|
import '../../shared/server.CHV9AQHl.mjs';
|
|
9
9
|
import '@temporary-name/zod';
|
|
10
10
|
import '../../shared/server.JtIZ8YG7.mjs';
|
|
11
|
-
import '../../shared/server.DN9mVGfv.mjs';
|
|
12
11
|
|
|
13
12
|
class AwsLambdaHandler {
|
|
14
13
|
sendStandardResponseOptions;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Context, R as Router } from '../../shared/server.
|
|
1
|
+
import { C as Context, R as Router } from '../../shared/server.CWWP8ypC.mjs';
|
|
2
2
|
import { Interceptor, MaybeOptionalOptions } from '@temporary-name/shared';
|
|
3
3
|
import { ToFetchResponseOptions } from '@temporary-name/standard-server-fetch';
|
|
4
|
-
import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.
|
|
5
|
-
import { F as FriendlyStandardHandleOptions } from '../../shared/server.
|
|
4
|
+
import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.BSJugGGA.mjs';
|
|
5
|
+
import { F as FriendlyStandardHandleOptions } from '../../shared/server.DrMgIiBr.mjs';
|
|
6
6
|
import '@temporary-name/contract';
|
|
7
7
|
import '@temporary-name/standard-server';
|
|
8
8
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Context, R as Router } from '../../shared/server.
|
|
1
|
+
import { C as Context, R as Router } from '../../shared/server.CWWP8ypC.js';
|
|
2
2
|
import { Interceptor, MaybeOptionalOptions } from '@temporary-name/shared';
|
|
3
3
|
import { ToFetchResponseOptions } from '@temporary-name/standard-server-fetch';
|
|
4
|
-
import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.
|
|
5
|
-
import { F as FriendlyStandardHandleOptions } from '../../shared/server.
|
|
4
|
+
import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.EKwDe0d2.js';
|
|
5
|
+
import { F as FriendlyStandardHandleOptions } from '../../shared/server.Bs8EZATl.js';
|
|
6
6
|
import '@temporary-name/contract';
|
|
7
7
|
import '@temporary-name/standard-server';
|
|
8
8
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ORPCError, toArray, intercept, resolveMaybeOptionalOptions } from '@temporary-name/shared';
|
|
2
2
|
import { toStandardLazyRequest, toFetchResponse } from '@temporary-name/standard-server-fetch';
|
|
3
|
-
import { C as CompositeStandardHandlerPlugin, S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.
|
|
3
|
+
import { C as CompositeStandardHandlerPlugin, S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.Cn7WsRHl.mjs';
|
|
4
4
|
import '@temporary-name/contract';
|
|
5
5
|
import '@temporary-name/standard-server';
|
|
6
6
|
import '@temporary-name/server';
|
|
@@ -8,7 +8,6 @@ import 'rou3';
|
|
|
8
8
|
import '@temporary-name/zod';
|
|
9
9
|
import '../../shared/server.CHV9AQHl.mjs';
|
|
10
10
|
import '../../shared/server.JtIZ8YG7.mjs';
|
|
11
|
-
import '../../shared/server.DN9mVGfv.mjs';
|
|
12
11
|
|
|
13
12
|
class BodyLimitPlugin {
|
|
14
13
|
maxBodySize;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Context, R as Router } from '../../shared/server.
|
|
1
|
+
import { C as Context, R as Router } from '../../shared/server.CWWP8ypC.mjs';
|
|
2
2
|
import { Interceptor, MaybeOptionalOptions } from '@temporary-name/shared';
|
|
3
3
|
import { SendStandardResponseOptions, NodeHttpRequest, NodeHttpResponse } from '@temporary-name/standard-server-node';
|
|
4
|
-
import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.
|
|
5
|
-
import { F as FriendlyStandardHandleOptions } from '../../shared/server.
|
|
4
|
+
import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.BSJugGGA.mjs';
|
|
5
|
+
import { F as FriendlyStandardHandleOptions } from '../../shared/server.DrMgIiBr.mjs';
|
|
6
6
|
import compression from '@temporary-name/interop/compression';
|
|
7
7
|
import '@temporary-name/contract';
|
|
8
8
|
import '@temporary-name/standard-server';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as Context, R as Router } from '../../shared/server.
|
|
1
|
+
import { C as Context, R as Router } from '../../shared/server.CWWP8ypC.js';
|
|
2
2
|
import { Interceptor, MaybeOptionalOptions } from '@temporary-name/shared';
|
|
3
3
|
import { SendStandardResponseOptions, NodeHttpRequest, NodeHttpResponse } from '@temporary-name/standard-server-node';
|
|
4
|
-
import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.
|
|
5
|
-
import { F as FriendlyStandardHandleOptions } from '../../shared/server.
|
|
4
|
+
import { a as StandardHandlerPlugin, C as CompositeStandardHandlerPlugin, b as StandardHandlerOptions, c as StandardHandleOptions } from '../../shared/server.EKwDe0d2.js';
|
|
5
|
+
import { F as FriendlyStandardHandleOptions } from '../../shared/server.Bs8EZATl.js';
|
|
6
6
|
import compression from '@temporary-name/interop/compression';
|
|
7
7
|
import '@temporary-name/contract';
|
|
8
8
|
import '@temporary-name/standard-server';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { once, ORPCError, toArray, intercept, resolveMaybeOptionalOptions } from '@temporary-name/shared';
|
|
2
2
|
import compression from '@temporary-name/interop/compression';
|
|
3
3
|
import { toStandardLazyRequest, sendStandardResponse } from '@temporary-name/standard-server-node';
|
|
4
|
-
import { C as CompositeStandardHandlerPlugin, S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.
|
|
4
|
+
import { C as CompositeStandardHandlerPlugin, S as StandardHandler, r as resolveFriendlyStandardHandleOptions } from '../../shared/server.Cn7WsRHl.mjs';
|
|
5
5
|
import '@temporary-name/contract';
|
|
6
6
|
import '@temporary-name/standard-server';
|
|
7
7
|
import '@temporary-name/server';
|
|
@@ -9,7 +9,6 @@ import 'rou3';
|
|
|
9
9
|
import '@temporary-name/zod';
|
|
10
10
|
import '../../shared/server.CHV9AQHl.mjs';
|
|
11
11
|
import '../../shared/server.JtIZ8YG7.mjs';
|
|
12
|
-
import '../../shared/server.DN9mVGfv.mjs';
|
|
13
12
|
|
|
14
13
|
class BodyLimitPlugin {
|
|
15
14
|
maxBodySize;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { C as CompositeStandardHandlerPlugin, c as StandardHandleOptions, d as StandardHandleResult, e as StandardHandler, S as StandardHandlerInterceptorOptions, b as StandardHandlerOptions, a as StandardHandlerPlugin } from '../../shared/server.
|
|
1
|
+
export { C as CompositeStandardHandlerPlugin, c as StandardHandleOptions, d as StandardHandleResult, e as StandardHandler, S as StandardHandlerInterceptorOptions, b as StandardHandlerOptions, a as StandardHandlerPlugin } from '../../shared/server.BSJugGGA.mjs';
|
|
2
2
|
import { AnyProcedure, AnyRouter } from '@temporary-name/server';
|
|
3
3
|
import { ORPCError, HTTPPath } from '@temporary-name/shared';
|
|
4
4
|
import { StandardLazyRequest, StandardHeaders, StandardResponse } from '@temporary-name/standard-server';
|
|
5
|
-
export { F as FriendlyStandardHandleOptions, d as decodeParams, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.
|
|
5
|
+
export { F as FriendlyStandardHandleOptions, d as decodeParams, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.DrMgIiBr.mjs';
|
|
6
6
|
import '@temporary-name/contract';
|
|
7
|
-
import '../../shared/server.
|
|
7
|
+
import '../../shared/server.CWWP8ypC.mjs';
|
|
8
8
|
|
|
9
9
|
declare function decode(request: StandardLazyRequest, pathParams: Record<string, string> | undefined): Promise<{
|
|
10
10
|
path: unknown;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { C as CompositeStandardHandlerPlugin, c as StandardHandleOptions, d as StandardHandleResult, e as StandardHandler, S as StandardHandlerInterceptorOptions, b as StandardHandlerOptions, a as StandardHandlerPlugin } from '../../shared/server.
|
|
1
|
+
export { C as CompositeStandardHandlerPlugin, c as StandardHandleOptions, d as StandardHandleResult, e as StandardHandler, S as StandardHandlerInterceptorOptions, b as StandardHandlerOptions, a as StandardHandlerPlugin } from '../../shared/server.EKwDe0d2.js';
|
|
2
2
|
import { AnyProcedure, AnyRouter } from '@temporary-name/server';
|
|
3
3
|
import { ORPCError, HTTPPath } from '@temporary-name/shared';
|
|
4
4
|
import { StandardLazyRequest, StandardHeaders, StandardResponse } from '@temporary-name/standard-server';
|
|
5
|
-
export { F as FriendlyStandardHandleOptions, d as decodeParams, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.
|
|
5
|
+
export { F as FriendlyStandardHandleOptions, d as decodeParams, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.Bs8EZATl.js';
|
|
6
6
|
import '@temporary-name/contract';
|
|
7
|
-
import '../../shared/server.
|
|
7
|
+
import '../../shared/server.CWWP8ypC.js';
|
|
8
8
|
|
|
9
9
|
declare function decode(request: StandardLazyRequest, pathParams: Record<string, string> | undefined): Promise<{
|
|
10
10
|
path: unknown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { C as CompositeStandardHandlerPlugin, S as StandardHandler, b as StandardOpenAPIMatcher, d as decode, c as decodeParams, e as encode, a as encodeError, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.
|
|
1
|
+
export { C as CompositeStandardHandlerPlugin, S as StandardHandler, b as StandardOpenAPIMatcher, d as decode, c as decodeParams, e as encode, a as encodeError, r as resolveFriendlyStandardHandleOptions, t as toRou3Pattern } from '../../shared/server.Cn7WsRHl.mjs';
|
|
2
2
|
import '@temporary-name/shared';
|
|
3
3
|
import '@temporary-name/standard-server';
|
|
4
4
|
import '../../shared/server.CHV9AQHl.mjs';
|
|
@@ -7,4 +7,3 @@ import '@temporary-name/zod';
|
|
|
7
7
|
import '../../shared/server.JtIZ8YG7.mjs';
|
|
8
8
|
import '@temporary-name/server';
|
|
9
9
|
import 'rou3';
|
|
10
|
-
import '../../shared/server.DN9mVGfv.mjs';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Schemas, ErrorMap, Meta, ContractProcedure, MergedErrorMap,
|
|
1
|
+
import { Schemas, ErrorMap, Meta, ContractProcedure, MergedErrorMap, AnyShape, MergedSchemas, WrapShape, UnionToIntersection, AnySchema, Route, InferHandlerInputs, InferSchemaInput, ContractRouter, ContractProcedureDef, InitialSchemas, AnyContractRouter, InferContractRouterErrorMap, InferContractRouterMeta, AnyContractProcedure, InferProcedureClientInputs, InferSchemaOutput, ErrorFromErrorMap, Schema } from '@temporary-name/contract';
|
|
2
2
|
export { ContractProcedure, ContractProcedureDef, ContractRouter, ErrorMap, ErrorMapItem, InferSchemaInput, InferSchemaOutput, MergedErrorMap, Meta, OutputStructure, Route, Schema, ValidationError, eventIterator, validateORPCError } from '@temporary-name/contract';
|
|
3
3
|
import { ClientContext, MaybeOptionalOptions, HTTPEndpoint, IntersectPick, HTTPPath, ClientOptions, ClientPromiseResult } from '@temporary-name/shared';
|
|
4
4
|
export { AsyncIteratorClass, ClientContext, EventPublisher, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, HTTPMethod, HTTPPath, IntersectPick, ORPCError, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, isDefinedError, onError, onFinish, onStart, onSuccess, safe, streamToAsyncIteratorClass as streamToEventIterator } from '@temporary-name/shared';
|
|
5
5
|
import { SchemaClass, core } from '@temporary-name/zod';
|
|
6
|
-
import { C as Context, P as Procedure, a as CreateProcedureClientOptions, b as ProcedureClient, M as Middleware, O as ORPCErrorConstructorMap, c as MergedInitialContext, d as MergedCurrentContext, e as ProcedureHandler, E as EnhanceRouterOptions, R as Router, f as EnhancedRouter, g as MapInputMiddleware, A as AnyMiddleware, L as Lazy, h as AnyProcedure, i as Lazyable, j as AnyRouter, I as InferRouterInitialContext } from './shared/server.
|
|
7
|
-
export {
|
|
6
|
+
import { C as Context, P as Procedure, a as CreateProcedureClientOptions, b as ProcedureClient, M as Middleware, O as ORPCErrorConstructorMap, c as MergedInitialContext, d as MergedCurrentContext, e as ProcedureHandler, E as EnhanceRouterOptions, R as Router, f as EnhancedRouter, g as MapInputMiddleware, A as AnyMiddleware, L as Lazy, h as AnyProcedure, i as Lazyable, j as AnyRouter, I as InferRouterInitialContext } from './shared/server.CWWP8ypC.mjs';
|
|
7
|
+
export { T as AccessibleLazyRouter, Y as ContractProcedureCallbackOptions, K as InferRouterCurrentContexts, J as InferRouterInitialContexts, N as InferRouterInputs, Q as InferRouterOutputs, o as LAZY_SYMBOL, p as LazyMeta, Z as LazyTraverseContractProceduresOptions, w as MiddlewareNextFn, y as MiddlewareOptions, x as MiddlewareOutputFn, v as MiddlewareResult, l as ORPCErrorConstructorMapItem, k as ORPCErrorConstructorMapItemOptions, G as ProcedureClientInterceptorOptions, D as ProcedureDef, B as ProcedureHandlerOptions, X as TraverseContractProcedureCallbackOptions, W as TraverseContractProceduresOptions, a0 as UnlaziedRouter, U as createAccessibleLazyRouter, n as createORPCErrorConstructorMap, H as createProcedureClient, V as enhanceRouter, t as getLazyMeta, S as getRouter, s as isLazy, F as isProcedure, r as lazy, q as lazyInternal, m as mergeCurrentContext, z as middlewareOutputFn, $ as resolveContractProcedures, _ as traverseContractProcedures, u as unlazy, a1 as unlazyRouter } from './shared/server.CWWP8ypC.mjs';
|
|
8
8
|
export { getEventMeta, withEventMeta } from '@temporary-name/standard-server';
|
|
9
9
|
|
|
10
10
|
declare class DecoratedProcedure<TInitialContext extends Context, TCurrentContext extends Context, TSchemas extends Schemas, TErrorMap extends ErrorMap, TMeta extends Meta> extends Procedure<TInitialContext, TCurrentContext, TSchemas, TErrorMap, TMeta> {
|
|
@@ -37,6 +37,9 @@ declare class ProcedureBuilder<TInitialContext extends Context, TCurrentContext
|
|
|
37
37
|
* @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
|
|
38
38
|
*/
|
|
39
39
|
meta(meta: TMeta): ProcedureBuilder<TInitialContext, TCurrentContext, TSchemas, TErrorMap, TMeta, TGateName>;
|
|
40
|
+
endpoint<U extends AnyShape[]>(strings: TemplateStringsArray, ...values: [...U]): ProcedureBuilder<TInitialContext, TCurrentContext, MergedSchemas<TSchemas, {
|
|
41
|
+
pathSchema: WrapShape<UnionToIntersection<U>>;
|
|
42
|
+
}>, TErrorMap, TMeta, TGateName>;
|
|
40
43
|
endpoint<U extends AnySchema | AnyShape = core.$ZodType<Record<string, never>, Record<string, never>>>(endpoint: HTTPEndpoint, schema?: U): ProcedureBuilder<TInitialContext, TCurrentContext, MergedSchemas<TSchemas, {
|
|
41
44
|
pathSchema: WrapShape<U>;
|
|
42
45
|
}>, TErrorMap, TMeta, TGateName>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Schemas, ErrorMap, Meta, ContractProcedure, MergedErrorMap,
|
|
1
|
+
import { Schemas, ErrorMap, Meta, ContractProcedure, MergedErrorMap, AnyShape, MergedSchemas, WrapShape, UnionToIntersection, AnySchema, Route, InferHandlerInputs, InferSchemaInput, ContractRouter, ContractProcedureDef, InitialSchemas, AnyContractRouter, InferContractRouterErrorMap, InferContractRouterMeta, AnyContractProcedure, InferProcedureClientInputs, InferSchemaOutput, ErrorFromErrorMap, Schema } from '@temporary-name/contract';
|
|
2
2
|
export { ContractProcedure, ContractProcedureDef, ContractRouter, ErrorMap, ErrorMapItem, InferSchemaInput, InferSchemaOutput, MergedErrorMap, Meta, OutputStructure, Route, Schema, ValidationError, eventIterator, validateORPCError } from '@temporary-name/contract';
|
|
3
3
|
import { ClientContext, MaybeOptionalOptions, HTTPEndpoint, IntersectPick, HTTPPath, ClientOptions, ClientPromiseResult } from '@temporary-name/shared';
|
|
4
4
|
export { AsyncIteratorClass, ClientContext, EventPublisher, EventPublisherOptions, EventPublisherSubscribeIteratorOptions, HTTPMethod, HTTPPath, IntersectPick, ORPCError, Registry, ThrowableError, asyncIteratorToStream as eventIteratorToStream, isDefinedError, onError, onFinish, onStart, onSuccess, safe, streamToAsyncIteratorClass as streamToEventIterator } from '@temporary-name/shared';
|
|
5
5
|
import { SchemaClass, core } from '@temporary-name/zod';
|
|
6
|
-
import { C as Context, P as Procedure, a as CreateProcedureClientOptions, b as ProcedureClient, M as Middleware, O as ORPCErrorConstructorMap, c as MergedInitialContext, d as MergedCurrentContext, e as ProcedureHandler, E as EnhanceRouterOptions, R as Router, f as EnhancedRouter, g as MapInputMiddleware, A as AnyMiddleware, L as Lazy, h as AnyProcedure, i as Lazyable, j as AnyRouter, I as InferRouterInitialContext } from './shared/server.
|
|
7
|
-
export {
|
|
6
|
+
import { C as Context, P as Procedure, a as CreateProcedureClientOptions, b as ProcedureClient, M as Middleware, O as ORPCErrorConstructorMap, c as MergedInitialContext, d as MergedCurrentContext, e as ProcedureHandler, E as EnhanceRouterOptions, R as Router, f as EnhancedRouter, g as MapInputMiddleware, A as AnyMiddleware, L as Lazy, h as AnyProcedure, i as Lazyable, j as AnyRouter, I as InferRouterInitialContext } from './shared/server.CWWP8ypC.js';
|
|
7
|
+
export { T as AccessibleLazyRouter, Y as ContractProcedureCallbackOptions, K as InferRouterCurrentContexts, J as InferRouterInitialContexts, N as InferRouterInputs, Q as InferRouterOutputs, o as LAZY_SYMBOL, p as LazyMeta, Z as LazyTraverseContractProceduresOptions, w as MiddlewareNextFn, y as MiddlewareOptions, x as MiddlewareOutputFn, v as MiddlewareResult, l as ORPCErrorConstructorMapItem, k as ORPCErrorConstructorMapItemOptions, G as ProcedureClientInterceptorOptions, D as ProcedureDef, B as ProcedureHandlerOptions, X as TraverseContractProcedureCallbackOptions, W as TraverseContractProceduresOptions, a0 as UnlaziedRouter, U as createAccessibleLazyRouter, n as createORPCErrorConstructorMap, H as createProcedureClient, V as enhanceRouter, t as getLazyMeta, S as getRouter, s as isLazy, F as isProcedure, r as lazy, q as lazyInternal, m as mergeCurrentContext, z as middlewareOutputFn, $ as resolveContractProcedures, _ as traverseContractProcedures, u as unlazy, a1 as unlazyRouter } from './shared/server.CWWP8ypC.js';
|
|
8
8
|
export { getEventMeta, withEventMeta } from '@temporary-name/standard-server';
|
|
9
9
|
|
|
10
10
|
declare class DecoratedProcedure<TInitialContext extends Context, TCurrentContext extends Context, TSchemas extends Schemas, TErrorMap extends ErrorMap, TMeta extends Meta> extends Procedure<TInitialContext, TCurrentContext, TSchemas, TErrorMap, TMeta> {
|
|
@@ -37,6 +37,9 @@ declare class ProcedureBuilder<TInitialContext extends Context, TCurrentContext
|
|
|
37
37
|
* @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
|
|
38
38
|
*/
|
|
39
39
|
meta(meta: TMeta): ProcedureBuilder<TInitialContext, TCurrentContext, TSchemas, TErrorMap, TMeta, TGateName>;
|
|
40
|
+
endpoint<U extends AnyShape[]>(strings: TemplateStringsArray, ...values: [...U]): ProcedureBuilder<TInitialContext, TCurrentContext, MergedSchemas<TSchemas, {
|
|
41
|
+
pathSchema: WrapShape<UnionToIntersection<U>>;
|
|
42
|
+
}>, TErrorMap, TMeta, TGateName>;
|
|
40
43
|
endpoint<U extends AnySchema | AnyShape = core.$ZodType<Record<string, never>, Record<string, never>>>(endpoint: HTTPEndpoint, schema?: U): ProcedureBuilder<TInitialContext, TCurrentContext, MergedSchemas<TSchemas, {
|
|
41
44
|
pathSchema: WrapShape<U>;
|
|
42
45
|
}>, TErrorMap, TMeta, TGateName>;
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { mergePrefix, mergeTags, ContractProcedure, mergeErrorMap, mergeMeta, mergeRoute, prefixRoute, initialSchemas, isContractProcedure, getContractRouter } from '@temporary-name/contract';
|
|
1
|
+
import { mergePrefix, mergeTags, ContractProcedure, mergeErrorMap, mergeMeta, parseEndpointDefinition, mergeRoute, prefixRoute, initialSchemas, isContractProcedure, getContractRouter } from '@temporary-name/contract';
|
|
2
2
|
export { ValidationError, eventIterator, validateORPCError } from '@temporary-name/contract';
|
|
3
3
|
import { onError, resolveMaybeOptionalOptions } from '@temporary-name/shared';
|
|
4
4
|
export { AsyncIteratorClass, EventPublisher, ORPCError, asyncIteratorToStream as eventIteratorToStream, isDefinedError, onError, onFinish, onStart, onSuccess, safe, streamToAsyncIteratorClass as streamToEventIterator } from '@temporary-name/shared';
|
|
5
|
-
import { SchemaClass,
|
|
6
|
-
export { getEventMeta, withEventMeta } from '@temporary-name/standard-server';
|
|
7
|
-
import { g as getDynamicParams } from './shared/server.DN9mVGfv.mjs';
|
|
5
|
+
import { SchemaClass, object, core, gatingContext } from '@temporary-name/zod';
|
|
8
6
|
import { P as Procedure, c as createProcedureClient, e as enhanceRouter, a as addMiddleware, s as setHiddenRouterContract, l as lazyInternal, g as getLazyMeta, u as unlazy, i as isProcedure, b as isLazy, d as getRouter } from './shared/server.CHV9AQHl.mjs';
|
|
9
7
|
export { L as LAZY_SYMBOL, p as createAccessibleLazyRouter, f as createORPCErrorConstructorMap, o as getHiddenRouterContract, k as isStartWithMiddlewares, h as lazy, m as mergeCurrentContext, n as mergeMiddlewares, j as middlewareOutputFn, r as resolveContractProcedures, t as traverseContractProcedures, q as unlazyRouter } from './shared/server.CHV9AQHl.mjs';
|
|
8
|
+
export { getEventMeta, withEventMeta } from '@temporary-name/standard-server';
|
|
10
9
|
|
|
11
10
|
class DecoratedProcedure extends Procedure {
|
|
12
11
|
/**
|
|
@@ -57,16 +56,8 @@ class ProcedureBuilder extends ContractProcedure {
|
|
|
57
56
|
meta: mergeMeta(this["~orpc"].meta, meta)
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
|
-
endpoint(
|
|
61
|
-
const
|
|
62
|
-
const pathParamNames = getDynamicParams(path)?.map((p) => p.name) ?? [];
|
|
63
|
-
if (schema && !(schema instanceof core.$ZodObject)) {
|
|
64
|
-
throw new Error(`Path schema for endpoint "${endpoint}" must be a ZodObject schema.`);
|
|
65
|
-
}
|
|
66
|
-
const schemaKeys = schema ? Object.keys(schema._zod.def.shape) : [];
|
|
67
|
-
if (pathParamNames.length !== schemaKeys.length || !pathParamNames.every((name) => schemaKeys.includes(name))) {
|
|
68
|
-
throw new Error(`Path schema keys do not match dynamic parameters in endpoint "${endpoint}".`);
|
|
69
|
-
}
|
|
59
|
+
endpoint(stringsOrEndpoint, ...values) {
|
|
60
|
+
const { method, path, pathSchema } = parseEndpointDefinition(stringsOrEndpoint, values);
|
|
70
61
|
const { prefix } = this["~orpc"];
|
|
71
62
|
const route = { method, path };
|
|
72
63
|
return new ProcedureBuilder({
|
|
@@ -74,7 +65,7 @@ class ProcedureBuilder extends ContractProcedure {
|
|
|
74
65
|
route: mergeRoute(this["~orpc"].route, prefix ? prefixRoute(route, prefix) : route),
|
|
75
66
|
schemas: {
|
|
76
67
|
...this["~orpc"].schemas,
|
|
77
|
-
pathSchema
|
|
68
|
+
pathSchema
|
|
78
69
|
}
|
|
79
70
|
});
|
|
80
71
|
}
|
package/dist/openapi/index.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { isProcedure, resolveContractProcedures, ORPCError, createRouterClient } from '@temporary-name/server';
|
|
2
|
-
import { fallbackContractConfig, getEventIteratorSchemaDetails } from '@temporary-name/contract';
|
|
2
|
+
import { standardizeHTTPPath, fallbackContractConfig, getDynamicParams, getEventIteratorSchemaDetails } from '@temporary-name/contract';
|
|
3
3
|
import { isObject, stringifyJSON, findDeepMatches, toArray, clone, value, toHttpPath, isORPCErrorStatus, fallbackORPCErrorStatus, fallbackORPCErrorMessage, resolveMaybeOptionalOptions, createORPCErrorFromJson } from '@temporary-name/shared';
|
|
4
4
|
import { j as jsonSerialize, d as deserialize, s as serialize } from '../shared/server.JtIZ8YG7.mjs';
|
|
5
5
|
import '@temporary-name/standard-server';
|
|
6
|
-
import { s as standardizeHTTPPath, g as getDynamicParams } from '../shared/server.DN9mVGfv.mjs';
|
|
7
6
|
import { TypeName } from '@temporary-name/interop/json-schema-typed/draft-2020-12';
|
|
8
7
|
export { ContentEncoding as JSONSchemaContentEncoding, Format as JSONSchemaFormat, TypeName as JSONSchemaTypeName } from '@temporary-name/interop/json-schema-typed/draft-2020-12';
|
|
9
8
|
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Value, Promisable, ORPCError } from '@temporary-name/shared';
|
|
2
2
|
import { StandardRequest, StandardHeaders } from '@temporary-name/standard-server';
|
|
3
3
|
import { BatchResponseBodyItem } from '@temporary-name/standard-server/batch';
|
|
4
|
-
import { S as StandardHandlerInterceptorOptions, a as StandardHandlerPlugin, b as StandardHandlerOptions } from '../shared/server.
|
|
5
|
-
import { C as Context,
|
|
4
|
+
import { S as StandardHandlerInterceptorOptions, a as StandardHandlerPlugin, b as StandardHandlerOptions } from '../shared/server.BSJugGGA.mjs';
|
|
5
|
+
import { C as Context, G as ProcedureClientInterceptorOptions } from '../shared/server.CWWP8ypC.mjs';
|
|
6
6
|
import { Meta } from '@temporary-name/contract';
|
|
7
7
|
|
|
8
8
|
interface BatchHandlerOptions<T extends Context> {
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Value, Promisable, ORPCError } from '@temporary-name/shared';
|
|
2
2
|
import { StandardRequest, StandardHeaders } from '@temporary-name/standard-server';
|
|
3
3
|
import { BatchResponseBodyItem } from '@temporary-name/standard-server/batch';
|
|
4
|
-
import { S as StandardHandlerInterceptorOptions, a as StandardHandlerPlugin, b as StandardHandlerOptions } from '../shared/server.
|
|
5
|
-
import { C as Context,
|
|
4
|
+
import { S as StandardHandlerInterceptorOptions, a as StandardHandlerPlugin, b as StandardHandlerOptions } from '../shared/server.EKwDe0d2.js';
|
|
5
|
+
import { C as Context, G as ProcedureClientInterceptorOptions } from '../shared/server.CWWP8ypC.js';
|
|
6
6
|
import { Meta } from '@temporary-name/contract';
|
|
7
7
|
|
|
8
8
|
interface BatchHandlerOptions<T extends Context> {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@temporary-name/contract';
|
|
2
2
|
import { HTTPPath, Interceptor } from '@temporary-name/shared';
|
|
3
3
|
import { StandardLazyRequest, StandardResponse } from '@temporary-name/standard-server';
|
|
4
|
-
import { C as Context, R as Router,
|
|
4
|
+
import { C as Context, R as Router, G as ProcedureClientInterceptorOptions } from './server.CWWP8ypC.mjs';
|
|
5
5
|
|
|
6
6
|
interface StandardHandlerPlugin<T extends Context> {
|
|
7
7
|
order?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTTPPath } from '@temporary-name/shared';
|
|
2
|
-
import { C as Context } from './server.
|
|
3
|
-
import { c as StandardHandleOptions } from './server.
|
|
2
|
+
import { C as Context } from './server.CWWP8ypC.js';
|
|
3
|
+
import { c as StandardHandleOptions } from './server.EKwDe0d2.js';
|
|
4
4
|
|
|
5
5
|
type FriendlyStandardHandleOptions<T extends Context> = Omit<StandardHandleOptions<T>, 'context'> & (Record<never, never> extends T ? {
|
|
6
6
|
context?: T;
|
|
@@ -54,13 +54,10 @@ type MiddlewareResult<TOutContext extends Context, TOutput> = Promisable<{
|
|
|
54
54
|
output: TOutput;
|
|
55
55
|
context: TOutContext;
|
|
56
56
|
}>;
|
|
57
|
-
type MiddlewareNextFnOptions<TOutContext extends Context> = Record<never, never> extends TOutContext ? {
|
|
58
|
-
context?: TOutContext;
|
|
59
|
-
} : {
|
|
60
|
-
context: TOutContext;
|
|
61
|
-
};
|
|
62
57
|
interface MiddlewareNextFn<TOutput> {
|
|
63
|
-
<U extends Context =
|
|
58
|
+
<U extends Context = {}>(options?: {
|
|
59
|
+
context?: U;
|
|
60
|
+
}): MiddlewareResult<U, TOutput>;
|
|
64
61
|
}
|
|
65
62
|
interface MiddlewareOutputFn<TOutput> {
|
|
66
63
|
(output: TOutput): MiddlewareResult<Record<never, never>, TOutput>;
|
|
@@ -238,5 +235,5 @@ type CreateProcedureClientOptions<TInitialContext extends Context, TOutputSchema
|
|
|
238
235
|
*/
|
|
239
236
|
declare function createProcedureClient<TInitialContext extends Context, TSchemas extends Schemas, TErrorMap extends ErrorMap, TMeta extends Meta, TClientContext extends ClientContext>(lazyableProcedure: Lazyable<Procedure<TInitialContext, any, TSchemas, TErrorMap, TMeta>>, ...rest: MaybeOptionalOptions<CreateProcedureClientOptions<TInitialContext, TSchemas['outputSchema'], TErrorMap, TMeta, TClientContext>>): ProcedureClient<TClientContext, TSchemas, TErrorMap>;
|
|
240
237
|
|
|
241
|
-
export {
|
|
242
|
-
export type { AnyMiddleware as A, Context as C,
|
|
238
|
+
export { resolveContractProcedures as $, isProcedure as F, createProcedureClient as H, Procedure as P, getRouter as S, createAccessibleLazyRouter as U, enhanceRouter as V, traverseContractProcedures as _, unlazyRouter as a1, mergeCurrentContext as m, createORPCErrorConstructorMap as n, LAZY_SYMBOL as o, lazyInternal as q, lazy as r, isLazy as s, getLazyMeta as t, unlazy as u, middlewareOutputFn as z };
|
|
239
|
+
export type { AnyMiddleware as A, ProcedureHandlerOptions as B, Context as C, ProcedureDef as D, EnhanceRouterOptions as E, ProcedureClientInterceptorOptions as G, InferRouterInitialContext as I, InferRouterInitialContexts as J, InferRouterCurrentContexts as K, Lazy as L, Middleware as M, InferRouterInputs as N, ORPCErrorConstructorMap as O, InferRouterOutputs as Q, Router as R, AccessibleLazyRouter as T, TraverseContractProceduresOptions as W, TraverseContractProcedureCallbackOptions as X, ContractProcedureCallbackOptions as Y, LazyTraverseContractProceduresOptions as Z, CreateProcedureClientOptions as a, UnlaziedRouter as a0, ProcedureClient as b, MergedInitialContext as c, MergedCurrentContext as d, ProcedureHandler as e, EnhancedRouter as f, MapInputMiddleware as g, AnyProcedure as h, Lazyable as i, AnyRouter as j, ORPCErrorConstructorMapItemOptions as k, ORPCErrorConstructorMapItem as l, LazyMeta as p, MiddlewareResult as v, MiddlewareNextFn as w, MiddlewareOutputFn as x, MiddlewareOptions as y };
|
|
@@ -54,13 +54,10 @@ type MiddlewareResult<TOutContext extends Context, TOutput> = Promisable<{
|
|
|
54
54
|
output: TOutput;
|
|
55
55
|
context: TOutContext;
|
|
56
56
|
}>;
|
|
57
|
-
type MiddlewareNextFnOptions<TOutContext extends Context> = Record<never, never> extends TOutContext ? {
|
|
58
|
-
context?: TOutContext;
|
|
59
|
-
} : {
|
|
60
|
-
context: TOutContext;
|
|
61
|
-
};
|
|
62
57
|
interface MiddlewareNextFn<TOutput> {
|
|
63
|
-
<U extends Context =
|
|
58
|
+
<U extends Context = {}>(options?: {
|
|
59
|
+
context?: U;
|
|
60
|
+
}): MiddlewareResult<U, TOutput>;
|
|
64
61
|
}
|
|
65
62
|
interface MiddlewareOutputFn<TOutput> {
|
|
66
63
|
(output: TOutput): MiddlewareResult<Record<never, never>, TOutput>;
|
|
@@ -238,5 +235,5 @@ type CreateProcedureClientOptions<TInitialContext extends Context, TOutputSchema
|
|
|
238
235
|
*/
|
|
239
236
|
declare function createProcedureClient<TInitialContext extends Context, TSchemas extends Schemas, TErrorMap extends ErrorMap, TMeta extends Meta, TClientContext extends ClientContext>(lazyableProcedure: Lazyable<Procedure<TInitialContext, any, TSchemas, TErrorMap, TMeta>>, ...rest: MaybeOptionalOptions<CreateProcedureClientOptions<TInitialContext, TSchemas['outputSchema'], TErrorMap, TMeta, TClientContext>>): ProcedureClient<TClientContext, TSchemas, TErrorMap>;
|
|
240
237
|
|
|
241
|
-
export {
|
|
242
|
-
export type { AnyMiddleware as A, Context as C,
|
|
238
|
+
export { resolveContractProcedures as $, isProcedure as F, createProcedureClient as H, Procedure as P, getRouter as S, createAccessibleLazyRouter as U, enhanceRouter as V, traverseContractProcedures as _, unlazyRouter as a1, mergeCurrentContext as m, createORPCErrorConstructorMap as n, LAZY_SYMBOL as o, lazyInternal as q, lazy as r, isLazy as s, getLazyMeta as t, unlazy as u, middlewareOutputFn as z };
|
|
239
|
+
export type { AnyMiddleware as A, ProcedureHandlerOptions as B, Context as C, ProcedureDef as D, EnhanceRouterOptions as E, ProcedureClientInterceptorOptions as G, InferRouterInitialContext as I, InferRouterInitialContexts as J, InferRouterCurrentContexts as K, Lazy as L, Middleware as M, InferRouterInputs as N, ORPCErrorConstructorMap as O, InferRouterOutputs as Q, Router as R, AccessibleLazyRouter as T, TraverseContractProceduresOptions as W, TraverseContractProcedureCallbackOptions as X, ContractProcedureCallbackOptions as Y, LazyTraverseContractProceduresOptions as Z, CreateProcedureClientOptions as a, UnlaziedRouter as a0, ProcedureClient as b, MergedInitialContext as c, MergedCurrentContext as d, ProcedureHandler as e, EnhancedRouter as f, MapInputMiddleware as g, AnyProcedure as h, Lazyable as i, AnyRouter as j, ORPCErrorConstructorMapItemOptions as k, ORPCErrorConstructorMapItem as l, LazyMeta as p, MiddlewareResult as v, MiddlewareNextFn as w, MiddlewareOutputFn as x, MiddlewareOptions as y };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { stringifyJSON, isObject, isORPCErrorStatus, tryDecodeURIComponent, toHttpPath, toArray, intercept, runWithSpan, ORPC_NAME, isAsyncIteratorObject, asyncIteratorWithSpan, setSpanError, ORPCError, toORPCError } from '@temporary-name/shared';
|
|
2
2
|
import { flattenHeader } from '@temporary-name/standard-server';
|
|
3
3
|
import { c as createProcedureClient } from './server.CHV9AQHl.mjs';
|
|
4
|
-
import { fallbackContractConfig } from '@temporary-name/contract';
|
|
4
|
+
import { fallbackContractConfig, standardizeHTTPPath } from '@temporary-name/contract';
|
|
5
5
|
import { d as deserialize, b as bracketNotationDeserialize, s as serialize } from './server.JtIZ8YG7.mjs';
|
|
6
6
|
import { traverseContractProcedures, isProcedure, getLazyMeta, unlazy, getRouter, createContractedProcedure } from '@temporary-name/server';
|
|
7
7
|
import { createRouter, addRoute, findRoute } from 'rou3';
|
|
8
|
-
import { s as standardizeHTTPPath } from './server.DN9mVGfv.mjs';
|
|
9
8
|
|
|
10
9
|
async function decode(request, pathParams) {
|
|
11
10
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTTPPath } from '@temporary-name/shared';
|
|
2
|
-
import { C as Context } from './server.
|
|
3
|
-
import { c as StandardHandleOptions } from './server.
|
|
2
|
+
import { C as Context } from './server.CWWP8ypC.mjs';
|
|
3
|
+
import { c as StandardHandleOptions } from './server.BSJugGGA.mjs';
|
|
4
4
|
|
|
5
5
|
type FriendlyStandardHandleOptions<T extends Context> = Omit<StandardHandleOptions<T>, 'context'> & (Record<never, never> extends T ? {
|
|
6
6
|
context?: T;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@temporary-name/contract';
|
|
2
2
|
import { HTTPPath, Interceptor } from '@temporary-name/shared';
|
|
3
3
|
import { StandardLazyRequest, StandardResponse } from '@temporary-name/standard-server';
|
|
4
|
-
import { C as Context, R as Router,
|
|
4
|
+
import { C as Context, R as Router, G as ProcedureClientInterceptorOptions } from './server.CWWP8ypC.js';
|
|
5
5
|
|
|
6
6
|
interface StandardHandlerPlugin<T extends Context> {
|
|
7
7
|
order?: number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temporary-name/server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.9.3-alpha.
|
|
4
|
+
"version": "1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.stainless.com/",
|
|
7
7
|
"repository": {
|
|
@@ -73,15 +73,15 @@
|
|
|
73
73
|
"cookie": "^1.0.2",
|
|
74
74
|
"rou3": "^0.7.7",
|
|
75
75
|
"zod": "^4.1.12",
|
|
76
|
-
"@temporary-name/contract": "1.9.3-alpha.
|
|
77
|
-
"@temporary-name/
|
|
78
|
-
"@temporary-name/shared": "1.9.3-alpha.
|
|
79
|
-
"@temporary-name/standard-server
|
|
80
|
-
"@temporary-name/
|
|
81
|
-
"@temporary-name/standard-server": "1.9.3-alpha.
|
|
82
|
-
"@temporary-name/
|
|
83
|
-
"@temporary-name/
|
|
84
|
-
"@temporary-name/
|
|
76
|
+
"@temporary-name/contract": "1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2",
|
|
77
|
+
"@temporary-name/interop": "1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2",
|
|
78
|
+
"@temporary-name/shared": "1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2",
|
|
79
|
+
"@temporary-name/standard-server": "1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2",
|
|
80
|
+
"@temporary-name/json-schema": "1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2",
|
|
81
|
+
"@temporary-name/standard-server-aws-lambda": "1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2",
|
|
82
|
+
"@temporary-name/standard-server-fetch": "1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2",
|
|
83
|
+
"@temporary-name/standard-server-node": "1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2",
|
|
84
|
+
"@temporary-name/zod": "1.9.3-alpha.6dce39d156e86570d7f905d2e09463c8e1c80db2"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
|
87
87
|
"@types/supertest": "^6.0.3",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
function standardizeHTTPPath(path) {
|
|
2
|
-
return `/${path.replace(/\/{2,}/g, "/").replace(/^\/|\/$/g, "")}`;
|
|
3
|
-
}
|
|
4
|
-
function getDynamicParams(path) {
|
|
5
|
-
return path ? standardizeHTTPPath(path).match(/\/\{[^}]+\}/g)?.map((v) => ({
|
|
6
|
-
raw: v,
|
|
7
|
-
name: v.match(/\{\+?([^}]+)\}/)[1]
|
|
8
|
-
})) : void 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export { getDynamicParams as g, standardizeHTTPPath as s };
|