UNPKG

@elsikora/setup-wizard

Version:

Setup Wizard - CLI scaffolding utility

27 lines (24 loc) 988 B
#!/usr/bin/env node import { COMMAND_FLAG_CONFIG } from '../constant/command-flag-config.constant.js'; /** * Mapper for command options processing. * Provides utility functions for transforming command-line flags to module configurations. */ const CommandOptionsMapper = { /** * Converts command-line flags to module enable status properties. * Maps each flag to its corresponding module and sets the enable status. * @param properties - Record of flag names to boolean values * @returns Object with module keys mapped to their enabled status */ fromFlagToModule(properties) { const commandProperties = {}; for (const [module, config] of Object.entries(COMMAND_FLAG_CONFIG)) { const moduleKey = module; commandProperties[moduleKey] = properties[config.fullFlag] || false; } return commandProperties; }, }; export { CommandOptionsMapper }; //# sourceMappingURL=command-options.mapper.js.map