SipRunner constructor

SipRunner({
  1. required List<String> ogArgs,
  2. required ScriptsYaml scriptsYaml,
  3. required PubspecLock pubspecLock,
  4. required PubspecYaml pubspecYaml,
  5. required Variables variables,
  6. required Bindings bindings,
  7. required FindFile findFile,
  8. required FileSystem fs,
  9. required CWD cwd,
  10. required PubUpdater pubUpdater,
  11. required RunOneScript runOneScript,
  12. required RunManyScripts runManyScripts,
  13. required KeyPressListener keyPressListener,
  14. required Logger logger,
})

Implementation

SipRunner({
  required this.ogArgs,
  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 RunOneScript runOneScript,
  required RunManyScripts runManyScripts,
  required KeyPressListener keyPressListener,
  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,
      runManyScripts: runManyScripts,
      runOneScript: runOneScript,
    ),
  );
  addCommand(
    PubCommand(
      pubspecLock: pubspecLock,
      pubspecYaml: pubspecYaml,
      findFile: findFile,
      fs: fs,
      logger: logger,
      bindings: bindings,
      scriptsYaml: scriptsYaml,
      runManyScripts: runManyScripts,
      runOneScript: runOneScript,
    ),
  );
  addCommand(
    CleanCommand(
      pubspecYaml: pubspecYaml,
      pubspecLock: pubspecLock,
      findFile: findFile,
      bindings: bindings,
      logger: logger,
      cwd: cwd,
      scriptsYaml: scriptsYaml,
      runManyScripts: runManyScripts,
      runOneScript: runOneScript,
    ),
  );
  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,
      scriptsYaml: scriptsYaml,
      runManyScripts: runManyScripts,
      runOneScript: runOneScript,
    ),
  );
}