@aeriajs/http 0.0.182 → 0.0.184

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/routing.d.ts CHANGED
@@ -8,7 +8,7 @@ export type RoutesMeta = Record<RouteUri, Partial<Record<RequestMethod, Contract
8
8
  export type RouteGroupOptions = {
9
9
  base?: RouteUri;
10
10
  };
11
- type TypedContext<TContractWithRoles extends ContractWithRoles> = Omit<RouteContext<TContractWithRoles['roles']>, 'request'> & {
11
+ type NarrowedContext<TContractWithRoles extends ContractWithRoles> = Omit<RouteContext<TContractWithRoles['roles']>, 'request'> & {
12
12
  request: Omit<RouteContext['request'], 'payload' | 'query'> & {
13
13
  payload: TContractWithRoles extends {
14
14
  payload: infer Payload;
@@ -20,7 +20,7 @@ type TypedContext<TContractWithRoles extends ContractWithRoles> = Omit<RouteCont
20
20
  };
21
21
  export type ProxiedRouter<TRouter> = TRouter & Record<typeof REQUEST_METHODS[number], <const TContractWithRoles extends ContractWithRoles, TCallback extends (TContractWithRoles extends {
22
22
  response: infer Response;
23
- } ? InferProperties<Response> extends infer InferredResponse ? InferredResponse | Promise<InferredResponse> : never : unknown) extends infer Response ? (context: TypedContext<TContractWithRoles>) => Response : never>(exp: RouteUri, cb: TCallback, contract?: TContractWithRoles) => ReturnType<typeof registerRoute>>;
23
+ } ? InferProperties<Response> extends infer InferredResponse ? InferredResponse | Promise<InferredResponse> : never : unknown) extends infer Response ? (context: NarrowedContext<TContractWithRoles>) => Response : never>(exp: RouteUri, cb: TCallback, contract?: TContractWithRoles) => ReturnType<typeof registerRoute>>;
24
24
  export declare const matches: <TRequest extends GenericRequest>(req: TRequest, method: RequestMethod | RequestMethod[] | null, exp: string | RegExp, options?: RouterOptions, config?: ApiConfig) => {
25
25
  fragments: string[];
26
26
  } | undefined;
@@ -29,7 +29,7 @@ export declare const wrapRouteExecution: (response: GenericResponse, cb: () => u
29
29
  export declare const createRouter: (options?: Partial<RouterOptions>) => ProxiedRouter<{
30
30
  route: <const TContractWithRoles extends ContractWithRoles, TCallback extends (TContractWithRoles extends {
31
31
  response: infer Response;
32
- } ? InferProperties<Response> : unknown) extends infer Response ? (context: TypedContext<TContractWithRoles>) => Response : never>(method: RequestMethod | RequestMethod[], exp: RouteUri, cb: TCallback, contract?: TContractWithRoles) => void;
32
+ } ? InferProperties<Response> : unknown) extends infer Response ? (context: NarrowedContext<TContractWithRoles>) => Response : never>(method: RequestMethod | RequestMethod[], exp: RouteUri, cb: TCallback, contract?: TContractWithRoles) => void;
33
33
  routes: ((_: unknown, context: RouteContext, groupOptions?: RouteGroupOptions) => unknown)[];
34
34
  routesMeta: RoutesMeta;
35
35
  group: <TRouter extends {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/http",
3
- "version": "0.0.182",
3
+ "version": "0.0.184",
4
4
  "description": "## Installation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -26,14 +26,14 @@
26
26
  "@aeriajs/entrypoint": "link:../entrypoint",
27
27
  "@aeriajs/types": "link:../types",
28
28
  "@aeriajs/validation": "link:../validation",
29
- "mongodb": "^6.16.0"
29
+ "mongodb": "^6.17.0"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "@aeriajs/common": "^0.0.151",
33
- "@aeriajs/entrypoint": "^0.0.156",
33
+ "@aeriajs/entrypoint": "^0.0.157",
34
34
  "@aeriajs/types": "^0.0.129",
35
- "@aeriajs/validation": "^0.0.169",
36
- "mongodb": "^6.16.0"
35
+ "@aeriajs/validation": "^0.0.170",
36
+ "mongodb": "^6.17.0"
37
37
  },
38
38
  "scripts": {
39
39
  "test": "vitest run",