CreateCommand constructor

CreateCommand({
  1. DoctorProbe? doctorProbe,
  2. RecipeLock? recipeLock,
  3. Catalog? catalog,
  4. StagePlan? stagePlan,
  5. PlanStore? planStore,
  6. WizardIo wizardIo = const ConsoleWizardIo(),
  7. Clock? clock,
  8. HeartbeatStarter? heartbeatStarter,
  9. bool isCancelled()?,
  10. void out(
    1. String
    )?,
  11. void diagnostics(
    1. String
    )?,
  12. ProcessRunner? processRunner,
  13. AppliedHistoryStore? historyStore,
  14. ProjectValidator? validate,
  15. void releaseStaging(
    1. String
    )?,
  16. InputReader? inputReader,
  17. String? sessionLockBaseDir,
})

Implementation

CreateCommand({
  this.doctorProbe,
  this.recipeLock,
  this.catalog,
  StagePlan? stagePlan,
  PlanStore? planStore,
  this.wizardIo = const ConsoleWizardIo(),
  Clock? clock,
  HeartbeatStarter? heartbeatStarter,
  bool Function()? isCancelled,
  void Function(String)? out,
  void Function(String)? diagnostics,
  ProcessRunner? processRunner,
  AppliedHistoryStore? historyStore,
  ProjectValidator? validate,
  void Function(String)? releaseStaging,
  InputReader? inputReader,
  this.sessionLockBaseDir,
}) : stagePlan = stagePlan ?? Stager().stage,
     planStore = planStore ?? PlanStore(),
     clock = clock ?? DateTime.now,
     heartbeatStarter = heartbeatStarter ?? _startHeartbeat,
     out = out ?? stdout.writeln,
     diagnostics = diagnostics ?? stderr.writeln,
     processRunner = processRunner ?? const ProcessRunner(),
     historyStore =
         historyStore ??
         AppliedHistoryStore(baseDir: (planStore ?? PlanStore()).baseDir),
     validate =
         validate ??
         ((root, commands) =>
             validateProject(projectRoot: root, commands: commands)),
     releaseStagingCallback = releaseStaging ?? _releaseStaging,
     inputReader = inputReader ?? stdin.readLineSync,
     _watchSigint = isCancelled == null {
  this.isCancelled = isCancelled ?? () => _interrupted;
  argParser
    ..addFlag(
      'plan',
      negatable: false,
      help: 'Stop after saving a reviewable plan.',
    )
    ..addFlag('non-interactive', negatable: false)
    ..addOption('output', allowed: ['text', 'json'], defaultsTo: 'text')
    ..addOption('description')
    ..addOption('organization')
    ..addOption('destination')
    ..addMultiOption('platform', help: 'Target platform; repeat as needed.')
    ..addOption('git', allowed: ['yes', 'no'])
    ..addOption('validation-profile', allowed: ['standard'])
    ..addOption(
      'config',
      help: 'Versioned YAML config file resolving directly to a Blueprint.',
    );
}