@temporary-name/server 1.9.3-alpha.592ae1e02e18c5274906b132313b083116248636 → 1.9.3-alpha.5dc8b200530586870ac736830d4584e0333cfd05

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.
Files changed (36) hide show
  1. package/dist/adapters/aws-lambda/index.d.mts +3 -4
  2. package/dist/adapters/aws-lambda/index.d.ts +3 -4
  3. package/dist/adapters/aws-lambda/index.mjs +4 -6
  4. package/dist/adapters/fetch/index.d.mts +3 -4
  5. package/dist/adapters/fetch/index.d.ts +3 -4
  6. package/dist/adapters/fetch/index.mjs +4 -6
  7. package/dist/adapters/node/index.d.mts +3 -4
  8. package/dist/adapters/node/index.d.ts +3 -4
  9. package/dist/adapters/node/index.mjs +4 -6
  10. package/dist/adapters/standard/index.d.mts +20 -32
  11. package/dist/adapters/standard/index.d.ts +20 -32
  12. package/dist/adapters/standard/index.mjs +5 -7
  13. package/dist/helpers/index.mjs +3 -29
  14. package/dist/index.d.mts +71 -339
  15. package/dist/index.d.ts +71 -339
  16. package/dist/index.mjs +218 -355
  17. package/dist/openapi/index.d.mts +1 -1
  18. package/dist/openapi/index.d.ts +1 -1
  19. package/dist/openapi/index.mjs +60 -77
  20. package/dist/plugins/index.d.mts +4 -80
  21. package/dist/plugins/index.d.ts +4 -80
  22. package/dist/plugins/index.mjs +17 -189
  23. package/dist/shared/{server.CQyYNJ1H.d.ts → server.B-meye9-.d.ts} +2 -4
  24. package/dist/shared/{server.DLsti1Pv.mjs → server.Ba0Z2fNc.mjs} +58 -97
  25. package/dist/shared/server.C1RJffw4.mjs +30 -0
  26. package/dist/shared/server.DkYpsO6W.d.mts +251 -0
  27. package/dist/shared/server.DkYpsO6W.d.ts +251 -0
  28. package/dist/shared/{server.SLLuK6_v.d.ts → server.DwNnHUZP.d.ts} +2 -2
  29. package/dist/shared/{server.BeuTpcmO.d.mts → server.I-tTl_ce.d.mts} +2 -2
  30. package/dist/shared/{server.BEHw7Eyx.mjs → server.JtIZ8YG7.mjs} +1 -11
  31. package/dist/shared/server.miXh-9wo.mjs +416 -0
  32. package/dist/shared/{server.C1fnTLq0.d.mts → server.vLcMd_kA.d.mts} +2 -4
  33. package/package.json +10 -21
  34. package/dist/shared/server.BKSOrA6h.d.mts +0 -192
  35. package/dist/shared/server.BKSOrA6h.d.ts +0 -192
  36. package/dist/shared/server.BKh8I1Ny.mjs +0 -239
@@ -0,0 +1,251 @@
1
+ import { ErrorMap, ErrorMapItem, InferSchemaInput, Meta, Schemas, ContractProcedureDef, AnyContractRouter, ContractProcedure, InferProcedureClientInputs, InferSchemaOutput, EnhanceRouteOptions, MergedErrorMap, AnyContractProcedure, ContractRouter, AnySchema, ErrorFromErrorMap } from '@temporary-name/contract';
2
+ import { ORPCErrorCode, MaybeOptionalOptions, ORPCErrorOptions, ORPCError, Promisable, StandardLazyRequest, HTTPPath, ClientContext, Interceptor, PromiseWithError, Value, Client } from '@temporary-name/shared';
3
+
4
+ type Context = Record<PropertyKey, any>;
5
+ type MergedInitialContext<TInitial extends Context, TAdditional extends Context, TCurrent extends Context> = TInitial & Omit<TAdditional, keyof TCurrent>;
6
+ type MergedCurrentContext<T extends Context, U extends Context> = Omit<T, keyof U> & U;
7
+ type BuildContextWithAuth<TContext extends Context, TAuthContext> = MergedCurrentContext<TContext, {
8
+ auth: TAuthContext | ('auth' extends keyof TContext ? TContext['auth'] : never);
9
+ }>;
10
+ declare function mergeCurrentContext<T extends Context, U extends Context>(context: T, other: U): MergedCurrentContext<T, U>;
11
+
12
+ type ORPCErrorConstructorMapItemOptions<TData> = Omit<ORPCErrorOptions<TData>, 'defined' | 'status'>;
13
+ type ORPCErrorConstructorMapItem<TCode extends ORPCErrorCode, TInData> = (...rest: MaybeOptionalOptions<ORPCErrorConstructorMapItemOptions<TInData>>) => ORPCError<TCode, TInData>;
14
+ type ORPCErrorConstructorMap<T extends ErrorMap> = {
15
+ [K in keyof T]: K extends ORPCErrorCode ? T[K] extends ErrorMapItem<infer UInputSchema> ? ORPCErrorConstructorMapItem<K, InferSchemaInput<UInputSchema>> : never : never;
16
+ };
17
+ declare function createORPCErrorConstructorMap<T extends ErrorMap>(errors: T): ORPCErrorConstructorMap<T>;
18
+
19
+ type MiddlewareResult<TOutContext extends Context, TOutput> = Promisable<{
20
+ output: TOutput;
21
+ context: TOutContext;
22
+ }>;
23
+ interface MiddlewareNextFn<TOutput> {
24
+ <U extends Context = {}>(options?: {
25
+ context?: U;
26
+ }): MiddlewareResult<U, TOutput>;
27
+ }
28
+ interface MiddlewareOutputFn<TOutput> {
29
+ (output: TOutput): MiddlewareResult<Record<never, never>, TOutput>;
30
+ }
31
+ interface MiddlewareOptions<TInContext extends Context, TOutput, TErrorConstructorMap extends ORPCErrorConstructorMap<any>, TMeta extends Meta> extends ProcedureHandlerOptions<TInContext, TErrorConstructorMap, TMeta> {
32
+ next: MiddlewareNextFn<TOutput>;
33
+ }
34
+ /**
35
+ * A function that represents a middleware.
36
+ *
37
+ * @see {@link https://orpc.unnoq.com/docs/middleware Middleware Docs}
38
+ */
39
+ interface Middleware<TInContext extends Context, TOutContext extends Context, TInput, TOutput, TErrorConstructorMap extends ORPCErrorConstructorMap<any>, TMeta extends Meta> {
40
+ (options: MiddlewareOptions<TInContext, TOutput, TErrorConstructorMap, TMeta>, input: TInput, output: MiddlewareOutputFn<TOutput>): Promisable<MiddlewareResult<TOutContext, TOutput>>;
41
+ }
42
+ type AnyMiddleware = Middleware<any, any, any, any, any, any>;
43
+ interface MapInputMiddleware<TInput, TMappedInput> {
44
+ (input: TInput): TMappedInput;
45
+ }
46
+ declare function middlewareOutputFn<TOutput>(output: TOutput): MiddlewareResult<Record<never, never>, TOutput>;
47
+
48
+ type DefaultProcedureHandlerOptions = ProcedureHandlerOptions<Context, ORPCErrorConstructorMap<ErrorMap>, Meta>;
49
+ interface ProcedureHandlerOptions<TCurrentContext extends Context, TErrorConstructorMap extends ORPCErrorConstructorMap<any>, TMeta extends Meta> {
50
+ context: TCurrentContext;
51
+ path: readonly string[];
52
+ procedure: Procedure<Context, Context, Schemas, ErrorMap, TMeta>;
53
+ signal?: AbortSignal;
54
+ request?: StandardLazyRequest;
55
+ lastEventId: string | undefined;
56
+ errors: TErrorConstructorMap;
57
+ }
58
+ interface ProcedureHandler<TCurrentContext extends Context, TInput extends {
59
+ path: any;
60
+ query: any;
61
+ body: any;
62
+ }, THandlerOutput, TErrorMap extends ErrorMap, TMeta extends Meta> {
63
+ (input: TInput, opt: ProcedureHandlerOptions<TCurrentContext, ORPCErrorConstructorMap<TErrorMap>, TMeta>): Promisable<THandlerOutput>;
64
+ }
65
+ interface ProcedureDef<TInitialContext extends Context, TCurrentContext extends Context, TSchemas extends Schemas, TErrorMap extends ErrorMap, TMeta extends Meta> extends ContractProcedureDef<TSchemas, TErrorMap, TMeta> {
66
+ __initialContext?: (type: TInitialContext) => unknown;
67
+ middlewares: readonly AnyMiddleware[];
68
+ authConfigs: TypedAuthConfig[];
69
+ inputValidationIndex: number;
70
+ outputValidationIndex: number;
71
+ handler: ProcedureHandler<TCurrentContext, any, any, any, any>;
72
+ }
73
+ /**
74
+ * This class represents a procedure.
75
+ *
76
+ * @see {@link https://orpc.unnoq.com/docs/procedure Procedure Docs}
77
+ */
78
+ declare class Procedure<TInitialContext extends Context, TCurrentContext extends Context, TSchemas extends Schemas, TErrorMap extends ErrorMap, TMeta extends Meta> {
79
+ /**
80
+ * This property holds the defined options.
81
+ */
82
+ '~orpc': ProcedureDef<TInitialContext, TCurrentContext, TSchemas, TErrorMap, TMeta>;
83
+ constructor(def: ProcedureDef<TInitialContext, TCurrentContext, TSchemas, TErrorMap, TMeta>);
84
+ }
85
+ type AnyProcedure = Procedure<any, any, Schemas, any, any>;
86
+ declare function isProcedure(item: unknown): item is AnyProcedure;
87
+
88
+ type ValidatedAuthContext = {};
89
+ interface BasicAuthConfig<TAuthContext extends ValidatedAuthContext, TCurrentContext extends Context, TMeta extends Meta> {
90
+ tokenPrefix?: string;
91
+ validate: (username: string, password: string, options: ProcedureHandlerOptions<TCurrentContext, ORPCErrorConstructorMap<any>, TMeta>) => Promisable<TAuthContext>;
92
+ }
93
+ interface TokenAuthConfig<TAuthContext extends ValidatedAuthContext, TCurrentContext extends Context, TMeta extends Meta> {
94
+ tokenPrefix?: string;
95
+ validate: (token: string, options: ProcedureHandlerOptions<TCurrentContext, ORPCErrorConstructorMap<any>, TMeta>) => Promisable<TAuthContext>;
96
+ }
97
+ interface NamedTokenAuthConfig<TAuthContext extends ValidatedAuthContext, TCurrentContext extends Context, TMeta extends Meta> extends TokenAuthConfig<TAuthContext, TCurrentContext, TMeta> {
98
+ name: string;
99
+ }
100
+ type AuthType = 'header' | 'query' | 'cookie' | 'bearer' | 'basic' | 'none';
101
+ type AuthConfig<TAuthType extends AuthType, TAuthContext extends ValidatedAuthContext = ValidatedAuthContext, TCurrentContext extends Context = Context, TMeta extends Meta = Meta> = TAuthType extends 'basic' ? BasicAuthConfig<TAuthContext, TCurrentContext, TMeta> : TAuthType extends 'bearer' ? TokenAuthConfig<TAuthContext, TCurrentContext, TMeta> : TAuthType extends 'header' ? NamedTokenAuthConfig<TAuthContext, TCurrentContext, TMeta> : TAuthType extends 'query' ? NamedTokenAuthConfig<TAuthContext, TCurrentContext, TMeta> : TAuthType extends 'cookie' ? NamedTokenAuthConfig<TAuthContext, TCurrentContext, TMeta> : TAuthType extends 'none' ? {} : never;
102
+ type TypedAuthConfig<TAuthType extends AuthType = AuthType> = {
103
+ type: TAuthType;
104
+ } & AuthConfig<TAuthType, object>;
105
+
106
+ /**
107
+ * Represents a router, which defines a hierarchical structure of procedures.
108
+ *
109
+ * @info A procedure is a router too.
110
+ * @see {@link https://orpc.unnoq.com/docs/contract-first/define-contract#contract-router Contract Router Docs}
111
+ */
112
+ type Router<T extends AnyContractRouter, TInitialContext extends Context> = T extends ContractProcedure<infer USchemas, infer UErrorMap, infer UMeta> ? Procedure<TInitialContext, any, USchemas, UErrorMap, UMeta> : {
113
+ [K in keyof T]: T[K] extends AnyContractRouter ? Lazyable<Router<T[K], TInitialContext>> : never;
114
+ };
115
+ type AnyRouter = Router<any, any>;
116
+ type InferRouterInitialContext<T extends AnyRouter> = T extends Router<any, infer UInitialContext> ? UInitialContext : never;
117
+ /**
118
+ * Infer all initial context of the router.
119
+ *
120
+ * @info A procedure is a router too.
121
+ * @see {@link https://orpc.unnoq.com/docs/router#utilities Router Utilities Docs}
122
+ */
123
+ type InferRouterInitialContexts<T extends AnyRouter> = T extends Procedure<infer UInitialContext, any, any, any, any> ? UInitialContext : {
124
+ [K in keyof T]: T[K] extends Lazyable<infer U extends AnyRouter> ? InferRouterInitialContexts<U> : never;
125
+ };
126
+ /**
127
+ * Infer all current context of the router.
128
+ *
129
+ * @info A procedure is a router too.
130
+ * @see {@link https://orpc.unnoq.com/docs/router#utilities Router Utilities Docs}
131
+ */
132
+ type InferRouterCurrentContexts<T extends AnyRouter> = T extends Procedure<any, infer UCurrentContext, any, any, any> ? UCurrentContext : {
133
+ [K in keyof T]: T[K] extends Lazyable<infer U extends AnyRouter> ? InferRouterCurrentContexts<U> : never;
134
+ };
135
+ /**
136
+ * Infer all router inputs
137
+ *
138
+ * @info A procedure is a router too.
139
+ * @see {@link https://orpc.unnoq.com/docs/router#utilities Router Utilities Docs}
140
+ */
141
+ type InferRouterInputs<T extends AnyRouter> = T extends Procedure<any, any, infer USchemas, any, any> ? InferProcedureClientInputs<USchemas> : {
142
+ [K in keyof T]: T[K] extends Lazyable<infer U extends AnyRouter> ? InferRouterInputs<U> : never;
143
+ };
144
+ /**
145
+ * Infer all router outputs
146
+ *
147
+ * @info A procedure is a router too.
148
+ * @see {@link https://orpc.unnoq.com/docs/router#utilities Router Utilities Docs}
149
+ */
150
+ type InferRouterOutputs<T extends AnyRouter> = T extends Procedure<any, any, infer USchemas, any, any> ? InferSchemaOutput<USchemas['outputSchema']> : {
151
+ [K in keyof T]: T[K] extends Lazyable<infer U extends AnyRouter> ? InferRouterOutputs<U> : never;
152
+ };
153
+
154
+ declare function getRouter<T extends Lazyable<AnyRouter | undefined>>(router: T, path: readonly string[]): T extends Lazy<any> ? Lazy<AnyRouter | undefined> : Lazyable<AnyRouter | undefined>;
155
+ type AccessibleLazyRouter<T extends Lazyable<AnyRouter | undefined>> = T extends Lazy<infer U extends AnyRouter | undefined | Lazy<AnyRouter | undefined>> ? AccessibleLazyRouter<U> : T extends AnyProcedure | undefined ? Lazy<T> : Lazy<T> & {
156
+ [K in keyof T]: T[K] extends Lazyable<AnyRouter> ? AccessibleLazyRouter<T[K]> : never;
157
+ };
158
+ declare function createAccessibleLazyRouter<T extends Lazy<AnyRouter | undefined>>(lazied: T): AccessibleLazyRouter<T>;
159
+ type EnhancedRouter<T extends Lazyable<AnyRouter>, TInitialContext extends Context, TCurrentContext extends Context, TErrorMap extends ErrorMap> = T extends Lazy<infer U extends AnyRouter> ? AccessibleLazyRouter<EnhancedRouter<U, TInitialContext, TCurrentContext, TErrorMap>> : T extends (Procedure<infer UInitialContext, infer UCurrentContext, infer USchemas, infer UErrorMap, infer UMeta>) ? Procedure<MergedInitialContext<TInitialContext, UInitialContext, TCurrentContext>, UCurrentContext, USchemas, MergedErrorMap<TErrorMap, UErrorMap>, UMeta> : {
160
+ [K in keyof T]: T[K] extends Lazyable<AnyRouter> ? EnhancedRouter<T[K], TInitialContext, TCurrentContext, TErrorMap> : never;
161
+ };
162
+ interface EnhanceRouterOptions<TErrorMap extends ErrorMap> extends EnhanceRouteOptions {
163
+ middlewares: readonly AnyMiddleware[];
164
+ errorMap: TErrorMap;
165
+ dedupeLeadingMiddlewares: boolean;
166
+ }
167
+ declare function enhanceRouter<T extends Lazyable<AnyRouter>, TInitialContext extends Context, TCurrentContext extends Context, TErrorMap extends ErrorMap>(router: T, options: EnhanceRouterOptions<TErrorMap>): EnhancedRouter<T, TInitialContext, TCurrentContext, TErrorMap>;
168
+ interface TraverseContractProceduresOptions {
169
+ router: AnyContractRouter | AnyRouter;
170
+ path: readonly string[];
171
+ }
172
+ interface TraverseContractProcedureCallbackOptions {
173
+ contract: AnyContractProcedure | AnyProcedure;
174
+ path: readonly string[];
175
+ }
176
+ /**
177
+ * @deprecated Use `TraverseContractProcedureCallbackOptions` instead.
178
+ */
179
+ type ContractProcedureCallbackOptions = TraverseContractProcedureCallbackOptions;
180
+ interface LazyTraverseContractProceduresOptions {
181
+ router: Lazy<AnyRouter>;
182
+ path: readonly string[];
183
+ }
184
+ declare function traverseContractProcedures(options: TraverseContractProceduresOptions, callback: (options: TraverseContractProcedureCallbackOptions) => void, lazyOptions?: LazyTraverseContractProceduresOptions[]): LazyTraverseContractProceduresOptions[];
185
+ declare function resolveContractProcedures(options: TraverseContractProceduresOptions, callback: (options: TraverseContractProcedureCallbackOptions) => void): Promise<void>;
186
+ type UnlaziedRouter<T extends AnyRouter> = T extends AnyProcedure ? T : {
187
+ [K in keyof T]: T[K] extends Lazyable<infer U extends AnyRouter> ? UnlaziedRouter<U> : never;
188
+ };
189
+ declare function unlazyRouter<T extends AnyRouter>(router: T): Promise<UnlaziedRouter<T>>;
190
+
191
+ declare const LAZY_SYMBOL: unique symbol;
192
+ interface LazyMeta {
193
+ prefix?: HTTPPath;
194
+ }
195
+ interface Lazy<T> {
196
+ [LAZY_SYMBOL]: {
197
+ loader: () => Promise<{
198
+ default: T;
199
+ }>;
200
+ meta: LazyMeta;
201
+ };
202
+ }
203
+ type Lazyable<T> = T | Lazy<T>;
204
+ /**
205
+ * @internal
206
+ */
207
+ declare function lazyInternal<T>(loader: () => Promise<{
208
+ default: T;
209
+ }>, meta?: LazyMeta): Lazy<T>;
210
+ /**
211
+ * Creates a lazy-loaded item.
212
+ *
213
+ * @warning The `prefix` in `meta` only holds metadata and does not apply the prefix to the lazy router, use `os.prefix(...).lazyRoute(...)` instead.
214
+ */
215
+ declare function lazy<T extends Router<ContractRouter<{}>, any>>(prefix: HTTPPath, loader: () => Promise<{
216
+ default: T;
217
+ }>): EnhancedRouter<Lazy<T>, {}, {}, {}>;
218
+ declare function isLazy(item: unknown): item is Lazy<any>;
219
+ declare function getLazyMeta(lazied: Lazy<any>): LazyMeta;
220
+ declare function unlazy<T extends Lazyable<any>>(lazied: T): Promise<{
221
+ default: T extends Lazy<infer U> ? U : T;
222
+ }>;
223
+
224
+ type ProcedureClient<TClientContext extends ClientContext, TSchemas extends Schemas, TErrorMap extends ErrorMap> = Client<TClientContext, InferProcedureClientInputs<TSchemas>, InferSchemaOutput<TSchemas['outputSchema']>, ErrorFromErrorMap<TErrorMap>>;
225
+ interface ProcedureClientInterceptorOptions<TInitialContext extends Context, TErrorMap extends ErrorMap, TMeta extends Meta> extends ProcedureHandlerOptions<TInitialContext, ORPCErrorConstructorMap<TErrorMap>, TMeta> {
226
+ input: {
227
+ path: unknown;
228
+ query: unknown;
229
+ body: unknown;
230
+ };
231
+ }
232
+ type CreateProcedureClientOptions<TInitialContext extends Context, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta, TClientContext extends ClientContext> = {
233
+ /**
234
+ * This is helpful for logging and analytics.
235
+ */
236
+ path?: readonly string[];
237
+ interceptors?: Interceptor<ProcedureClientInterceptorOptions<TInitialContext, TErrorMap, TMeta>, PromiseWithError<InferSchemaOutput<TOutputSchema>, ErrorFromErrorMap<TErrorMap>>>[];
238
+ } & (Record<never, never> extends TInitialContext ? {
239
+ context?: Value<Promisable<TInitialContext>, [clientContext: TClientContext]>;
240
+ } : {
241
+ context: Value<Promisable<TInitialContext>, [clientContext: TClientContext]>;
242
+ });
243
+ /**
244
+ * Create Server-side client from a procedure.
245
+ *
246
+ * @see {@link https://orpc.unnoq.com/docs/client/server-side Server-side Client Docs}
247
+ */
248
+ 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>;
249
+
250
+ export { enhanceRouter as $, middlewareOutputFn as F, isProcedure as K, Procedure as P, createProcedureClient as Q, getRouter as Y, createAccessibleLazyRouter as _, traverseContractProcedures as a4, resolveContractProcedures as a5, unlazyRouter as a7, mergeCurrentContext as m, createORPCErrorConstructorMap as p, LAZY_SYMBOL as q, lazyInternal as s, lazy as t, isLazy as u, getLazyMeta as v, unlazy as w };
251
+ export type { AuthType as A, BuildContextWithAuth as B, Context as C, MiddlewareOptions as D, EnhanceRouterOptions as E, DefaultProcedureHandlerOptions as G, ProcedureHandlerOptions as H, InferRouterInitialContext as I, ProcedureDef as J, Lazy as L, Middleware as M, ProcedureClientInterceptorOptions as N, ORPCErrorConstructorMap as O, Router as R, InferRouterInitialContexts as S, TypedAuthConfig as T, InferRouterCurrentContexts as U, ValidatedAuthContext as V, InferRouterInputs as W, InferRouterOutputs as X, AccessibleLazyRouter as Z, CreateProcedureClientOptions as a, TraverseContractProceduresOptions as a0, TraverseContractProcedureCallbackOptions as a1, ContractProcedureCallbackOptions as a2, LazyTraverseContractProceduresOptions as a3, UnlaziedRouter as a6, ProcedureClient as b, MergedInitialContext as c, MergedCurrentContext as d, AuthConfig as e, ProcedureHandler as f, EnhancedRouter as g, MapInputMiddleware as h, AnyMiddleware as i, AnyProcedure as j, Lazyable as k, AnyRouter as l, ORPCErrorConstructorMapItemOptions as n, ORPCErrorConstructorMapItem as o, LazyMeta as r, MiddlewareResult as x, MiddlewareNextFn as y, MiddlewareOutputFn as z };
@@ -1,6 +1,6 @@
1
1
  import { HTTPPath } from '@temporary-name/shared';
2
- import { C as Context } from './server.BKSOrA6h.js';
3
- import { c as StandardHandleOptions } from './server.CQyYNJ1H.js';
2
+ import { C as Context } from './server.DkYpsO6W.js';
3
+ import { c as StandardHandleOptions } from './server.B-meye9-.js';
4
4
 
5
5
  type FriendlyStandardHandleOptions<T extends Context> = Omit<StandardHandleOptions<T>, 'context'> & (Record<never, never> extends T ? {
6
6
  context?: T;
@@ -1,6 +1,6 @@
1
1
  import { HTTPPath } from '@temporary-name/shared';
2
- import { C as Context } from './server.BKSOrA6h.mjs';
3
- import { c as StandardHandleOptions } from './server.C1fnTLq0.mjs';
2
+ import { C as Context } from './server.DkYpsO6W.mjs';
3
+ import { c as StandardHandleOptions } from './server.vLcMd_kA.mjs';
4
4
 
5
5
  type FriendlyStandardHandleOptions<T extends Context> = Omit<StandardHandleOptions<T>, 'context'> & (Record<never, never> extends T ? {
6
6
  context?: T;
@@ -234,14 +234,4 @@ function deserialize(data) {
234
234
  return data;
235
235
  }
236
236
 
237
- function standardizeHTTPPath(path) {
238
- return `/${path.replace(/\/{2,}/g, "/").replace(/^\/|\/$/g, "")}`;
239
- }
240
- function getDynamicParams(path) {
241
- return path ? standardizeHTTPPath(path).match(/\/\{[^}]+\}/g)?.map((v) => ({
242
- raw: v,
243
- name: v.match(/\{\+?([^}]+)\}/)[1]
244
- })) : void 0;
245
- }
246
-
247
- export { standardizeHTTPPath as a, deserialize as d, getDynamicParams as g, jsonSerialize as j, serialize as s };
237
+ export { bracketNotationDeserialize as b, deserialize as d, jsonSerialize as j, serialize as s };