|
2 | 2 |
|
3 | 3 | import { LaunchpadCore } from './lib/launchpad-core.js';
|
4 | 4 | import { launchFromCli } from '@bluecadet/launchpad-utils';
|
| 5 | +import { launch as launchScaffold } from '@bluecadet/launchpad-scaffold'; |
| 6 | +import LaunchpadMonitor from '@bluecadet/launchpad-monitor'; |
5 | 7 | export { defineConfig } from './lib/launchpad-options.js';
|
6 | 8 |
|
7 | 9 | export default LaunchpadCore;
|
@@ -46,33 +48,33 @@ launchFromCli(import.meta, {
|
46 | 48 | return argv;
|
47 | 49 | }
|
48 | 50 | }).then(async config => {
|
49 |
| - // const launchpad = new LaunchpadCore(config); |
| 51 | + const launchpad = new LaunchpadCore(config); |
50 | 52 |
|
51 |
| - // switch (config.startupCommand) { |
52 |
| - // case StartupCommands.SCAFFOLD: { |
53 |
| - // await launchScaffold(config); |
54 |
| - // break; |
55 |
| - // } |
56 |
| - // case StartupCommands.CONTENT: { |
57 |
| - // await launchpad.updateContent(); |
58 |
| - // await launchpad.shutdown(); |
59 |
| - // break; |
60 |
| - // } |
61 |
| - // case StartupCommands.MONITOR: { |
62 |
| - // await launchpad.startApps(); |
63 |
| - // break; |
64 |
| - // } |
65 |
| - // case StartupCommands.STOP: { |
66 |
| - // await launchpad.stopApps(); |
67 |
| - // await LaunchpadMonitor.kill(); |
68 |
| - // break; |
69 |
| - // } |
70 |
| - // case StartupCommands.START: |
71 |
| - // default: { |
72 |
| - // await launchpad.startup(); |
73 |
| - // break; |
74 |
| - // } |
75 |
| - // } |
| 53 | + switch (config.startupCommand) { |
| 54 | + case StartupCommands.SCAFFOLD: { |
| 55 | + await launchScaffold(config); |
| 56 | + break; |
| 57 | + } |
| 58 | + case StartupCommands.CONTENT: { |
| 59 | + await launchpad.updateContent(); |
| 60 | + await launchpad.shutdown(); |
| 61 | + break; |
| 62 | + } |
| 63 | + case StartupCommands.MONITOR: { |
| 64 | + await launchpad.startApps(); |
| 65 | + break; |
| 66 | + } |
| 67 | + case StartupCommands.STOP: { |
| 68 | + await launchpad.stopApps(); |
| 69 | + await LaunchpadMonitor.kill(); |
| 70 | + break; |
| 71 | + } |
| 72 | + case StartupCommands.START: |
| 73 | + default: { |
| 74 | + await launchpad.startup(); |
| 75 | + break; |
| 76 | + } |
| 77 | + } |
76 | 78 | }).catch(err => {
|
77 | 79 | if (err) {
|
78 | 80 | console.error('Launch error', err);
|
|
0 commit comments