loadCatalog function
Loads the Capability Catalog shipped with this package (R-201), mirroring
loadRecipeLock's offline, deterministic two-tier resolution: the real
file when running from source (dart run/dart test), the embedded
catalogYaml constant once compiled to a standalone executable where no
.dart_tool/package_config.json exists to resolve against.
Implementation
Future<Catalog> loadCatalog([String? path]) async {
final content = path == null
? await _shippedCatalog()
: await File(path).readAsString();
return _parseCatalogYaml(content);
}