@aeriajs/http 0.0.100 → 0.0.102
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 +2 -1
- package/package.json +5 -5
package/dist/routing.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { RouteContext, GenericRequest, GenericResponse, RequestMethod, RouteUri, InferProperties, PackReferences, ContractWithRoles, ApiConfig, RoleFromAccessCondition } from '@aeriajs/types';
|
|
2
|
+
import { REQUEST_METHODS } from '@aeriajs/types';
|
|
2
3
|
export type RouterOptions = {
|
|
3
4
|
exhaust?: boolean;
|
|
4
5
|
base?: RouteUri;
|
|
@@ -17,7 +18,7 @@ type TypedContext<TContractWithRoles extends ContractWithRoles> = Omit<RouteCont
|
|
|
17
18
|
} ? InferProperties<Query> : any;
|
|
18
19
|
};
|
|
19
20
|
};
|
|
20
|
-
export type ProxiedRouter<TRouter> = TRouter & Record<
|
|
21
|
+
export type ProxiedRouter<TRouter> = TRouter & Record<typeof REQUEST_METHODS[number], <const TContractWithRoles extends ContractWithRoles, TCallback extends (TContractWithRoles extends {
|
|
21
22
|
response: infer Response;
|
|
22
23
|
} ? InferProperties<Response> extends infer InferredResponse ? InferredResponse | Promise<InferredResponse> : never : any) extends infer Response ? (context: TypedContext<TContractWithRoles>) => Response : never>(exp: RouteUri, cb: TCallback, contract?: TContractWithRoles) => ReturnType<typeof registerRoute>>;
|
|
23
24
|
export declare const matches: <TRequest extends GenericRequest>(req: TRequest, method: RequestMethod | RequestMethod[] | null, exp: string | RegExp, options?: RouterOptions, config?: ApiConfig) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/http",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.102",
|
|
4
4
|
"description": "## Installation",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"@aeriajs/validation": "link:../validation"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@aeriajs/common": "^0.0.
|
|
32
|
-
"@aeriajs/entrypoint": "^0.0.
|
|
33
|
-
"@aeriajs/types": "^0.0.
|
|
34
|
-
"@aeriajs/validation": "^0.0.
|
|
31
|
+
"@aeriajs/common": "^0.0.90",
|
|
32
|
+
"@aeriajs/entrypoint": "^0.0.92",
|
|
33
|
+
"@aeriajs/types": "^0.0.78",
|
|
34
|
+
"@aeriajs/validation": "^0.0.93"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"test": "vitest run",
|