@webtypen/webframez-core 0.1.7 → 0.1.9

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.
@@ -64,7 +64,9 @@ class ConsoleCommand {
64
64
  resolve(answer);
65
65
  });
66
66
  }
67
- resolve(null);
67
+ else {
68
+ resolve(null);
69
+ }
68
70
  });
69
71
  return result;
70
72
  });
@@ -51,7 +51,7 @@ class ConsoleApplication {
51
51
  }
52
52
  consoleCommand.action(() => __awaiter(this, void 0, void 0, function* () {
53
53
  const service = yield new command();
54
- const result = yield service.handle();
54
+ const result = yield service.handleSystem();
55
55
  if (options && options.onEnd) {
56
56
  yield options.onEnd(command.signature);
57
57
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtypen/webframez-core",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
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",
@@ -48,8 +48,9 @@ export class ConsoleCommand {
48
48
  this.rl.question(question, (answer) => {
49
49
  resolve(answer);
50
50
  });
51
+ } else {
52
+ resolve(null);
51
53
  }
52
- resolve(null);
53
54
  });
54
55
  return result;
55
56
  }
@@ -3,59 +3,59 @@ import { Config } from "./Config";
3
3
  import { BuildFinishCommand } from "./Commands/BuildFinishCommand";
4
4
 
5
5
  export class ConsoleApplication {
6
- /**
7
- * Init the routes and start the http-server
8
- */
9
- boot(options?: any) {
10
- if (options && options.config) {
11
- for (let key in options.config) {
12
- Config.register(key, options.config[key]);
13
- }
14
- }
6
+ /**
7
+ * Init the routes and start the http-server
8
+ */
9
+ boot(options?: any) {
10
+ if (options && options.config) {
11
+ for (let key in options.config) {
12
+ Config.register(key, options.config[key]);
13
+ }
14
+ }
15
15
 
16
- const program = new Command();
17
- program.name("webframez console").description("CLI to some JavaScript string utilities").version("0.0.1");
18
-
19
- const systemCommands = [BuildFinishCommand];
20
- for (let command of systemCommands) {
21
- if (!command.signature) {
22
- continue;
23
- }
24
-
25
- const consoleCommand = new Command(command.signature);
26
- if (command.description && command.description.trim() !== "") {
27
- consoleCommand.description(command.description);
28
- }
29
- consoleCommand.action(async () => {
30
- const service = await new command();
31
- return await service.handleSystem();
32
- });
33
- program.addCommand(consoleCommand);
34
- }
16
+ const program = new Command();
17
+ program.name("webframez console").description("CLI to some JavaScript string utilities").version("0.0.1");
18
+
19
+ const systemCommands = [BuildFinishCommand];
20
+ for (let command of systemCommands) {
21
+ if (!command.signature) {
22
+ continue;
23
+ }
35
24
 
36
- if (options && options.kernel && options.kernel.commands && options.kernel.commands.length > 0) {
37
- for (let command of options.kernel.commands) {
38
- if (!command.signature) {
39
- continue;
25
+ const consoleCommand = new Command(command.signature);
26
+ if (command.description && command.description.trim() !== "") {
27
+ consoleCommand.description(command.description);
28
+ }
29
+ consoleCommand.action(async () => {
30
+ const service = await new command();
31
+ return await service.handleSystem();
32
+ });
33
+ program.addCommand(consoleCommand);
40
34
  }
41
35
 
42
- const consoleCommand = new Command(command.signature);
43
- if (command.description && command.description.trim() !== "") {
44
- consoleCommand.description(command.description);
36
+ if (options && options.kernel && options.kernel.commands && options.kernel.commands.length > 0) {
37
+ for (let command of options.kernel.commands) {
38
+ if (!command.signature) {
39
+ continue;
40
+ }
41
+
42
+ const consoleCommand = new Command(command.signature);
43
+ if (command.description && command.description.trim() !== "") {
44
+ consoleCommand.description(command.description);
45
+ }
46
+ consoleCommand.action(async () => {
47
+ const service = await new command();
48
+ const result = await service.handleSystem();
49
+
50
+ if (options && options.onEnd) {
51
+ await options.onEnd(command.signature);
52
+ }
53
+ return result;
54
+ });
55
+ program.addCommand(consoleCommand);
56
+ }
45
57
  }
46
- consoleCommand.action(async () => {
47
- const service = await new command();
48
- const result = await service.handle();
49
-
50
- if (options && options.onEnd) {
51
- await options.onEnd(command.signature);
52
- }
53
- return result;
54
- });
55
- program.addCommand(consoleCommand);
56
- }
57
- }
58
58
 
59
- program.parse();
60
- }
59
+ program.parse();
60
+ }
61
61
  }