@moostjs/event-http 0.4.12 → 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 +4 -6
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -6
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -230,17 +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: '__SYSTEM__',
|
|
239
240
|
})();
|
|
240
|
-
if (!response) {
|
|
241
|
-
throw new eventHttp.HttpError(404, 'Resource Not Found');
|
|
242
|
-
}
|
|
243
|
-
return response;
|
|
244
241
|
}
|
|
245
242
|
onInit(moost) {
|
|
246
243
|
this.moost = moost;
|
|
@@ -275,6 +272,7 @@ class MoostHttp {
|
|
|
275
272
|
},
|
|
276
273
|
},
|
|
277
274
|
targetPath,
|
|
275
|
+
handlerType: handler.type,
|
|
278
276
|
});
|
|
279
277
|
const routerBinding = this.httpApp.on(handler.method, targetPath, fn);
|
|
280
278
|
const { getPath: pathBuilder } = routerBinding;
|
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,17 +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: '__SYSTEM__',
|
|
238
239
|
})();
|
|
239
|
-
if (!response) {
|
|
240
|
-
throw new HttpError(404, 'Resource Not Found');
|
|
241
|
-
}
|
|
242
|
-
return response;
|
|
243
240
|
}
|
|
244
241
|
onInit(moost) {
|
|
245
242
|
this.moost = moost;
|
|
@@ -274,6 +271,7 @@ class MoostHttp {
|
|
|
274
271
|
},
|
|
275
272
|
},
|
|
276
273
|
targetPath,
|
|
274
|
+
handlerType: handler.type,
|
|
277
275
|
});
|
|
278
276
|
const routerBinding = this.httpApp.on(handler.method, targetPath, fn);
|
|
279
277
|
const { getPath: pathBuilder } = routerBinding;
|
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
|
}
|