run method

  1. @override
void run()
override

Runs this command.

The return value is wrapped in a Future if necessary and returned by CommandRunner.runCommand.

Implementation

@override
void run() async {
  final results = argResults!;
  final input = results.rest.map((e) => e.replaceAll('"', '').trim());

  if (input.isEmpty) return stdout.writeln('Domains are empty.');
  if (input.any((e) => e.split('.').length != 2)) {
    return stdout.writeln('Invalid domains');
  }

  final spinner = Spinner('Heating up...');

  if (stdout.hasTerminal) spinner.start();

  checkDomainsWithCLI(input, spinner: spinner);
}