CreateCommand constructor
CreateCommand({
- DoctorProbe? doctorProbe,
- RecipeLock? recipeLock,
- Catalog? catalog,
- StagePlan? stagePlan,
- PlanStore? planStore,
- WizardIo wizardIo = const ConsoleWizardIo(),
- Clock? clock,
- HeartbeatStarter? heartbeatStarter,
- bool isCancelled()?,
- void out()?,
- void diagnostics()?,
- ProcessRunner? processRunner,
- AppliedHistoryStore? historyStore,
- ProjectValidator? validate,
- void releaseStaging()?,
- InputReader? inputReader,
- 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.',
);
}