Class UriResolverAggregator<TResolutionError, TGetResolversError>

An implementation of UriResolverAggregatorBase

Type Parameters

  • TResolutionError = undefined

  • TGetResolversError = undefined

Hierarchy

Constructors

  • Creates a UriResolverAggregator from a list of resolvers, or from a function that returns a list of resolvers

    Type Parameters

    • TResolutionError = undefined

    • TGetResolversError = undefined

    Parameters

    Returns UriResolverAggregator<TResolutionError, TGetResolversError>

  • Type Parameters

    • TResolutionError = undefined

    • TGetResolversError = undefined

    Parameters

    Returns UriResolverAggregator<TResolutionError, TGetResolversError>

  • Type Parameters

    • TResolutionError = undefined

    • TGetResolversError = undefined

    Parameters

    Returns UriResolverAggregator<TResolutionError, TGetResolversError>

Properties

_resolverName?: any
_resolvers: any
getStepDescription: (() => string)

Type declaration

    • (): string
    • A utility function for generating step descriptions to facilitate resolution context updates

      Returns string

      text describing the URI resolution step

Methods

  • Get a list of URI Resolvers

    Parameters

    • uri: Uri

      the URI to query for resolvers

    • client: CoreClient

      a CoreClient instance that can be used to make an invocation

    Returns Promise<Result<IUriResolver<unknown>[], TGetResolversError>>

    a list of IUriResolver or an error

  • Resolve a URI to a wrap package, a wrapper, or a URI. Attempts to resolve the URI using each of the aggregated resolvers sequentially.

    Parameters

    • uri: Uri

      the URI to resolve

    • client: CoreClient

      a CoreClient instance that may be used to invoke a wrapper that implements the UriResolver interface

    • resolutionContext: IUriResolutionContext

      the current URI resolution context

    Returns Promise<Result<UriPackageOrWrapper, TResolutionError | TGetResolversError>>

    A Promise with a Result containing either a wrap package, a wrapper, or a URI if successful

  • Using each of the aggregated resolvers, attempt to resolve a URI

    Parameters

    • uri: Uri

      the URI to resolve

    • client: CoreClient

      a CoreClient instance that can be used to make an invocation

    • resolvers: IUriResolver<unknown>[]

      a list of IUriResolver implementations

    • resolutionContext: IUriResolutionContext

      a resolution context to update when resolving URIs

    Returns Promise<Result<UriPackageOrWrapper, TResolutionError>>

    a URI, a Wrap Package, or a Wrapper (or an error)

Generated using TypeDoc