polywrap_uri_resolvers.resolvers.legacy.base_resolver module
This module contains the legacy base URI resolver.
- class polywrap_uri_resolvers.resolvers.legacy.base_resolver.BaseUriResolver(file_reader: FileReader, redirects: Dict[Uri, Uri])[source]
Bases:
UriResolverDefines the base URI resolver.
- Parameters:
file_reader (FileReader) – The file reader to use.
- try_resolve_uri(uri: Uri, client: InvokerClient, resolution_context: UriResolutionContext) Uri | UriWrapper | UriPackage[source]
Try to resolve a URI to a wrap package, a wrapper, or a URI.
- Parameters:
uri (Uri) – The URI to resolve.
client (InvokerClient) – The client to use for resolving the URI.
resolution_context (UriResolutionContext) – The resolution context.
- Returns:
The resolved URI.
- Return type:
UriPackageOrWrapper