validateWithProfileSources function
Future<ProfileValidationResult>
validateWithProfileSources(
- String bundle, {
- String? configPath,
- String? projectRoot,
- required WayfinderProfileResolver resolver,
- bool fix = false,
The validation the CLI and MCP server share: resolver's selection for
bundle, then ProfileValidator.validate. When no Profile is selected,
it first restores package files the cache lacks out of the existing
Profile mirrors (WayfinderProfileResolver.restoreCachedPackages) and
selects again, so a cache Wayfinder 0.2 wrote validates as it did. That
runs git show through the resolver's runner and never fetches; with a
complete cache, validation runs no Git. It writes nothing in the project
beyond what fix writes in bundle. configPath and projectRoot
bind bundle as WayfinderProfileResolver.select does.
Implementation
Future<ProfileValidationResult> validateWithProfileSources(
String bundle, {
String? configPath,
String? projectRoot,
required WayfinderProfileResolver resolver,
bool fix = false,
}) async => const ProfileValidator().validate(
bundle,
await selectWithProfileSources(
bundle,
configPath: configPath,
projectRoot: projectRoot,
resolver: resolver,
),
fix: fix,
);