run method
Runs this command.
The return value is wrapped in a Future if necessary and returned by
CommandRunner.runCommand.
Implementation
@override
void run() async {
try {
// Validate inputs
if (!_validateInputs()) return;
// Prepare configuration
final config = _prepareConfiguration();
// Execute generation
final success = await _executeGeneration(config);
if (success) {
_reportSuccess(config.pageName, config.featureName);
}
} catch (e, stackTrace) {
StatusHelper.failed(
'Template test generation failed: $e',
suggestion: 'Check your configuration and try again',
examples: [
'morpheme template-test --help',
'morpheme generate template-test --feature-name <feature> --page-name <page>',
],
);
print('Stack trace: $stackTrace');
}
}