SipRunner constructor

SipRunner({
  1. required ScriptsYaml scriptsYaml,
  2. required PubspecLock pubspecLock,
  3. required PubspecYaml pubspecYaml,
  4. required Variables variables,
  5. required Bindings bindings,
  6. required FindFile findFile,
  7. required FileSystem fs,
  8. required CWD cwd,
  9. required PubUpdater pubUpdater,
  10. required Logger logger,
})

Implementation

SipRunner({
  required ScriptsYaml scriptsYaml,
  required PubspecLock pubspecLock,
  required PubspecYaml pubspecYaml,
  required Variables variables,
  required Bindings bindings,
  required FindFile findFile,
  required FileSystem fs,
  required CWD cwd,
  required PubUpdater pubUpdater,
  required this.logger,
}) : super(
        'sip',
        'A command line application to handle mono-repos in dart',
      ) {
  argParser
    ..addFlag(
      'version',
      negatable: false,
      help: 'Print the current version',
    )
    ..addFlag(
      'loud',
      negatable: false,
      hide: true,
      help: 'Prints verbose output',
    )
    ..addFlag(
      'quiet',
      negatable: false,
      hide: true,
      help: 'Prints no output',
    )
    ..addFlag(
      'version-check',
      defaultsTo: true,
      help: 'Checks for the latest version of sip_cli',
    );

  addCommand(
    ScriptRunCommand(
      scriptsYaml: scriptsYaml,
      variables: variables,
      bindings: bindings,
      logger: logger,
      cwd: cwd,
    ),
  );
  addCommand(
    PubCommand(
      pubspecLock: pubspecLock,
      pubspecYaml: pubspecYaml,
      findFile: findFile,
      fs: fs,
      logger: logger,
      bindings: bindings,
    ),
  );
  addCommand(
    CleanCommand(
      pubspecYaml: pubspecYaml,
      pubspecLock: pubspecLock,
      findFile: findFile,
      bindings: bindings,
      logger: logger,
      cwd: cwd,
    ),
  );
  addCommand(
    ListCommand(
      scriptsYaml: scriptsYaml,
      logger: logger,
    ),
  );
  addCommand(
    updateCommand = UpdateCommand(
      pubUpdater: pubUpdater,
      logger: logger,
    ),
  );
  addCommand(
    TestCommand(
      pubspecYaml: pubspecYaml,
      pubspecLock: pubspecLock,
      findFile: findFile,
      bindings: bindings,
      fs: fs,
      logger: logger,
      keyPressListener: KeyPressListener(logger: logger),
    ),
  );
}