@webtypen/webframez-core 0.0.48 → 0.0.51

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.
@@ -51,7 +51,11 @@ class ConsoleApplication {
51
51
  }
52
52
  consoleCommand.action(() => __awaiter(this, void 0, void 0, function* () {
53
53
  const service = yield new command();
54
- return yield service.handle();
54
+ const result = yield service.handle();
55
+ if (options && options.onEnd) {
56
+ yield options.onEnd(command.signature);
57
+ }
58
+ return result;
55
59
  }));
56
60
  program.addCommand(consoleCommand);
57
61
  }
@@ -397,6 +397,9 @@ class RouterFacade {
397
397
  }
398
398
  // Set Controller method as route-component
399
399
  const controllerInstance = new controller();
400
+ if (!controllerInstance || !split || !split[1] || !controllerInstance[split[1]]) {
401
+ throw new Error("controllerInstance " + split[1] + " not found ...");
402
+ }
400
403
  route.component = controllerInstance[split[1]].bind(controllerInstance);
401
404
  }
402
405
  if (route && route.component !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtypen/webframez-core",
3
- "version": "0.0.48",
3
+ "version": "0.0.51",
4
4
  "description": "The core package of the typescript based webframez (web-framework) by webtypen.de",
5
5
  "homepage": "https://webtypen.de/",
6
6
  "license": "MIT",
@@ -45,7 +45,12 @@ export class ConsoleApplication {
45
45
  }
46
46
  consoleCommand.action(async () => {
47
47
  const service = await new command();
48
- return await service.handle();
48
+ const result = await service.handle();
49
+
50
+ if (options && options.onEnd) {
51
+ await options.onEnd(command.signature);
52
+ }
53
+ return result;
49
54
  });
50
55
  program.addCommand(consoleCommand);
51
56
  }
@@ -467,9 +467,12 @@ class RouterFacade {
467
467
 
468
468
  return;
469
469
  }
470
-
470
+
471
471
  // Set Controller method as route-component
472
472
  const controllerInstance = new controller();
473
+ if (!controllerInstance || !split || !split[1] || !controllerInstance[split[1]]) {
474
+ throw new Error("controllerInstance " + split[1] + " not found ...");
475
+ }
473
476
  route.component = controllerInstance[split[1]].bind(controllerInstance);
474
477
  }
475
478