catalog/catalog_application library

Classes

TemplateValues
Values for the template variables in catalog metadata.

Enums

PubspecRole
Which pubspec the catalog is applied to.

Constants

catalogMarker → const String
The inline comment that marks a dependency managed by the catalog.

Functions

applyCatalog(String pubspec, {required Catalog catalog, required PubspecRole role, required TemplateValues values}) → String
Applies catalog to the text of one pubspec and returns the new text.
inlineCommentStart(String line) → int?
The index of the # that starts an inline comment in line, ignoring # inside quotes and # not preceded by whitespace.
markCatalogDependencies(String pubspec, Set<String> managed) → String
Adds catalogMarker to every block-style dependency entry whose package is in managed, and removes it from the others. An existing inline comment on a managed entry is replaced by the marker.