run method

  1. @override
Future run()
override

Runs this command.

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

Implementation

@override
Future run() async {
  var secret = rs.randomAlphaNumeric(32);
  print('Generated new development JWT secret: $secret');
  await changeSecret(File('config/default.yaml'), secret);

  secret = rs.randomAlphaNumeric(32);
  print('Generated new production JWT secret: $secret');
  await changeSecret(File('config/production.yaml'), secret);
}