no-migration
Version:
CLI tool to manage migration changes and user changes separately for React Native miniapp projects
29 lines • 1.24 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 chalk_1 = __importDefault(require("chalk"));
const child_process_1 = require("child_process");
const util_1 = require("util");
const execAsync = (0, util_1.promisify)(child_process_1.exec);
async function updateCommand() {
try {
console.log(chalk_1.default.blue('🔄 Updating momo-migration and momo-cli...'));
const command = 'npm add -g @momo-platform/momo-migration@latest @momo-platform/momo-cli@latest --force';
console.log(chalk_1.default.cyan(`Running: ${command}`));
const { stdout, stderr } = await execAsync(command);
if (stdout)
console.log(stdout);
if (stderr && !stderr.includes('npm WARN')) {
console.error(stderr);
}
console.log(chalk_1.default.green('✅ Update completed successfully!'));
}
catch (error) {
console.error(chalk_1.default.red('❌ Error during update:'), error.message);
process.exit(1);
}
}
//# sourceMappingURL=update.js.map