@moostjs/event-http 0.4.13 → 0.4.14
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/index.cjs +3 -7
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +3 -7
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -230,18 +230,14 @@ class MoostHttp {
|
|
|
230
230
|
return this.httpApp.listen(port, hostname, backlog, listeningListener);
|
|
231
231
|
}
|
|
232
232
|
async onNotFound() {
|
|
233
|
-
|
|
233
|
+
return moost.defineMoostEventHandler({
|
|
234
234
|
loggerTitle: LOGGER_TITLE,
|
|
235
235
|
getIterceptorHandler: () => this.moost?.getGlobalInterceptorHandler(),
|
|
236
236
|
getControllerInstance: () => this.moost,
|
|
237
|
-
callControllerMethod: () =>
|
|
237
|
+
callControllerMethod: () => new eventHttp.HttpError(404, 'Resource Not Found'),
|
|
238
238
|
targetPath: '',
|
|
239
|
-
handlerType: '
|
|
239
|
+
handlerType: '__SYSTEM__',
|
|
240
240
|
})();
|
|
241
|
-
if (!response) {
|
|
242
|
-
throw new eventHttp.HttpError(404, 'Resource Not Found');
|
|
243
|
-
}
|
|
244
|
-
return response;
|
|
245
241
|
}
|
|
246
242
|
onInit(moost) {
|
|
247
243
|
this.moost = moost;
|
package/dist/index.d.ts
CHANGED
|
@@ -276,7 +276,7 @@ declare class MoostHttp implements TMoostAdapter<THttpHandlerMeta> {
|
|
|
276
276
|
POST?: TProstoRouterPathBuilder<Record<string, string | string[]>>;
|
|
277
277
|
DELETE?: TProstoRouterPathBuilder<Record<string, string | string[]>>;
|
|
278
278
|
}>;
|
|
279
|
-
onNotFound(): Promise<
|
|
279
|
+
onNotFound(): Promise<unknown>;
|
|
280
280
|
protected moost?: Moost;
|
|
281
281
|
onInit(moost: Moost): void;
|
|
282
282
|
getProvideRegistry(): moost.TProvideRegistry;
|
package/dist/index.mjs
CHANGED
|
@@ -229,18 +229,14 @@ class MoostHttp {
|
|
|
229
229
|
return this.httpApp.listen(port, hostname, backlog, listeningListener);
|
|
230
230
|
}
|
|
231
231
|
async onNotFound() {
|
|
232
|
-
|
|
232
|
+
return defineMoostEventHandler({
|
|
233
233
|
loggerTitle: LOGGER_TITLE,
|
|
234
234
|
getIterceptorHandler: () => this.moost?.getGlobalInterceptorHandler(),
|
|
235
235
|
getControllerInstance: () => this.moost,
|
|
236
|
-
callControllerMethod: () =>
|
|
236
|
+
callControllerMethod: () => new HttpError(404, 'Resource Not Found'),
|
|
237
237
|
targetPath: '',
|
|
238
|
-
handlerType: '
|
|
238
|
+
handlerType: '__SYSTEM__',
|
|
239
239
|
})();
|
|
240
|
-
if (!response) {
|
|
241
|
-
throw new HttpError(404, 'Resource Not Found');
|
|
242
|
-
}
|
|
243
|
-
return response;
|
|
244
240
|
}
|
|
245
241
|
onInit(moost) {
|
|
246
242
|
this.moost = moost;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moostjs/event-http",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.14",
|
|
4
4
|
"description": "@moostjs/event-http",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"homepage": "https://github.com/moostjs/moostjs/tree/main/packages/event-http#readme",
|
|
39
39
|
"peerDependencies": {},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"moost": "0.4.
|
|
42
|
-
"@wooksjs/event-core": "^0.5.
|
|
43
|
-
"@wooksjs/event-http": "^0.5.
|
|
44
|
-
"@wooksjs/http-body": "^0.5.
|
|
41
|
+
"moost": "0.4.14",
|
|
42
|
+
"@wooksjs/event-core": "^0.5.12",
|
|
43
|
+
"@wooksjs/event-http": "^0.5.12",
|
|
44
|
+
"@wooksjs/http-body": "^0.5.12",
|
|
45
45
|
"@prostojs/infact": "^0.2.3",
|
|
46
46
|
"@prostojs/router": "^0.2.1"
|
|
47
47
|
}
|