swh.lister.bower.lister module#

class swh.lister.bower.lister.BowerLister(scheduler: SchedulerInterface, url: str = 'https://registry.bower.io/packages', instance: str = 'bower', credentials: Dict[str, Dict[str, List[Dict[str, str]]]] | None = None, max_origins_per_page: int | None = None, max_pages: int | None = None, enable_origins: bool = True)[source]#

Bases: StatelessLister[List[Dict[str, str]]]

List Bower (Javascript package manager) origins.

LISTER_NAME: str = 'bower'#
VISIT_TYPE = 'git'#
INSTANCE = 'bower'#
API_URL = 'https://registry.bower.io/packages'#
get_pages() Iterator[List[Dict[str, str]]][source]#

Yield an iterator which returns ‘page’

It uses the api endpoint provided by https://registry.bower.io/packages to get a list of package names with an origin url that corresponds to Git repository.

There is only one page that list all origins urls.

get_origins_from_page(page: List[Dict[str, str]]) Iterator[ListedOrigin][source]#

Iterate on all pages and yield ListedOrigin instances.