@interopio/desktop-cli
Version:
CLI tool for setting up, building and packaging io.Connect Desktop projects
62 lines • 2.15 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.appsCommand = void 0;
const commander_1 = require("commander");
const logger_1 = require("../utils/logger");
const error_handler_1 = require("../utils/error.handler");
const app_service_1 = require("../services/app.service");
const logger = logger_1.Logger.getInstance();
exports.appsCommand = new commander_1.Command('apps')
.description('Application management commands');
exports.appsCommand
.command('install')
.description('Install all template applications')
.option('--verbose', 'Enable verbose logging')
.action(async (options) => {
try {
if (options.verbose) {
logger.setVerbose(true);
}
logger.info('Installing dependencies for template applications...');
const appService = new app_service_1.AppService();
await appService.installAllApps();
logger.info('All template application dependencies installed successfully!');
}
catch (error) {
error_handler_1.ErrorHandler.handle(error);
}
});
exports.appsCommand
.command('build')
.description('Build all template applications and copy them to modifications')
.option('--verbose', 'Enable verbose logging')
.action(async (options) => {
try {
if (options.verbose) {
logger.setVerbose(true);
}
logger.debug('Building template applications...');
const appService = new app_service_1.AppService();
await appService.buildAllApps();
}
catch (error) {
error_handler_1.ErrorHandler.handle(error);
}
});
exports.appsCommand
.command('start')
.description('Start all template applications in development mode')
.option('--verbose', 'Enable verbose logging')
.action(async (options) => {
try {
if (options.verbose) {
logger.setVerbose(true);
}
const appService = new app_service_1.AppService();
await appService.startAllAppsInDevMode();
}
catch (error) {
error_handler_1.ErrorHandler.handle(error);
}
});
//# sourceMappingURL=apps.command.js.map