locadot 1.5.1 → 1.5.2

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.js CHANGED
@@ -21,23 +21,31 @@ program
21
21
  .requiredOption("-p, --port <port>", "Local port to forward to")
22
22
  .action(async (options) => {
23
23
  await commands_1.default.add(options);
24
+ process.exit(0);
24
25
  });
25
26
  program
26
27
  .command("update")
27
28
  .requiredOption("-h, --host <host>", "Domain to map must be ends with localhost. Example: dev.localhost, localhost, test.localhost, etc.")
28
29
  .requiredOption("-p, --port <port>", "Local port to forward to")
29
30
  .description("Update a domain")
30
- .action(async (options) => await commands_1.default.update(options));
31
+ .action(async (options) => {
32
+ await commands_1.default.update(options);
33
+ process.exit(0);
34
+ });
31
35
  program
32
36
  .command("remove")
33
37
  .requiredOption("-h, --host <host>", "Host must ends with localhost. Example: dev.localhost, localhost, test.localhost, etc.")
34
38
  .description("Remove a domain")
35
- .action(async (options) => await commands_1.default.remove(options));
39
+ .action(async (options) => {
40
+ await commands_1.default.remove(options);
41
+ process.exit(0);
42
+ });
36
43
  program
37
44
  .command("host")
38
45
  .description("Show all hosts")
39
- .action(() => {
40
- commands_1.default.getRegistry();
46
+ .action(async () => {
47
+ await commands_1.default.getRegistry();
48
+ process.exit(0);
41
49
  });
42
50
  program
43
51
  .command("watch:logs")
@@ -48,38 +56,44 @@ program
48
56
  program
49
57
  .command("clear:logs")
50
58
  .description("Clear logs")
51
- .action(() => {
52
- commands_1.default.clearLogs();
59
+ .action(async () => {
60
+ await commands_1.default.clearLogs();
61
+ process.exit(0);
53
62
  });
54
63
  program
55
64
  .command("clear:hosts")
56
65
  .description("Clear all host file.")
57
- .action(() => {
58
- commands_1.default.clearHosts();
66
+ .action(async () => {
67
+ await commands_1.default.clearHosts();
68
+ process.exit(0);
59
69
  });
60
70
  program
61
71
  .command("path")
62
72
  .description("Show configuration paths.")
63
73
  .action(() => {
64
74
  commands_1.default.configPath();
75
+ process.exit(0);
65
76
  });
66
77
  program
67
78
  .command("path:logs")
68
79
  .description("Show logs path file.")
69
80
  .action(() => {
70
81
  commands_1.default.logPath();
82
+ process.exit(0);
71
83
  });
72
84
  program
73
85
  .command("path:hosts")
74
86
  .description("Show hosts path file.")
75
- .action(() => {
76
- commands_1.default.hostPath();
87
+ .action(async () => {
88
+ await commands_1.default.hostPath();
89
+ process.exit(0);
77
90
  });
78
91
  program
79
92
  .command("restart")
80
93
  .description("Restart locadot")
81
- .action(() => {
82
- commands_1.default.restart();
94
+ .action(async () => {
95
+ await commands_1.default.restart();
96
+ process.exit(0);
83
97
  });
84
98
  program
85
99
  .command("stop")
@@ -88,9 +88,9 @@ class Commands {
88
88
  }
89
89
  catch (error) { }
90
90
  }
91
- static clearLogs() {
91
+ static async clearLogs() {
92
92
  try {
93
- locadot_file_1.default.clearLogs();
93
+ await locadot_file_1.default.clearLogs();
94
94
  console.log("☑️ Logs successfully cleared.");
95
95
  }
96
96
  catch (error) { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "locadot",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "Secure your local development environment with HTTPS and custom domains like dev.localhost.",
5
5
  "homepage": "https://www.npmjs.com/package/locadot",
6
6
  "main": "dist/index.js",