Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

CommandUpToDateCheck Properties

ClassProperties4 members
Declares the inputs, outputs, and stamp file that let the CLI skip a command whose work is already done.
FileExtensionsSection titled FileExtensionsnullablestring[]?
Gets the file extensions, including the leading dot, that identify input files. Null or empty means every file found under CommandUpToDateCheck.Inputs counts.
public string[]? FileExtensions { get; init; }
Restricting by extension is what keeps a command's own outputs from invalidating it when they land beside its inputs — .class files written next to the .java files they were compiled from, for example.
InputsSection titled Inputsstring[]
Gets the inputs to compare against the stamp file, relative to the working directory unless absolute. Supports the same placeholders as CommandSpec.Args.
public string[] Inputs { get; init; }
An entry is either a file, a directory, or a directory suffixed with /**. A plain directory is scanned one level deep; only the /** form recurses. That distinction is what keeps the check cheap: the AppHost directory can be declared as an input for the sources that sit beside the AppHost without walking sibling trees such as node_modules. Entries that do not exist are ignored, so a spec can name a path that only some layouts have.
OutputsSection titled Outputsnullablestring[]?
Gets the outputs that must exist for the command to be considered up to date, relative to the working directory unless absolute. Supports the same placeholders as CommandSpec.Args. Null or empty preserves the stamp-and-input-only behavior of older runtime specifications.
public string[]? Outputs { get; init; }
Gets the file, relative to the working directory unless absolute, written after the command succeeds and compared against the inputs on the next launch.
public string StampFile { get; init; }
Place this with the command's outputs so that deleting them — mvn clean, or removing the class output directory — also invalidates the check.