roku-pkg-cli
Version:
A comprehensive CLI tool for managing multiple Roku projects with automated device discovery, build integration, and package generation. Perfect for CI/CD pipelines with full automation support.
47 lines (46 loc) • 2.01 kB
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.listCommand = listCommand;
const config_manager_1 = require("../lib/config-manager");
const chalk_1 = __importDefault(require("chalk"));
function listCommand(program) {
program
.command('list')
.description('List all configured projects')
.action(() => {
const configManager = new config_manager_1.ConfigManager();
const projects = configManager.getProjects();
const device = configManager.getRokuDevice();
// Show device info
console.log(chalk_1.default.bold('\n📺 Roku Device:'));
if (device.ip) {
console.log(` IP: ${chalk_1.default.cyan(device.ip)}`);
console.log(` Password: ${chalk_1.default.gray('****')}\n`);
}
else {
console.log(chalk_1.default.yellow(' Not configured\n'));
}
// Show projects
console.log(chalk_1.default.bold('📦 Projects:'));
if (projects.length === 0) {
console.log(chalk_1.default.yellow(' No projects configured yet.\n'));
return;
}
projects.forEach((project, index) => {
console.log(`\n${index + 1}. ${chalk_1.default.green(project.name)}`);
if (project.rootDir) {
console.log(` Root Dir: ${chalk_1.default.gray(project.rootDir)}`);
}
else {
console.log(` Root Dir: ${chalk_1.default.red('Not configured')}`);
}
console.log(` Sign Key: ${chalk_1.default.gray(project.signKey.substring(0, 8) + '...')}`);
console.log(` Package: ${chalk_1.default.gray(project.signPackageLocation)}`);
console.log(` Output: ${chalk_1.default.gray(project.outputLocation)}`);
});
console.log();
});
}