Skip to main content

Module source

Module source 

Source
Expand description

Source string parsing.

Converts user-provided source strings (GitHub shorthand, URLs, local paths, etc.) into a structured ParsedSource.

Internal layout (private submodules):

  • regex — compiled regex patterns and classification helpers
  • fragment#ref[@filter] parsing for ref-aware installs
  • matchers — individual URL-shape matchers composed by parse_source

The public API is this module’s parse_source, owner_repo, parse_owner_repo, and sanitize_subpath.

Functions§

owner_repo
Extract owner/repo (or group/subgroup/repo for GitLab) from a parsed source for telemetry and lock-file tracking.
parse_owner_repo
Parse owner/repo into separate components.
parse_source
Parse a source string into a structured ParsedSource.
sanitize_subpath
Sanitize a subpath to prevent path traversal.