@diagramers/cli
Version:
Diagramers CLI - Command-line tools for managing Diagramers projects
29 lines • 1.32 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateCommand = updateCommand;
const template_updater_1 = require("../services/template-updater");
const chalk_1 = __importDefault(require("chalk"));
function updateCommand(program) {
program
.command('update')
.description('Update existing project with latest template features')
.option('-f, --force', 'Force update even if conflicts detected')
.option('-b, --backup', 'Create backup before updating')
.action(async (options) => {
try {
console.log(chalk_1.default.blue('🔄 Checking for template updates...'));
const updater = new template_updater_1.TemplateUpdater();
await updater.update(options);
console.log(chalk_1.default.green('✅ Project updated successfully!'));
console.log(chalk_1.default.yellow('📝 Review the changes and test your application'));
}
catch (error) {
console.error(chalk_1.default.red(`❌ Failed to update project: ${error.message}`));
process.exit(1);
}
});
}
//# sourceMappingURL=update.js.map