@mondaycom/apps-cli
Version:
A cli tool to manage apps (and monday-code projects) in monday.com
12 lines (11 loc) • 620 B
JavaScript
import { toConfiguredId, toStandardizedId } from '@oclif/core';
import { PromptService } from '../services/prompt-service.js';
const hook = async function ({ config, matches, argv }) {
const possibleCommands = matches.map(p => toConfiguredId(p.id, config));
const command = await PromptService.promptList('Which of these commands would you like to run?', possibleCommands);
if (argv.includes('--help') || argv.includes('-h')) {
return config.runCommand('help', [toStandardizedId(command, config)]);
}
return config.runCommand(toStandardizedId(command, config), argv);
};
export default hook;