@aeriajs/http 0.0.137 → 0.0.139
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.js +3 -3
- package/dist/routing.mjs +3 -3
- package/package.json +5 -5
package/dist/routing.js
CHANGED
|
@@ -131,7 +131,7 @@ const wrapRouteExecution = async (response, cb) => {
|
|
|
131
131
|
}
|
|
132
132
|
if (result === null) {
|
|
133
133
|
if (!response.headersSent) {
|
|
134
|
-
response.writeHead(
|
|
134
|
+
response.writeHead(types_1.HTTPStatus.NoContent);
|
|
135
135
|
}
|
|
136
136
|
response.end(result);
|
|
137
137
|
return;
|
|
@@ -144,11 +144,11 @@ const wrapRouteExecution = async (response, cb) => {
|
|
|
144
144
|
catch (e) {
|
|
145
145
|
console.trace(e);
|
|
146
146
|
if (!response.headersSent) {
|
|
147
|
-
response.writeHead(
|
|
147
|
+
response.writeHead(types_1.HTTPStatus.InternalServerError);
|
|
148
148
|
}
|
|
149
149
|
if (!response.writableEnded) {
|
|
150
150
|
return (0, common_1.endpointError)({
|
|
151
|
-
httpStatus:
|
|
151
|
+
httpStatus: types_1.HTTPStatus.InternalServerError,
|
|
152
152
|
code: types_1.ACError.UnknownError,
|
|
153
153
|
message: 'Internal server error',
|
|
154
154
|
});
|
package/dist/routing.mjs
CHANGED
|
@@ -124,7 +124,7 @@ export const wrapRouteExecution = async (response, cb) => {
|
|
|
124
124
|
}
|
|
125
125
|
if (result === null) {
|
|
126
126
|
if (!response.headersSent) {
|
|
127
|
-
response.writeHead(
|
|
127
|
+
response.writeHead(HTTPStatus.NoContent);
|
|
128
128
|
}
|
|
129
129
|
response.end(result);
|
|
130
130
|
return;
|
|
@@ -136,11 +136,11 @@ export const wrapRouteExecution = async (response, cb) => {
|
|
|
136
136
|
} catch (e) {
|
|
137
137
|
console.trace(e);
|
|
138
138
|
if (!response.headersSent) {
|
|
139
|
-
response.writeHead(
|
|
139
|
+
response.writeHead(HTTPStatus.InternalServerError);
|
|
140
140
|
}
|
|
141
141
|
if (!response.writableEnded) {
|
|
142
142
|
return endpointError({
|
|
143
|
-
httpStatus:
|
|
143
|
+
httpStatus: HTTPStatus.InternalServerError,
|
|
144
144
|
code: ACError.UnknownError,
|
|
145
145
|
message: "Internal server error"
|
|
146
146
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeriajs/http",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.139",
|
|
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.121",
|
|
32
|
+
"@aeriajs/entrypoint": "^0.0.124",
|
|
33
|
+
"@aeriajs/types": "^0.0.103",
|
|
34
|
+
"@aeriajs/validation": "^0.0.128"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"test": "vitest run",
|