@aeriajs/http 0.0.158 → 0.0.159
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 -2
- package/dist/routing.js +1 -1
- package/dist/routing.mjs +1 -1
- package/package.json +5 -5
package/dist/routing.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RouteContext, GenericRequest, GenericResponse, RequestMethod, RouteUri, InferProperties, PackReferences, ContractWithRoles, ApiConfig
|
|
1
|
+
import type { RouteContext, GenericRequest, GenericResponse, RequestMethod, RouteUri, InferProperties, PackReferences, ContractWithRoles, ApiConfig } from '@aeriajs/types';
|
|
2
2
|
import { REQUEST_METHODS } from '@aeriajs/types';
|
|
3
3
|
export type RouterOptions = {
|
|
4
4
|
exhaust?: boolean;
|
|
@@ -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<
|
|
11
|
+
type TypedContext<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;
|
package/dist/routing.js
CHANGED
|
@@ -25,7 +25,7 @@ const checkUnprocessable = (what, schema, context, validateOptions = {}) => {
|
|
|
25
25
|
if ('code' in error) {
|
|
26
26
|
return context.error(types_1.HTTPStatus.UnprocessableContent, {
|
|
27
27
|
code: error.code,
|
|
28
|
-
details: error.
|
|
28
|
+
details: error.details,
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
return context.error(types_1.HTTPStatus.UnprocessableContent, {
|
package/dist/routing.mjs
CHANGED
|
@@ -22,7 +22,7 @@ const checkUnprocessable = (what, schema, context, validateOptions = {}) => {
|
|
|
22
22
|
if ("code" in error) {
|
|
23
23
|
return context.error(HTTPStatus.UnprocessableContent, {
|
|
24
24
|
code: error.code,
|
|
25
|
-
details: error.
|
|
25
|
+
details: error.details
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
return context.error(HTTPStatus.UnprocessableContent, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/http",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.159",
|
|
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.132",
|
|
32
|
+
"@aeriajs/entrypoint": "^0.0.135",
|
|
33
|
+
"@aeriajs/types": "^0.0.114",
|
|
34
|
+
"@aeriajs/validation": "^0.0.147"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"test": "vitest run",
|